-
Notifications
You must be signed in to change notification settings - Fork 50
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
String "loss" being passed to metric_name() instead of loss func name #313
Comments
Would you like to make a PR with a test and a fix since it sounds like you've already figured out where the problem is? |
I can try, though I'm not sure I'm capable of doing it lol |
Give it a shot! Feel free to ask questions. |
I am facing this exact issue as well using keras 3.0.5/tensorflow 2.16.1 |
Looks like the issue is with how the _fit_keras_model() method in the wrappers.py file tries to filter out Keras keys. The value error seems to have changed. if you change line 535 from |
This is definitely a bug. I’ll try to fix it this week, but PRs are always welcome. I’d suggest a more robust pattern ( |
Is someone already working on fixing this? I'm now running into it too |
If you're running into this issue I'd guess you're using an unsupported version of Keras (e.g. Keras 3.0). We don't pin upper versions (which is considered best practice). It's an unfortunate tradeoff you need to make as a Python maintainer. For now you'll either need use a supported version of Keras / Tensorflow (e.g. Tensorflow 2.12.X without the standalone Keras package) or wait for #317 |
Could you please try #317 ( |
I'm new to ML and I'm just following a tutorial right now, but I'm getting the error:
ValueError: Could not interpret metric identifier: loss
at:
\keras\src\metrics\__init__.py:205, in get(identifier)
It seems like in the
wrapper.py
line 532metric_name(key)
should receive the name of a loss function, but it's actually receiving the string "loss"If inside keras_metric_get I manually set
identifier = "binary_crossentropy"
it works fineThe text was updated successfully, but these errors were encountered: