cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problems registering models via /api/2.0/mlflow/model-versions/create

unj1m
New Contributor III

Initially, I tried registering while logging a model from mlflow and got:

"Got an invalid source 'dbfs:/Volumes/compute_integration_tests/default/compute-external-table-tests-models/test_artifacts/1078d04b4d4b4537bdf7a4b5e94e9e7f/artifacts/model'. Only DBFS locations are currently supported."

WAT?

I got this when trying to log a model and supply a model name.  I can also reproduce by calling the REST API directly.

After some trial and error, I found that using the source: 

'dbfs:/dbfs/Volumes/compute_integration_tests/default/compute-external-table-tests-models/test_artifacts/1078d04b4d4b4537bdf7a4b5e94e9e7f/artifacts/model'

"worked".

But a new version never got created.

Also, the documentation doesn't mention the required run_id and source parameters.

3 REPLIES 3

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @unj1m,

The path should be in the format dbfs:/Volumes/... without the extra /dbfs prefix. The correct path should be: dbfs:/Volumes/compute_integration_tests/default/compute-external-table-tests-models/test_artifacts/1078d04b4d4b4537bdf7a4b5e94e9e7f/artifacts/model

fmadeiro
New Contributor II

The error happens because of how the source path is interpreted. Use the correct DBFS path format: dbfs:/Volumes/.... Avoid adding /dbfs redundantly, as it's already the DBFS root.

Key Fixes:

  1. New Version Not Created: Ensure each log_model call uses a unique run_id and updated model metadata to trigger versioning.
  2. Required Parameters: For REST API, include run_id (from the MLflow run) and source (DBFS path to the model artifact).

Example Payload:

 

{
"name": "my_model_name",
"source": "dbfs:/Volumes/my-model-path/model",
"run_id": "1234567890abcdef"
}

unj1m
New Contributor III

I know, right! 😉

Look at the error message I posted:

"Got an invalid source 'dbfs:/Volumes/compute_integration_tests/default/compute-external-table-tests-models/test_artifacts/1078d04b4d4b4537bdf7a4b5e94e9e7f/artifacts/model'. Only DBFS locations are currently supported."

Adding the /dbfs was necessary to make it work.

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group