Skip to content

Commit 11c1285

Browse files
KumoLiumarksgraham
authored andcommitted
update the Python version requirements for transformers (Project-MONAI#7275)
Part of Project-MONAI#7250. ### Description Fix the Python version for transformers smaller than 3.10. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: KumoLiu <[email protected]> Signed-off-by: Mark Graham <[email protected]>
1 parent f60c4e2 commit 11c1285

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sphinxcontrib-serializinghtml
2121
sphinx-autodoc-typehints==1.11.1
2222
pandas
2323
einops
24-
transformers<4.22 # https://github.com/Project-MONAI/MONAI/issues/5157
24+
transformers<4.22; python_version <= '3.10' # https://github.com/Project-MONAI/MONAI/issues/5157
2525
mlflow>=1.28.0
2626
clearml>=1.10.0rc0
2727
tensorboardX

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tifffile; platform_system == "Linux" or platform_system == "Darwin"
3333
pandas
3434
requests
3535
einops
36-
transformers<4.22 # https://github.com/Project-MONAI/MONAI/issues/5157
36+
transformers<4.22; python_version <= '3.10' # https://github.com/Project-MONAI/MONAI/issues/5157
3737
mlflow>=1.28.0
3838
clearml>=1.10.0rc0
3939
matplotlib!=3.5.0

tests/test_transchex.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from monai.networks import eval_mode
2020
from monai.networks.nets.transchex import Transchex
21-
from tests.utils import skip_if_quick
21+
from tests.utils import SkipIfAtLeastPyTorchVersion, skip_if_quick
2222

2323
TEST_CASE_TRANSCHEX = []
2424
for drop_out in [0.4]:
@@ -46,6 +46,7 @@
4646

4747

4848
@skip_if_quick
49+
@SkipIfAtLeastPyTorchVersion((1, 10))
4950
class TestTranschex(unittest.TestCase):
5051
@parameterized.expand(TEST_CASE_TRANSCHEX)
5152
def test_shape(self, input_param, expected_shape):

0 commit comments

Comments
 (0)