mlflow: [BUG] `TypeError: Couldn't build proto file into descriptor pool!` when importing `mlflow` (>= 2.3) and `databricks_registry_webhooks `
Issues Policy acknowledgement
- I have read and agree to submit bug reports in accordance with the issues policy
Willingness to contribute
No. I cannot contribute a bug fix at this time.
MLflow version
mlflow, version 2.4.2
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Ventura 13.4
- Python version: 3.9.16
Describe the problem
Import mlflow fails if imported after databricks-registry-webhooks package
mlflow import is failing with an error TypeError: Couldn’t build proto file into descriptor pool! Invalid proto descriptor for file “databricks.proto”: databricks.proto: A file with this name is already in the pool.
Issue doesn’t appear in mlflow version. 2.2.x or below but start appearing from mlflow 2.3.x
Tracking information
REPLACE_ME
Code to reproduce issue
from databricks_registry_webhooks import RegistryWebhooksClient, JobSpec, HttpUrlSpec
import mlflow
Stack trace
File [~/miniconda3/envs/optimus_ml_bot/lib/python3.9/site-packages/mlflow/__init__.py:41](https://file+.vscode-resource.vscode-cdn.net/Users/dixitadh/Projects/devops/shared-resources-pyproj-optimus-ml/~/miniconda3/envs/optimus_ml_bot/lib/python3.9/site-packages/mlflow/__init__.py:41)
38 warnings.filterwarnings("ignore", message="numpy.dtype size changed")
39 warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
---> 41 from mlflow import projects # pylint: disable=unused-import
42 from mlflow import tracking # pylint: disable=unused-import
43 from mlflow import models # pylint: disable=unused-import
File [~/miniconda3/envs/optimus_ml_bot/lib/python3.9/site-packages/mlflow/projects/__init__.py:9](https://file+.vscode-resource.vscode-cdn.net/Users/dixitadh/Projects/devops/shared-resources-pyproj-optimus-ml/~/miniconda3/envs/optimus_ml_bot/lib/python3.9/site-packages/mlflow/projects/__init__.py:9)
6 import os
7 import logging
----> 9 import mlflow.projects.databricks
10 from mlflow import tracking
11 from mlflow.entities import RunStatus
File [~/miniconda3/envs/optimus_ml_bot/lib/python3.9/site-packages/mlflow/projects/databricks.py:11](https://file+.vscode-resource.vscode-cdn.net/Users/dixitadh/Projects/devops/shared-resources-pyproj-optimus-ml/~/miniconda3/envs/optimus_ml_bot/lib/python3.9/site-packages/mlflow/projects/databricks.py:11)
8 import posixpath
9 import re
---> 11 from mlflow import tracking
12 from mlflow.entities import RunStatus
13 from mlflow.exceptions import MlflowException
...
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "databricks.proto":
databricks.proto: A file with this name is already in the pool.
Other info / logs
REPLACE_ME
What component(s) does this bug affect?
-
area/artifacts: Artifact stores and artifact logging -
area/build: Build and test infrastructure for MLflow -
area/docs: MLflow documentation pages -
area/examples: Example code -
area/gateway: AI Gateway service, Gateway client APIs, third-party Gateway integrations -
area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry -
area/models: MLmodel format, model serialization/deserialization, flavors -
area/recipes: Recipes, Recipe APIs, Recipe configs, Recipe Templates -
area/projects: MLproject format, project running backends -
area/scoring: MLflow Model server, model deployment tools, Spark UDFs -
area/server-infra: MLflow Tracking server backend -
area/tracking: Tracking Service, tracking client APIs, autologging
What interface(s) does this bug affect?
-
area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server -
area/docker: Docker use across MLflow’s components, such as MLflow Projects and MLflow Models -
area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry -
area/windows: Windows support
What language(s) does this bug affect?
-
language/r: R APIs and clients -
language/java: Java APIs and clients -
language/new: Proposals for new client languages
What integration(s) does this bug affect?
-
integrations/azure: Azure and Azure ML integrations -
integrations/sagemaker: SageMaker integrations -
integrations/databricks: Databricks integrations
About this issue
- Original URL
- State: open
- Created 10 months ago
- Comments: 22 (11 by maintainers)
I was able to reproduce the issue!