azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

protobuf 5.29.0 is breaking azureml-mlflow when attempting to authenticate to MLflow server with Azure ML Workspace details

Open MrKriss opened this issue 2 years ago • 5 comments

  • 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:

  1. 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.

MrKriss avatar Dec 02 '24 18:12 MrKriss

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.

github-actions[bot] avatar Dec 02 '24 18:12 github-actions[bot]

Thanks for the detailed issue @MrKriss, @azureml-github will take a look

kristapratico avatar Dec 02 '24 19:12 kristapratico

We have made the changes and by monday, new azureml-mlflow will be release. Will update here once its released.

jayesh-tanna avatar Dec 06 '24 08:12 jayesh-tanna

We have fixed the issue. Refer this new release: azureml-mlflow 1.59.0

jayesh-tanna avatar Dec 11 '24 11:12 jayesh-tanna

Closing this issue as 1.59.0 should resolve it.

jayesh-tanna avatar Dec 12 '24 07:12 jayesh-tanna