Skip to content

Add 'save_format' param to Keras autolog()#7123

Merged
harupy merged 4 commits intomlflow:masterfrom
balvisio:ba/keras-model-save-format
Oct 26, 2022
Merged

Add 'save_format' param to Keras autolog()#7123
harupy merged 4 commits intomlflow:masterfrom
balvisio:ba/keras-model-save-format

Conversation

@balvisio
Copy link
Copy Markdown
Contributor

@balvisio balvisio commented Oct 20, 2022

Signed-off-by: Bruno Alvisio [email protected]

Related Issues/PRs

Resolve #7024

What changes are proposed in this pull request?

Allow configuring the format in which the model is saved in keras.autolog()

How is this patch tested?

Added test to load model in 'HDF5' format

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change the documentation?

  • No. You can skip the rest of this section.
  • Yes. Make sure the changed pages / sections render correctly in the documentation preview.

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.

(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)

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/pipelines: Pipelines, Pipeline APIs, Pipeline configs, Pipeline Templates
  • 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

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 area/tracking Tracking service, tracking client APIs, autologging rn/feature Mention under Features in Changelogs. labels Oct 20, 2022
@mlflow-automation
Copy link
Copy Markdown
Contributor

mlflow-automation commented Oct 20, 2022

Documentation preview will be available here.

Notes

@harupy
Copy link
Copy Markdown
Member

harupy commented Oct 21, 2022

@balvisio Thanks for the PR! Left some comments :)

Signed-off-by: Harutaka Kawamura <[email protected]>
@balvisio
Copy link
Copy Markdown
Contributor Author

@harupy Sorry for not following up, has been a little bit busy. Thank you so much for the comments. I agree with your suggestions.

@balvisio
Copy link
Copy Markdown
Contributor Author

@harupy I have noticed that there is a warning message that the Keras support will be removed in a future version of MLFlow and will be replaced for TF. When I looked at the TF-related source code for saving the model looks like it supports "SavedModel" format only and it would be quite a bit a work to support HDF5. Not sure if it is worth the effort to support both formats. What do you think?

@harupy
Copy link
Copy Markdown
Member

harupy commented Oct 26, 2022

@balvisio Keras support won't be removed. Sorry for the confusion. In MLflow 2.0.0 (that will be released soon), mlflow.tensorflow will support tf.keras model. We'll merge this PR first, then export the changes in this PR to mlflow.tensorflow before releasing 2.0.0 :)

@balvisio
Copy link
Copy Markdown
Contributor Author

Got it. Yeah, I got confused because of this warning Autologging support for keras >= 2.6.0 has been deprecated and will be removed. Is not applicable then?

Copy link
Copy Markdown
Member

@harupy harupy left a comment

Choose a reason for hiding this comment

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

LGTM!

@harupy harupy merged commit 989bb11 into mlflow:master Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tracking Tracking service, tracking client APIs, autologging rn/feature Mention under Features in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Allowing changing the Keras serialization format when using mlflow.keras.autolog()

3 participants