Skip to content

Commit d6e6b24

Browse files
authored
Add version requirement for mlflow (#7659)
Fixes #7658. ### Description set mlflow>=1.28.0,<=2.11.3 mlflow/mlflow#11740 ### 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: YunLiu <55491388+KumoLiu@users.noreply.github.com>
1 parent 16d4e2f commit d6e6b24

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sphinx-autodoc-typehints==1.11.1
2222
pandas
2323
einops
2424
transformers<4.22; python_version <= '3.10' # https://github.com/Project-MONAI/MONAI/issues/5157
25-
mlflow>=1.28.0
25+
mlflow>=1.28.0, <=2.11.3
2626
clearml>=1.10.0rc0
2727
tensorboardX
2828
imagecodecs; platform_system == "Linux" or platform_system == "Darwin"

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pandas
3434
requests
3535
einops
3636
transformers>=4.36.0
37-
mlflow>=1.28.0
37+
mlflow>=1.28.0, <=2.11.3
3838
clearml>=1.10.0rc0
3939
matplotlib!=3.5.0
4040
tensorboardX

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ all =
6666
pandas
6767
einops
6868
transformers<4.22; python_version <= '3.10'
69-
mlflow>=1.28.0
69+
mlflow>=1.28.0, <=2.11.3
7070
clearml>=1.10.0rc0
7171
matplotlib
7272
tensorboardX
@@ -125,7 +125,7 @@ einops =
125125
transformers =
126126
transformers<4.22; python_version <= '3.10'
127127
mlflow =
128-
mlflow
128+
mlflow>=1.28.0, <=2.11.3
129129
matplotlib =
130130
matplotlib
131131
clearml =

tests/test_clip_intensity_percentiles.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from monai.transforms import ClipIntensityPercentiles
1919
from monai.transforms.utils import soft_clip
2020
from monai.transforms.utils_pytorch_numpy_unification import clip, percentile
21+
from monai.utils.type_conversion import convert_to_tensor
2122
from tests.utils import TEST_NDARRAYS, NumpyImageTestCase2D, NumpyImageTestCase3D, assert_allclose
2223

2324

@@ -29,7 +30,7 @@ def test_hard_clipping_two_sided(self, p):
2930
im = p(self.imt)
3031
result = hard_clipper(im)
3132
lower, upper = percentile(im, (5, 95))
32-
expected = clip(im, lower, upper)
33+
expected = clip(convert_to_tensor(im), lower, upper)
3334
assert_allclose(result, p(expected), type_test="tensor", rtol=1e-7, atol=0)
3435

3536
@parameterized.expand([[p] for p in TEST_NDARRAYS])

tests/test_clip_intensity_percentilesd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from monai.transforms import ClipIntensityPercentilesd
2020
from monai.transforms.utils import soft_clip
2121
from monai.transforms.utils_pytorch_numpy_unification import clip, percentile
22+
from monai.utils.type_conversion import convert_to_tensor
2223
from tests.utils import TEST_NDARRAYS, NumpyImageTestCase2D, NumpyImageTestCase3D, assert_allclose
2324

2425

@@ -31,7 +32,7 @@ def test_hard_clipping_two_sided(self, p):
3132
im = p(self.imt)
3233
result = hard_clipper({key: im})
3334
lower, upper = percentile(im, (5, 95))
34-
expected = clip(im, lower, upper)
35+
expected = clip(convert_to_tensor(im), lower, upper)
3536
assert_allclose(result[key], p(expected), type_test="tensor", rtol=1e-7, atol=0)
3637

3738
@parameterized.expand([[p] for p in TEST_NDARRAYS])

0 commit comments

Comments
 (0)