protobuf 5.29.0 is breaking azureml-mlflow when attempting to authenticate to MLflow server with Azure ML Workspace details
- Package Name: azureml-mlflow
- Package Version: 1.55.0 to current (1.58.0.post3)
- Operating System: Ubuntu via WSL
- Python Version: 3.12
Describe the bug
When attempting to connect to the ML flow server, an error is triggered by a downstream dependency (protobuf). Currently azureml-mlflow relies on a deprecated service.py module inside protobuf for some base abstract classes. However, the latest release of protobuf (5.29.0) included an indentation error in this section of the code which now causes an error at runtime.
https://github.com/protocolbuffers/protobuf/blob/2d4414f384dc499af113b5991ce3eaa9df6dd931/python/google/protobuf/service.py#L78
It look like this module is removed in latest main branch on protobuf, and previous versions of protobuf are not affected.
Pinning protobuf<5.29.0 fixed the issue for now.
To Reproduce Steps to reproduce the behavior:
- Attempt to connect to an MLflow server using an Azure ML workspace connection uri
Expected behavior Connection is established successfully
Screenshots The traceback is as follows:
Traceback (most recent call last):
File "/python/packages/my-package/aml-example.py", line 5
mlflow_client = MlflowClient(tracking_uri=workspace.mlflow_tracking_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/packages/mlflow/tracking/client.py", line 134, in __init__
self._tracking_client = TrackingServiceClient(final_tracking_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/packages/mlflow/tracking/_tracking_service/client.py", line 83, in __init__
self.store
File "/python/packages/mlflow/tracking/_tracking_service/client.py", line 87, in store
return utils._get_store(self.tracking_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/packages/mlflow/tracking/_tracking_service/utils.py", line 208, in _get_store
return _tracking_store_registry.get_store(store_uri, artifact_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/packages/mlflow/tracking/_tracking_service/registry.py", line 45, in get_store
return self._get_store_with_resolved_uri(resolved_store_uri, artifact_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/packages/mlflow/tracking/_tracking_service/registry.py", line 56, in _get_store_with_resolved_uri
return builder(store_uri=resolved_store_uri, artifact_uri=artifact_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/packages/azureml/mlflow/entry_point_loaders.py", line 33, in azureml_store_builder
from azureml.mlflow._store.tracking.store import AzureMLRestStore
File "/python/packages/azureml/mlflow/_store/tracking/store.py", line 17, in <module>
from azureml.mlflow._protos.aml_service_pb2 import (
File "/python/packages/azureml/mlflow/_protos/aml_service_pb2.py", line 10, in <module>
from google.protobuf import service as _service
File "/python/packages/google/protobuf/service.py", line 78
raise NotImplementedError
^
IndentationError: unindent does not match any outer indentation level
Additional context Add any other context about the problem here.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.
Thanks for the detailed issue @MrKriss, @azureml-github will take a look
We have made the changes and by monday, new azureml-mlflow will be release. Will update here once its released.
We have fixed the issue. Refer this new release: azureml-mlflow 1.59.0
Closing this issue as 1.59.0 should resolve it.