Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PART1] Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor #4577

Merged
merged 11 commits into from
Jul 27, 2021

Conversation

harupy
Copy link
Member

@harupy harupy commented Jul 19, 2021

Signed-off-by: harupy 17039389+harupy@users.noreply.github.com

What changes are proposed in this pull request?

Add pip_requirements and extra_pip_requirements to the following flavors:

  • lightgbm
  • catboost
  • sklearn
  • statsmodels
  • shap
  • h2o
  • pyfunc
  • spark
  • mleap

How is this patch tested?

Unit tests

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

log_model and save_model support pip_requirements and additional_pip_requirements for directly specifying pip requirements of the model.

What component(s), interfaces, languages, and integrations does this PR 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: Local serving, model deployment tools, spark UDFs
  • area/server-infra: MLflow server, JavaScript dev server
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, JavaScript, plotting
  • 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

How should the PR be classified in the release notes? Choose one:

  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

@github-actions github-actions bot added rn/feature Mention under Features in Changelogs. area/models MLmodel format, model serialization/deserialization, flavors labels Jul 19, 2021
@dbczumar dbczumar changed the title [ML-16465] Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor. Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor. Jul 19, 2021
@harupy harupy changed the title Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor. [WIP][ML-16465] Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor Jul 19, 2021
@harupy harupy changed the title [WIP][ML-16465] Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor Jul 20, 2021
@harupy harupy added the enable-dev-tests Enables cross-version tests for dev versions label Jul 20, 2021
@harupy harupy changed the title Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor [WIP] Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor Jul 20, 2021
@harupy
Copy link
Member Author

harupy commented Jul 22, 2021

@dbczumar Can we split this PR into two?

PR1 updates:

  • xgboost
  • lightgbm
  • ...

PR2 updates:

  • tensorflow
  • keras
  • pytorch
  • ...

Comment on lines +570 to +577
merged_conda_deps = _union_lists(shap_conda_deps, model_conda_deps)
merged_pip_deps = _union_lists(shap_pip_deps, model_pip_deps)
Copy link
Member Author

@harupy harupy Jul 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used _union_lists here to preserve the item order and make the outcome deterministic & predictable.

Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
@harupy harupy changed the title [WIP] Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor [PART1] Add pip_requirements and extra_pip_requirements to all flavors except xgboost flavor Jul 26, 2021
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
mlflow/mleap.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@dbczumar dbczumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once MLeap has been reverted (#4577 (comment)). Thanks @harupy !

Signed-off-by: harupy <hkawamura0130@gmail.com>
@harupy
Copy link
Member Author

harupy commented Jul 27, 2021

@dbczumar Thanks!

@harupy harupy merged commit afb912c into mlflow:master Jul 27, 2021
@harupy harupy deleted the ML-16465 branch July 27, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/models MLmodel format, model serialization/deserialization, flavors enable-dev-tests Enables cross-version tests for dev versions rn/feature Mention under Features in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants