Skip to content

Commit

Permalink
update the Python version requirements for transformers (Project-MONA…
Browse files Browse the repository at this point in the history
…I#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 <yunl@nvidia.com>
Signed-off-by: Yu0610 <612410030@alum.ccu.edu.tw>
  • Loading branch information
KumoLiu authored and Yu0610 committed Apr 11, 2024
1 parent 8dc2032 commit cf1c70d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sphinxcontrib-serializinghtml
sphinx-autodoc-typehints==1.11.1
pandas
einops
transformers<4.22 # https://github.com/Project-MONAI/MONAI/issues/5157
transformers<4.22; python_version <= '3.10' # https://github.com/Project-MONAI/MONAI/issues/5157
mlflow>=1.28.0
clearml>=1.10.0rc0
tensorboardX
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tifffile; platform_system == "Linux" or platform_system == "Darwin"
pandas
requests
einops
transformers<4.22 # https://github.com/Project-MONAI/MONAI/issues/5157
transformers<4.22; python_version <= '3.10' # https://github.com/Project-MONAI/MONAI/issues/5157
mlflow>=1.28.0
clearml>=1.10.0rc0
matplotlib!=3.5.0
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ all =
imagecodecs
pandas
einops
transformers<4.22
transformers<4.22; python_version <= '3.10'
mlflow>=1.28.0
clearml>=1.10.0rc0
matplotlib
Expand Down Expand Up @@ -123,7 +123,7 @@ pandas =
einops =
einops
transformers =
transformers<4.22
transformers<4.22; python_version <= '3.10'
mlflow =
mlflow
matplotlib =
Expand Down
3 changes: 2 additions & 1 deletion tests/test_transchex.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from monai.networks import eval_mode
from monai.networks.nets.transchex import Transchex
from tests.utils import skip_if_quick
from tests.utils import SkipIfAtLeastPyTorchVersion, skip_if_quick

TEST_CASE_TRANSCHEX = []
for drop_out in [0.4]:
Expand Down Expand Up @@ -46,6 +46,7 @@


@skip_if_quick
@SkipIfAtLeastPyTorchVersion((1, 10))
class TestTranschex(unittest.TestCase):
@parameterized.expand(TEST_CASE_TRANSCHEX)
def test_shape(self, input_param, expected_shape):
Expand Down

0 comments on commit cf1c70d

Please sign in to comment.