forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add keras flavor for Keras 3 support (mlflow#10830)
Signed-off-by: chenmoneygithub <[email protected]> Signed-off-by: ernestwong-db <[email protected]>
- Loading branch information
1 parent
3e4cd5c
commit ecd2e36
Showing
21 changed files
with
1,365 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
docs/source/python_api/mlflow.keras_core.rst → docs/source/python_api/mlflow.keras.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
mlflow.keras_core | ||
mlflow.keras | ||
================== | ||
|
||
.. automodule:: mlflow.keras_core | ||
.. automodule:: mlflow.keras | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,24 @@ | ||
from mlflow.tensorflow import ( | ||
# Redirect `mlflow.keras._load_pyfunc` to `mlflow.tensorflow._load_pyfunc`, | ||
# For backwards compatibility on loading keras model saved by old mlflow versions. | ||
_load_pyfunc, # noqa: F401 | ||
autolog, # noqa: F401 | ||
load_model, # noqa: F401 | ||
log_model, # noqa: F401 | ||
save_model, # noqa: F401 | ||
# MLflow Keras 3 flavor. | ||
|
||
from mlflow.keras.autolog import autolog | ||
from mlflow.keras.callback import MLflowCallback | ||
from mlflow.keras.load import _load_pyfunc, load_model | ||
from mlflow.keras.save import ( | ||
get_default_conda_env, | ||
get_default_pip_requirements, | ||
log_model, | ||
save_model, | ||
) | ||
|
||
FLAVOR_NAME = "keras" | ||
|
||
__all__ = [ | ||
"_load_pyfunc", | ||
"MLflowCallback", | ||
"autolog", | ||
"load_model", | ||
"save_model", | ||
"log_model", | ||
"get_default_pip_requirements", | ||
"get_default_conda_env", | ||
] |
Oops, something went wrong.