Code Monkey home page Code Monkey logo

Comments (9)

adriangb avatar adriangb commented on September 13, 2024 1

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.

adriangb avatar adriangb commented on September 13, 2024

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.

Zanchet2020 avatar Zanchet2020 commented on September 13, 2024

I can try, though I'm not sure I'm capable of doing it lol

from scikeras.

adriangb avatar adriangb commented on September 13, 2024

Give it a shot! Feel free to ask questions.

from scikeras.

CasperKjaerhus avatar CasperKjaerhus commented on September 13, 2024

I am facing this exact issue as well using keras 3.0.5/tensorflow 2.16.1

from scikeras.

johloe11 avatar johloe11 commented on September 13, 2024

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.

lazarust avatar lazarust commented on September 13, 2024

Is someone already working on fixing this? I'm now running into it too

from scikeras.

adriangb avatar adriangb commented on September 13, 2024

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.

adriangb avatar adriangb commented on September 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.