@@ -45,36 +45,24 @@ jobs:
4545 run : echo "::set-output name=period::$(python -c 'import time ; days = time.time() / 60 / 60 / 24 ; print(int(days / 7))' 2>&1)"
4646 id : times
4747
48- - name : Update pip
48+ - name : Upgrade pip
4949 run : |
50+ python --version
5051 # needed for `pip cache` command
51- pip install --quiet "pip==20.2" --upgrade --user
52+ pip install --upgrade pip --user
53+ pip --version
5254
5355 # Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646
5456 - name : Setup macOS
5557 if : runner.os == 'macOS'
5658 run : |
57- brew install libomp # https://github.com/pytorch/pytorch/issues/20030
5859 brew install openmpi libuv # Horovod on macOS requires OpenMPI, Gloo not currently supported
5960
6061 - name : Setup Windows
6162 if : runner.os == 'windows'
6263 run : |
6364 python .github/prune-packages.py requirements/extra.txt "horovod"
6465
65- # todo: re-enable when allow testing py 3.9 with min config, atm some Hydra issues
66- # - name: Adjust minimal for Python 3.9
67- # if: matrix.requires == 'minimal' && matrix.python-version == 3.9
68- # run: |
69- # import re
70- # def _req(fname, ptn, ver):
71- # req = re.sub(ptn, ver, open(fname).read())
72- # open(fname, 'w').write(req)
73- #
74- # _req('requirements.txt', r'torch>=[\d\.]+', 'torch>=1.8.0')
75- # _req('requirements/extra.txt', r'onnxruntime>=[\d\.]+', 'onnxruntime>=1.7.0')
76- # shell: python
77-
7866 - name : Set min. dependencies
7967 if : matrix.requires == 'minimal'
8068 run : |
@@ -104,37 +92,35 @@ jobs:
10492 unzip -o checkpoints.zip
10593 ls -l checkpoints/
10694
107- # todo: re-enable testing with Horovod
108- - name : py3.9 - temp skip Horovod
109- if : matrix.python-version == 3.9
95+ - name : Install dependencies
11096 run : |
111- # pip uninstall -y horovod
112- python .github/prune-packages.py requirements/extra.txt "horovod"
97+ flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
98+ pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade $flag
99+ # adjust versions according installed Torch version
100+ python ./requirements/adjust_versions.py requirements/examples.txt
101+ pip install --requirement requirements/examples.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
102+ pip install --requirement requirements/test.txt --upgrade
103+ pip list
104+ shell : bash
113105
114- - name : Install dependencies
106+ - name : Install extra dependencies
115107 env :
116- # MAKEFLAGS: "-j2"
117108 HOROVOD_BUILD_ARCH_FLAGS : " -mfma"
118109 HOROVOD_WITHOUT_MXNET : 1
119110 HOROVOD_WITHOUT_TENSORFLOW : 1
120111 run : |
121- python --version
122- pip --version
123- # python -m pip install --upgrade --user pip
124- flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
125- pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade $flag
126112 # adjust versions according installed Torch version
127113 python ./requirements/adjust_versions.py requirements/extra.txt
128- python ./requirements/adjust_versions.py requirements/examples.txt
129- pip install --requirement ./requirements/devel.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
114+ pip install --requirement ./requirements/extra.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
130115 pip list
131116 shell : bash
132117
133118 - name : Reinstall Horovod if necessary
134- # todo: re-enable horovod on py3.9 when it will be supported
135- if : runner.os != 'windows' && matrix.python-version != 3.9
119+ if : runner.os != 'windows'
136120 env :
137121 HOROVOD_BUILD_ARCH_FLAGS : " -mfma"
122+ HOROVOD_WITHOUT_MXNET : 1
123+ HOROVOD_WITHOUT_TENSORFLOW : 1
138124 run : |
139125 HOROVOD_BUILT=$(python -c "import horovod.torch; horovod.torch.nccl_built(); print('SUCCESS')" || true)
140126 if [[ $HOROVOD_BUILT != "SUCCESS" ]]; then
0 commit comments