Skip to content

[FR] improving load model function #4852

@shim1998

Description

@shim1998

Thank you for submitting a feature request. Before proceeding, please review MLflow's Issue Policy for feature requests and the MLflow Contributing Guide.

Please fill in this feature request template to ensure a timely and thorough response.

Willingness to contribute

The MLflow Community encourages new feature contributions. Would you or another member of your organization be willing to contribute an implementation of this feature (either as an MLflow Plugin or an enhancement to the MLflow code base)?

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

Proposal Summary

While using load_model() in python, I noticed it leads to creating a folder present in the temp folder. I am working on a project which loads 4 MLModels whose size is 2.5GB each, and this results in filling up disk space very quickly. A suggestion would be deleting this folder as soon as the program stops running or providing an argument for changing the folder's directory where MLModels are loaded.

Motivation

  • What is the use case for this feature?
    I discovered this issue while debugging my project and noticed this is a problem if I deploy it somewhere.
  • Why is this use case valuable to support for MLflow users in general?
    I feel many MLflow users will come with this issue if they are taking their projects to production.
  • Why is this use case valuable to support your project(s) or organization?
    Our organization is moving towards MLOps very quickly as it is a skill required for every software engineer interested in data science/AI-related work. MLFlow is an integral part of automating our ML projects; hence, we think this feature would benefit us and ML Engineers in general.
  • Why is it currently difficult to achieve this use case? (please be as specific as possible about why related MLflow features and components are insufficient)

What component(s), interfaces, languages, and integrations does this feature 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

Interfaces

  • 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

Languages

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

Integrations

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

Details

(Use this section to include any additional information about the feature. If you have a proposal for how to implement this feature, please include it here. For implementation guidelines, please refer to the Contributing Guide.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/modelsMLmodel format, model serialization/deserialization, flavorsenhancementNew feature or request

    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