Skip to content

[BUG] R API: mlflow_create_model_version() has bug in source #4908

@dwh1142

Description

@dwh1142

Thank you for submitting an issue. Please refer to our issue policy for additional information about bug reports. For help with debugging your code, please refer to Stack Overflow.

Please fill in this bug report template to ensure a timely and thorough response.

Willingness to contribute

The MLflow Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the MLflow code base?

  • Yes. I can contribute a fix for this bug independently.
  • Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.
  • No. I cannot contribute a bug fix at this time.

System information

  • Have I written custom code (as opposed to using a stock example script provided in MLflow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • MLflow installed from (source or binary):
  • MLflow version (run mlflow --version):
  • Python version:
  • npm version, if running the dev UI:
  • Exact command to reproduce:

Describe the problem

This is trivial, but the function definition in the source code below appears wrong. It should be source = source instead of source = name.

File: model-registry.R

mlflow_create_model_version <- function(name, source, run_id = NULL,
                                        tags = NULL, run_link = NULL,
                                        description = NULL, client = NULL) {
  client <- resolve_client(client)

  response <- mlflow_rest(
    "model-versions",
    "create",
    client = client,
    verb = "POST",
    version = "2.0",
    data = list(
      name = name,
      source = name,
      run_id = run_id,
      run_link = run_link,
      description = description
    )
  )

  return(response$model_version)
}

Code to reproduce issue

mlflow_create_model_version(name="model", source="dbfs:/databricks/mlflow-tracking/2466938677462882/11ff1812a0384f118825a7838e82ba2d/artifacts")

Error : API request to endpoint 'model-versions/create' failed with error code 400. Reponse body: 'INVALID_PARAMETER_VALUE; Got an invalid source 'model'. Only DBFS locations are currently supported.'
Some(<code style = 'font-size:10p'> Error: API request to endpoint 'model-versions/create' failed with error code 400. Reponse body: 'INVALID_PARAMETER_VALUE; Got an invalid source 'model'. Only DBFS locations are currently supported.' </code>)
Error: API request to endpoint 'model-versions/create' failed with error code 400. Reponse body: 'INVALID_PARAMETER_VALUE; Got an invalid source 'model'. Only DBFS locations are currently supported.'

Other info / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

What component(s), interfaces, languages, and integrations does this bug affect?

Components

  • 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/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • 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

Interface

  • 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

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/model-registryModel registry, model registry APIs, and the fluent client calls for model registrybugSomething isn't workinglanguage/rR APIs and clients

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions