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

fix: mlflow flavor "keras" not found #274

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

myungjin
Copy link
Contributor

In mlflow 2.0 or above, keras is not provided as a separate module. Instead, tensorflow module is used. When mlflow.keras is imported, mlflow.tensorflow is simply imported. So, trying to do getattr with string "keras" fails because there is no module called keras.

To fix the issue, when keras is identified, we use tensorflow flavor and call getattr with "tensorflow".

In mlflow 2.0 or above, keras is not provided as a separate module.
Instead, tensorflow module is used. When mlflow.keras is imported,
mlflow.tensorflow is simply imported. So, trying to do getattr with
string "keras" fails because there is no module called keras.

To fix the issue, when keras is identified, we use tensorflow flavor
and call getattr with "tensorflow".
@myungjin myungjin requested a review from Divlik November 21, 2022 22:12
Copy link
Contributor

@Divlik Divlik left a comment

Choose a reason for hiding this comment

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

lgtm

@myungjin myungjin merged commit 7369b8f into cisco-open:main Nov 21, 2022
@myungjin myungjin deleted the mlflow_flavor branch November 21, 2022 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants