Comments (9)
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 (if key == “loss” or key[:4] == “val_”
or similar, suggest looking into keras docs).
from scikeras.
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?
from scikeras.
I can try, though I'm not sure I'm capable of doing it lol
from scikeras.
Give it a shot! Feel free to ask questions.
from scikeras.
I am facing this exact issue as well using keras 3.0.5/tensorflow 2.16.1
from scikeras.
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 if "Unknown metric function" not in str(e):
to if "Unknown metric function" not in str(e) and "Could not interpret metric identifier" not in str(e):
it works as expected.
from scikeras.
Is someone already working on fixing this? I'm now running into it too
from scikeras.
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
from scikeras.
Could you please try #317 (pip install -U 'git+https://github.com/adriangb/scikeras.git@keras-3'
) and see if it fixes your problem? Thanks!
from scikeras.
Related Issues (20)
- Citation HOT 1
- SecOps: Security issues found with grPC lib HOT 5
- Bug not fixed yet HOT 1
- Can't load saved model (UnicodeDecodeError) HOT 1
- where to enter `validation_data=(test_x, test_y)` when using KerasRegressor() wrapper HOT 2
- Wrapping custom model subclassing `tf.keras.Model` does not work
- Randomized Seach CV is not working with KerasRegressor HOT 1
- ValueError: Invalid filepath extension for saving. Please add either a `.keras` extension for the native Keras format (recommended) or a `.h5` extension. HOT 9
- Keras 3 support HOT 6
- TypeError: OneHotEncoder.__init__() got an unexpected keyword argument 'sparse' HOT 9
- How pass a number of neurons in the model for KerasClassifier :Invalid parameter neurons for estimator KerasClassifier.
- OneHotEncoder no longer uses `sparse` keyword HOT 3
- SciKeras 0.13.0 / keras 3.2.1 - ModuleNotFoundError: No module named 'keras.src' HOT 2
- Invalid parameter 'model' for estimator KerasRegressor HOT 2
- Working Scikeras Classifer model now broken with scikeras 0.13. AttributeError: 'Sequential' object has no attribute 'compiled'. HOT 7
- Multi-backend scikeras (Tensorflow, Jax, Pytorch) HOT 2
- Can't serialize a KerasClassifier object after fitting HOT 1
- Extracting the underlying Keras model from the wrapper HOT 2
- How to apply data augmentation? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikeras.