|
53 | 53 | - name: Adjust minimal for Python 3.8 and MacOS
|
54 | 54 | if: matrix.requires == 'minimal' && (runner.os == 'macOS' || matrix.python-version == 3.8)
|
55 | 55 | run : |
|
56 |
| - python -c "fname = 'requirements.txt' ; req = open(fname).read().replace('torch>=1.3', 'torch>=1.4') ; open(fname, 'w').write(req)" |
57 |
| - python -c "fname = 'requirements/examples.txt' ; req = open(fname).read().replace('torchvision>=0.4.1', 'torchvision>=0.5.0') ; open(fname, 'w').write(req)" |
58 |
| - python -c "fname = 'requirements/extra.txt' ; req = open(fname).read().replace('torchtext>=0.3.1', 'torchtext>=0.5.0') ; open(fname, 'w').write(req)" |
| 56 | + python -c "import re ; fname = 'requirements.txt' ; req = re.sub(r'torch>=[\d\.]+', 'torch>=1.4.0', open(fname).read()) ; open(fname, 'w').write(req)" |
| 57 | + python -c "import re ; fname = 'requirements/examples.txt' ; req = re.sub(r'torchvision>=[\d\.]+', 'torchvision>=0.5.0', open(fname).read()) ; open(fname, 'w').write(req)" |
| 58 | + python -c "import re ; fname = 'requirements/extra.txt' ; req = re.sub(r'torchtext>=[\d\.]+', 'torchtext>=0.5.0', open(fname).read()) ; open(fname, 'w').write(req)" |
| 59 | +
|
| 60 | + # versions <= 1.3 may have issues on mac with some BLAS ops due to missing mkl (https://github.com/pytorch/pytorch/issues/18996) |
| 61 | + - name: Adjust minimal for Python 3.9 |
| 62 | + if: matrix.requires == 'minimal' && matrix.python-version == 3.9 |
| 63 | + run : | |
| 64 | + python -c "import re ; fname = 'requirements.txt' ; req = re.sub(r'torch>=[\d\.]+', 'torch>=1.7.1', open(fname).read()) ; open(fname, 'w').write(req)" |
| 65 | + python -c "import re ; fname = 'requirements/examples.txt' ; req = re.sub(r'torchvision>=[\d\.]+', 'torchvision>=0.8.2', open(fname).read()) ; open(fname, 'w').write(req)" |
| 66 | + python -c "import re ; fname = 'requirements/extra.txt' ; req = re.sub(r'torchtext>=[\d\.]+', 'torchtext>=0.8.1', open(fname).read()) ; open(fname, 'w').write(req)" |
59 | 67 |
|
60 | 68 | - name: Set min. dependencies
|
61 | 69 | if: matrix.requires == 'minimal'
|
|
0 commit comments