Skip to content

Commit

Permalink
Use uv instead of pip install for github CI (#2546)
Browse files Browse the repository at this point in the history
* Test uv

* Workflow dispatch

* Modify

* Setuptools...apparently?

* No need for -y

* Rm cache

* Rm workflow dispatch

* Trainer tests

* Might need to be -e

* Try keeping it at absolute home

* Undo integration
  • Loading branch information
muellerzr authored Mar 12, 2024
1 parent 92b1ad0 commit 354db5b
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,20 @@ jobs:
with:
python-version: 3.8

- name: Activate python cache
uses: actions/cache@v3
with:
path: |
${{ env.pythonLocation }}
${{ env.HF_HOME }}
key: ${{ env.pythonLocation }}-${{ matrix.pytorch-version }}-${{ matrix.test-kind }}-${{ hashFiles('setup.py') }}
- name: Setup uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv .venv
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Install the library
run: |
pip install --upgrade pip
if [[ ${{ matrix.test-kind }} = test_prod ]]; then pip install -e .[test_prod]; fi
if [[ ${{ matrix.test-kind }} != test_prod ]]; then pip install -e .[testing,test_trackers]; fi
if [[ ${{ matrix.test-kind }} = test_rest ]]; then pip uninstall comet_ml -y; fi
if [[ ${{ matrix.test-kind }} = minimum ]]; then pip install torch==1.10.0; fi
pip install pytest-reportlog tabulate
if [[ ${{ matrix.test-kind }} = test_prod ]]; then uv pip install -e .[test_prod]; fi
if [[ ${{ matrix.test-kind }} != test_prod ]]; then uv pip install -e .[testing,test_trackers]; fi
if [[ ${{ matrix.test-kind }} = test_rest ]]; then uv pip uninstall comet_ml; fi
if [[ ${{ matrix.test-kind }} = minimum ]]; then uv pip install torch==1.10.0; fi
uv pip install pytest-reportlog tabulate setuptools
- name: Run Tests
env:
Expand Down

0 comments on commit 354db5b

Please sign in to comment.