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
Add a warning when fitting models loaded from SavedModels #42846
Conversation
Add a warning when fitting models loaded from SaveModel having optimizers with slots. Ref: tensorflow#42749 (comment)
This is just an exploring proposal. If you have a better entry point let me know. |
@gbaned I have any private channel so the thread it is what you see here. |
Can you give context for this PR? I think adding a warning in fit() for loaded saved models with slot variables is sensible, but I don't see any warnings added in this PR. |
@reedwm If you see is a draft as I have asked for comment on 1st September about the entry point I selected in the code to "introduce" the condition but as of 2nd December I got any feedback. |
Unfortunately I am not very familiar with the SavedModel code so I'm not sure if this is a good place to do it. Sorry for not responding until now. @k-w-w, do you think it would be a good idea to add a warning if a SavedModel with slot variables is restored and Model.fit() is used? Currently slot variables are not restored in such a case, which could affect training and is why we should potentially add a warning. If this is a good idea, would the code modified in this PR be a good place to check for the use of slot variables? |
@reedwm Thank you. Just to note that I've already asked to @k-w-w on 23th Oct at tensorflow/community#281 (comment) |
The change looks good, although I think directly sending the warning when loading would make sense (see the warning message for the HDF5 format:
|
Do you like the same HDF5 warning message or something else? |
Ok Windows is failing for unrelated MLIR issues and Macos CPU is failing probably for other unrelated stuff but has any visible details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, thank you!
@k-w-w The sanity is temp broken by #48294 (comment) |
Oh I see, good to know |
Can you re-trigger the build? I think that the CI Sanity it is working again. |
Do you need anything else here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I'm not sure why this isn't being automatically pulled in. Let me try re-approving.
Add a warning when fitting models loaded from SaveModel having optimizers with slots.
Ref: #42749 (comment)