Skip to content

Don't start PyTorch thread just doing import. #1318

Don't start PyTorch thread just doing import.

Don't start PyTorch thread just doing import. #1318

Workflow file for this run

name: Testing
on:
push:
branches:
- main
pull_request:
# Can't filter on paths easily and have required workflows.
# See https://github.com/orgs/community/discussions/13690 and
# https://engineering.mixpanel.com/enforcing-required-checks-on-conditional-ci-jobs-in-a-github-monorepo-8d4949694340
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
SYCAMORE_S3_TEMP_PATH: s3://aryn-sycamore-integ-temp/
MODEL_SERVER_KEY: ${{ secrets.MODEL_SERVER_KEY }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
# Permissions for AWS access
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
sycamore-unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install sycamore
run: poetry install
working-directory: lib/sycamore
- name: Install poppler and tesseract
run: sudo apt-get install -y poppler-utils tesseract-ocr
- name: Run tests
run: poetry run pytest sycamore/tests/unit/
working-directory: lib/sycamore
rps-unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11" ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install RPS
run: make install_rps
working-directory: lib/remote-processors
- name: Run Tests
run: poetry run pytest remote_processors/test/unit/
working-directory: lib/remote-processors
integ-tests:
runs-on: integ-test-runner
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
services:
opensearch:
image: opensearchproject/opensearch:2.10.0
env:
discovery.type: "single-node"
ports:
- 9200:9200
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install sycamore
run: poetry install
- name: Download nltk packages
run: poetry run python -m nltk.downloader punkt averaged_perceptron_tagger
- name: Install poppler and tesseract
run: sudo apt-get install -y poppler-utils tesseract-ocr
- name: Configure AWS Credentials via OIDC provider.
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::237550789389:role/aryn-github-integ
- name: Run Integ tests
run: poetry run pytest lib/sycamore/sycamore/tests/integration
- name: Run Notebook tests
run: poetry run pytest --nbmake --nbmake-timeout=600 notebooks/default-prep-script.ipynb notebooks/jupyter_dev_example.ipynb notebooks/metadata-extraction.ipynb notebooks/sycamore_demo.ipynb notebooks/tutorial.ipynb