Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type object 'FileOptions' has no attribute 'RegisterExtension' in mlflow #7658

Open
KumoLiu opened this issue Apr 18, 2024 · 1 comment · Fixed by #7659
Open

type object 'FileOptions' has no attribute 'RegisterExtension' in mlflow #7658

KumoLiu opened this issue Apr 18, 2024 · 1 comment · Fixed by #7659
Labels
dependencies Pull requests that update a dependency file

Comments

@KumoLiu
Copy link
Contributor

KumoLiu commented Apr 18, 2024


[2024-04-17T01:04:36.169Z] ======================================================================

[2024-04-17T01:04:36.169Z] ERROR: test_multi_run (tests.test_handler_mlflow.TestHandlerMLFlow)

[2024-04-17T01:04:36.169Z] ----------------------------------------------------------------------

[2024-04-17T01:04:36.169Z] Traceback (most recent call last):

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/test_handler_mlflow.py", line 97, in test_multi_run

[2024-04-17T01:04:36.169Z]     handler = MLFlowHandler(

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/handlers/mlflow_handler.py", line 154, in __init__

[2024-04-17T01:04:36.169Z]     self.client = mlflow.MlflowClient(tracking_uri=tracking_uri if tracking_uri else None)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/utils/module.py", line 441, in __getattr__

[2024-04-17T01:04:36.169Z]     raise self._exception

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 60, in testPartExecutor

[2024-04-17T01:04:36.169Z]     yield

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 676, in run

[2024-04-17T01:04:36.169Z]     self._callTestMethod(testMethod)

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 633, in _callTestMethod

[2024-04-17T01:04:36.169Z]     method()

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/parameterized/parameterized.py", line 620, in standalone_func

[2024-04-17T01:04:36.169Z]     return func(*(a + p.args), **p.kwargs, **kw)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/test_handler_mlflow.py", line 168, in test_metrics_track_mock

[2024-04-17T01:04:36.169Z]     handler = MLFlowHandler(

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/handlers/mlflow_handler.py", line 154, in __init__

[2024-04-17T01:04:36.169Z]     self.client = mlflow.MlflowClient(tracking_uri=tracking_uri if tracking_uri else None)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/utils/module.py", line 441, in __getattr__

[2024-04-17T01:04:36.169Z]     raise self._exception

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 60, in testPartExecutor

[2024-04-17T01:04:36.169Z]     yield

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 676, in run

[2024-04-17T01:04:36.169Z]     self._callTestMethod(testMethod)

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 633, in _callTestMethod

[2024-04-17T01:04:36.169Z]     method()

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/parameterized/parameterized.py", line 620, in standalone_func

[2024-04-17T01:04:36.169Z]     return func(*(a + p.args), **p.kwargs, **kw)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/test_handler_mlflow.py", line 168, in test_metrics_track_mock

[2024-04-17T01:04:36.169Z]     handler = MLFlowHandler(

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/handlers/mlflow_handler.py", line 154, in __init__

[2024-04-17T01:04:36.169Z]     self.client = mlflow.MlflowClient(tracking_uri=tracking_uri if tracking_uri else None)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/utils/module.py", line 441, in __getattr__

[2024-04-17T01:04:36.169Z]     raise self._exception

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 60, in testPartExecutor

[2024-04-17T01:04:36.169Z]     yield

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 676, in run

[2024-04-17T01:04:36.169Z]     self._callTestMethod(testMethod)

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 633, in _callTestMethod

[2024-04-17T01:04:36.169Z]     method()

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/parameterized/parameterized.py", line 620, in standalone_func

[2024-04-17T01:04:36.169Z]     return func(*(a + p.args), **p.kwargs, **kw)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/test_handler_mlflow.py", line 207, in test_metrics_track_iters_mock

[2024-04-17T01:04:36.169Z]     handler = MLFlowHandler(

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/handlers/mlflow_handler.py", line 154, in __init__

[2024-04-17T01:04:36.169Z]     self.client = mlflow.MlflowClient(tracking_uri=tracking_uri if tracking_uri else None)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/utils/module.py", line 441, in __getattr__

[2024-04-17T01:04:36.169Z]     raise self._exception

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 60, in testPartExecutor

[2024-04-17T01:04:36.169Z]     yield

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 676, in run

[2024-04-17T01:04:36.169Z]     self._callTestMethod(testMethod)

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 633, in _callTestMethod

[2024-04-17T01:04:36.169Z]     method()

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/parameterized/parameterized.py", line 620, in standalone_func

[2024-04-17T01:04:36.169Z]     return func(*(a + p.args), **p.kwargs, **kw)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/test_handler_mlflow.py", line 207, in test_metrics_track_iters_mock

[2024-04-17T01:04:36.169Z]     handler = MLFlowHandler(

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/handlers/mlflow_handler.py", line 154, in __init__

[2024-04-17T01:04:36.169Z]     self.client = mlflow.MlflowClient(tracking_uri=tracking_uri if tracking_uri else None)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/utils/module.py", line 441, in __getattr__

[2024-04-17T01:04:36.169Z]     raise self._exception

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 60, in testPartExecutor

[2024-04-17T01:04:36.169Z]     yield

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 676, in run

[2024-04-17T01:04:36.169Z]     self._callTestMethod(testMethod)

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/unittest/case.py", line 633, in _callTestMethod

[2024-04-17T01:04:36.169Z]     method()

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/test_handler_mlflow.py", line 134, in test_metrics_track

[2024-04-17T01:04:36.169Z]     handler = MLFlowHandler(

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/handlers/mlflow_handler.py", line 154, in __init__

[2024-04-17T01:04:36.169Z]     self.client = mlflow.MlflowClient(tracking_uri=tracking_uri if tracking_uri else None)

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/utils/module.py", line 441, in __getattr__

[2024-04-17T01:04:36.169Z]     raise self._exception

[2024-04-17T01:04:36.169Z]   File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/utils/module.py", line 399, in optional_import

[2024-04-17T01:04:36.169Z]     pkg = __import__(module)  # top level module

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/mlflow/__init__.py", line 34, in <module>

[2024-04-17T01:04:36.169Z]     from mlflow import (

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/mlflow/artifacts/__init__.py", line 9, in <module>

[2024-04-17T01:04:36.169Z]     from mlflow.exceptions import MlflowException

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/mlflow/exceptions.py", line 4, in <module>

[2024-04-17T01:04:36.169Z]     from mlflow.protos.databricks_pb2 import (

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/mlflow/protos/databricks_pb2.py", line 17, in <module>

[2024-04-17T01:04:36.169Z]     from .scalapb import scalapb_pb2 as scalapb_dot_scalapb__pb2

[2024-04-17T01:04:36.169Z]   File "/opt/conda/lib/python3.8/site-packages/mlflow/protos/scalapb/scalapb_pb2.py", line 53, in <module>

[2024-04-17T01:04:36.169Z]     google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(options)

[2024-04-17T01:04:36.169Z] monai.utils.module.OptionalImportError: Please install mlflow before using MLFlowHandler. (type object 'FileOptions' has no attribute 'RegisterExtension').
KumoLiu added a commit to KumoLiu/MONAI that referenced this issue Apr 18, 2024
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
KumoLiu added a commit that referenced this issue Apr 19, 2024
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>
@KumoLiu
Copy link
Contributor Author

KumoLiu commented Apr 19, 2024

Need revise this one after next release from mlflow.
mlflow/mlflow#11742 (comment)

@KumoLiu KumoLiu reopened this Apr 19, 2024
@KumoLiu KumoLiu added the dependencies Pull requests that update a dependency file label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant