question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

History renamed compared to tf1 wrapper

See original GitHub issue

I’m mostly through migration to this great project, as part of the move to upgrade to tf2 and noticed that history is called history_ in scikeras. This is documented in the Model documentation but it might be nice to have a note in the migration guide.

As there are some PRs related to this history object I won’t make a suggestion for the doc as I don’t know how the behaviour changes (for my case it is just a case of renaming).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
adriangbcommented, Apr 8, 2021

Hi @icfly2 thank you for the issue.

I think the old wrappers returned a history object from calling fit instead of saving it is .history or .history_. So I don’t think we renamed the parameter, instead we changed the signature of fit and saved the history as an attribute instead. Please let me know if I am missing anything here 😄

But I do think we should added this to our transition guide. I don’t think it made it on there because it was a change done so early in the development of SciKeras (when it was a PR in TensorFlow) that we didn’t even have a transition guide 😅 .

0reactions
stsievertcommented, Apr 9, 2021

@icfly2 from the Keras.fit docs, it appears this code works:

import keras
hist = keras.fit(...)
hist.history

However, SciKeras is slightly different:

from scikeras.wrappers import KerasClassifier
est = KerasClassifier(...)
est.fit(...)
# est = est.fit(...)  # or this line
est.history_

Is that what this issue is about?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TensorFlow 1.x vs TensorFlow 2 - Behaviors and APIs
This guide describes the fundamental differences between TF1.x and TF2 in terms of behaviors and the APIs, and how these all relate to...
Read more >
[D] Why is tensorflow so hated on and pytorch is the cool kids ...
Learning TF1 was an incredible pain, because you'd find bad official documentation along with blog posts and tutorials that are not older than...
Read more >
Convert tensorflow 1 contrib to tensorflow 2 Keras version
Few of the libraries in Tensorflow 2.x are moved to some other repository like addons and operation. Replace tf.contrib.rnn.DropoutWrapper ...
Read more >
History.md · master - RooUnfold - CERN GitLab
Add RooUnfoldResponse::MakeFoldingFunction which wraps a TF1 to apply the response matrix to a user ... Old History file renamed to History.svn and frozen....
Read more >
Releases · keras-team/keras - GitHub
Please see the release history at ... Fix TypeError positional argument when LossScalerOptimizer is used conjointly with tfa wrappers by @lucasdavid in # ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found