6
6
# Run at 00:00 UTC Every Day
7
7
- cron : " 0 0 * * *"
8
8
workflow_dispatch :
9
+ push :
10
+ branches :
11
+ - master
12
+ pull_request :
13
+ branches :
14
+ - master
9
15
10
16
jobs :
11
17
build :
@@ -15,14 +21,13 @@ jobs:
15
21
max-parallel : 5
16
22
fail-fast : false
17
23
matrix :
18
- python-version : [3.9, "3.10", "3.11"]
24
+ python-version : [" 3.9" , "3.10", "3.11"]
19
25
pytorch-version : [2.5.1, 2.4.1, 2.3.1, 2.2.2, 1.13.1, 1.12.1, 1.10.0]
20
26
exclude :
21
27
- pytorch-version : 1.10.0
22
28
python-version : " 3.10"
23
29
- pytorch-version : 1.10.0
24
30
python-version : " 3.11"
25
-
26
31
- pytorch-version : 1.11.0
27
32
python-version : " 3.10"
28
33
- pytorch-version : 1.11.0
@@ -68,22 +73,24 @@ jobs:
68
73
- name : Install dependencies
69
74
shell : bash -l {0}
70
75
run : |
71
- conda install pytorch=${{ matrix.pytorch-version }} torchvision cpuonly python=${{ matrix.python-version }} -c pytorch
72
76
77
+ conda install pytorch=${{ matrix.pytorch-version }} torchvision cpuonly python=${{ matrix.python-version }} -c pytorch -y
78
+ pip install uv
79
+
73
80
# We should install numpy<2.0 for pytorch<2.3
74
81
numpy_one_pth_version=$(python -c "import torch; print(float('.'.join(torch.__version__.split('.')[:2])) < 2.3)")
75
82
if [ "${numpy_one_pth_version}" == "True" ]; then
76
- pip install -U "numpy<2.0"
83
+ uv pip install "numpy<2.0"
77
84
fi
78
85
79
- pip install -r requirements-dev.txt
80
- pip install .
86
+ uv pip install -r requirements-dev.txt
87
+ uv pip install .
81
88
82
89
# pytorch>=1.9.0,<1.11.0 is using "from setuptools import distutils; distutils.version.LooseVersion" anti-pattern
83
90
# which raises the error: AttributeError: module 'distutils' has no attribute 'version' for setuptools>59
84
91
bad_pth_version=$(python -c "import torch; print('.'.join(torch.__version__.split('.')[:2]) in ['1.9', '1.10'])")
85
92
if [ "${bad_pth_version}" == "True" ]; then
86
- pip install --upgrade "setuptools<59"
93
+ uv pip install "setuptools<59"
87
94
python -c "from setuptools import distutils; distutils.version.LooseVersion"
88
95
fi
89
96
0 commit comments