[BUG] pyfunc.load_model ignores logged model with trust_remote_code set to True #12033
Closed
4 of 23 tasks
Labels
area/model-registry
Model registry, model registry APIs, and the fluent client calls for model registry
area/models
MLmodel format, model serialization/deserialization, flavors
bug
Something isn't working
has-closing-pr
This issue has a closing PR
integrations/databricks
Databricks integrations
Issues Policy acknowledgement
Where did you encounter this bug?
Databricks
Willingness to contribute
Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.
MLflow version
System information
Describe the problem
The load_model() method via pyfunc ignores remote code contained in the model. This will cause the model to load with empty/default weights and be unusable. However, loading the method via sentence_transformers is fine.
Tracking information
No response
Code to reproduce issue
Stack trace
Other info / logs
For completeness, this is done via sentence_transformers, which works as expected.
Output:
What component(s) does this bug affect?
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/deployments
: MLflow Deployments client APIs, server, and third-party Deployments integrationsarea/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/recipes
: Recipes, Recipe APIs, Recipe configs, Recipe 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 integrationsThe text was updated successfully, but these errors were encountered: