Speedup env(...) by 25x, and speedup writing to parquet by 80x #924
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
paths: | |
- 'lilac/**' | |
- '**/*.py' | |
- 'poetry.lock' | |
- 'poetry.toml' | |
- 'pyproject.toml' | |
- 'mypy.ini' | |
- 'pytest.ini' | |
- '.python-version' | |
- '.env' | |
- '.coveragerc' | |
- '.github/workflows/python.yml' | |
- 'scripts/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'poetry' | |
- name: Install dependencies | |
# Re-install pytorch for cpu to avoid errors that cuda was not found | |
run: | | |
./scripts/setup_py.sh | |
poetry run pip3 install --force-reinstall --pre torch==2.* --index-url https://download.pytorch.org/whl/nightly/cpu | |
# We run testing before linting since testing, surprisingly, is much faster. | |
- name: Test python | |
run: | | |
poetry run ./scripts/test_py.sh | |
- name: Lint python | |
run: | | |
poetry run ./scripts/lint_py.sh |