databricks-sdk-py icon indicating copy to clipboard operation
databricks-sdk-py copied to clipboard

[ISSUE] module 'databricks.sdk.service.ml' has no attribute 'ListModelsRequest'

Open matejaputic opened this issue 8 months ago • 0 comments

Description Could not run an example from the SDK API docs, failed to request a list of models from the model registry in the current workspace.

The example can be found here: https://databricks-sdk-py.readthedocs.io/en/latest/workspace/ml/model_registry.html#databricks.sdk.service.ml.ModelRegistryAPI.list_models

Reproduction

from databricks.sdk import WorkspaceClient
from databricks.sdk.service import ml

w = WorkspaceClient()

all = w.model_registry.list_models(ml.ListModelsRequest())

Expected behavior all should contain a list of models registered in the current workspace.

Is it a regression? Unknown

Debug Logs

AttributeError: module 'databricks.sdk.service.ml' has no attribute 'ListModelsRequest'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
File <command-7439822413478255>, line 6
      2 from databricks.sdk.service import ml
      4 w = WorkspaceClient()
----> 6 all = w.model_registry.list_models(ml.ListModelsRequest())

AttributeError: module 'databricks.sdk.service.ml' has no attribute 'ListModelsRequest'

Other Information

  • On Databricks Enterprise platform, in notebook environment
  • Databricks SDK version: 0.55.0
  • (if relevant) MLflow version: 3.0.0rc3

Additional context None

matejaputic avatar May 29 '25 13:05 matejaputic