Closed nathaneastwood closed 2 years ago
Looking at this some more, the issue indeed seems to come from the \r
.
model_path2 <- "C:\\...\\mlruns\\0\\bf154459eeca42a4b4f4e811ce615897\\artifacts"
fs::path(model_path2, "MLmodel")
# C:/.../mlruns/0/bf154459eeca42a4b4f4e811ce615897/artifacts/MLmodel
Willingness to contribute
Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.
MLflow version
1.27.0
System information
Describe the problem
I cannot load a model which I have previously logged.
Tracking information
No response
Code to reproduce issue
I took a look under the hood and there are a couple of things going on here. Firstly,
mlflow:::mlflow_download_artifacts_from_uri()
is called and returnsAs you can see, there has been a
\r
appended here. If you step into this function, there is a\n
too but this is removed here. I think this is a bug.If we carry on stepping through the
mlflow::mlflow_load_model()
, the following is called (here)As you can see, rather than appending the
MLmodel
, it has instead prepended it. This may well be a bug within thefs
package.Other info / logs
No response
What component(s) does this bug affect?
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/pipelines
: Pipelines, Pipeline APIs, Pipeline configs, Pipeline Templatesarea/projects
: MLproject format, project running backendsarea/scoring
: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra
: MLflow Tracking server backendarea/tracking
: Tracking Service, tracking client APIs, autologgingWhat interface(s) does this bug affect?
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportWhat language(s) does this bug affect?
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesWhat integration(s) does this bug affect?
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrations