Skip to content

Commit f93b3e6

Browse files
committed
Try uv in our ci
1 parent 48c39ce commit f93b3e6

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

.github/workflows/ci-tests-fabric.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ jobs:
9898
python-version: ${{ matrix.python-version }}
9999

100100
- name: basic setup
101-
run: pip install -q -r .actions/requirements.txt
101+
run: |
102+
pip install uv
103+
uv pip install -q -r .actions/requirements.txt
102104
103105
- name: Set min. dependencies
104106
if: ${{ matrix.requires == 'oldest' }}
@@ -107,7 +109,7 @@ jobs:
107109
- name: Adjust PyTorch versions in requirements files
108110
if: ${{ matrix.requires != 'oldest' }}
109111
run: |
110-
pip install -q -r requirements/ci.txt
112+
uv pip install -q -r requirements/ci.txt
111113
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
112114
for fpath in `ls requirements/**/*.txt`; do \
113115
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
@@ -134,9 +136,9 @@ jobs:
134136
- name: Install package & dependencies
135137
timeout-minutes: 20
136138
run: |
137-
pip install -e ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
139+
uv pip install -e ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
138140
--find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
139-
pip list
141+
uv pip list
140142
- name: Dump handy wheels
141143
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
142144
continue-on-error: true

.github/workflows/ci-tests-pytorch.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ jobs:
103103
python-version: ${{ matrix.python-version }}
104104

105105
- name: basic setup
106-
run: pip install -q -r .actions/requirements.txt
106+
run: |
107+
pip install uv
108+
uv pip install -q -r .actions/requirements.txt
107109
108110
- name: Set min. dependencies
109111
if: ${{ matrix.requires == 'oldest' }}
@@ -112,7 +114,7 @@ jobs:
112114
- name: Adjust PyTorch versions in requirements files
113115
if: ${{ matrix.requires != 'oldest' }}
114116
run: |
115-
pip install -q -r requirements/ci.txt
117+
uv pip install -q -r requirements/ci.txt
116118
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
117119
for fpath in `ls requirements/**/*.txt`; do \
118120
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
@@ -140,17 +142,17 @@ jobs:
140142
- name: Install package & dependencies
141143
timeout-minutes: 20
142144
run: |
143-
pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
145+
uv pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
144146
-r requirements/_integrations/accelerators.txt \
145147
--find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
146-
pip list
148+
uv pip list
147149
- name: Drop LAI from extensions
148150
if: ${{ matrix.pkg-name != 'lightning' }}
149151
# Lightning is dependency of Habana or other accelerators/integrations so in case we test PL we need to remove it
150-
run: pip uninstall -y lightning
152+
run: uv pip uninstall -y lightning
151153
- name: Drop PL for LAI
152154
if: ${{ matrix.pkg-name == 'lightning' }}
153-
run: pip uninstall -y pytorch-lightning
155+
run: uv pip uninstall -y pytorch-lightning
154156
- name: Dump handy wheels
155157
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
156158
continue-on-error: true

.github/workflows/docs-build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ jobs:
7575

7676
- name: Pull sphinx template
7777
run: |
78-
pip install -q -r requirements/ci.txt
78+
pip install uv
79+
uv pip install -q -r requirements/ci.txt
7980
aws s3 sync --no-sign-request s3://sphinx-packages/ ${PYPI_LOCAL_DIR}
80-
pip install lai-sphinx-theme -U -f ${PYPI_LOCAL_DIR}
81+
uv pip install lai-sphinx-theme -U -f ${PYPI_LOCAL_DIR}
8182
8283
- name: pip wheels cache
8384
uses: actions/cache/restore@v4
@@ -96,13 +97,13 @@ jobs:
9697
run: |
9798
mkdir -p ${PYPI_CACHE_DIR} # in case cache was not hit
9899
ls -lh ${PYPI_CACHE_DIR}
99-
pip install .[all] -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
100+
uv pip install .[all] -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
100101
-f ${PYPI_LOCAL_DIR} -f ${PYPI_CACHE_DIR} -f ${TORCH_URL}
101-
pip list
102+
uv pip list
102103
- name: Install req. for Notebooks/tutorials
103104
if: matrix.pkg-name == 'pytorch'
104105
timeout-minutes: 10
105-
run: pip install -q -r _notebooks/.actions/requires.txt
106+
run: uv pip install -q -r _notebooks/.actions/requires.txt
106107

107108
- name: Full build for deployment
108109
if: github.event_name != 'pull_request'

0 commit comments

Comments
 (0)