(fix) Remove nn.Modules and Callables from module init kwargs to enable serialization when weights_only=True#563
Open
dhpitt wants to merge 25 commits intoneuraloperator:mainfrom
Open
Conversation
nn.Modules and Callables from module init kwargs to enable serialization when weights_only=True
Member
|
Looks good - though the tests fail. |
Member
Author
|
Fixed the issues in the doc and in |
JeanKossaifi
requested changes
Mar 27, 2025
Member
JeanKossaifi
left a comment
There was a problem hiding this comment.
Thanks @dhpitt, this fixes serialization issue.
I'd add a function though, e.g. get_nonlinearity instead of indexing the dictionary nonlinearity_modules[non_linearity]. The function can still internally use the dict but we can at least catch the KeyError and print a useful message to user.
Member
|
Looks good to me, thank you @dhpitt ! |
Closed
Member
|
Was this ready to merge @dhpitt ? |
Member
Author
|
No, this was pending some kind of fix to the sub module saving procedure
…On Wed, Jul 2, 2025 at 4:59 AM Jean Kossaifi ***@***.***> wrote:
*JeanKossaifi* left a comment (neuraloperator/neuraloperator#563)
<#563 (comment)>
Was this ready to merge @dhpitt <https://github.com/dhpitt> ?
—
Reply to this email directly, view it on GitHub
<#563 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJWQJOBYDUMNTN2ZHESD4NT3GONPTAVCNFSM6AAAAABZRB6HHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMRXGAZTSOBQHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Member
|
@dhpitt getting back to this, do you remember what still needed to be done here? |
Member
Author
|
Yes, the UQNO wouldn't properly serialize. I sent a stub to reproduce the
issue and we were deciding whether to change the basemodel interface
…On Tue, Sep 9, 2025 at 6:05 AM Jean Kossaifi ***@***.***> wrote:
*JeanKossaifi* left a comment (neuraloperator/neuraloperator#563)
<#563 (comment)>
@dhpitt <https://github.com/dhpitt> getting back to this, do you remember
what still needed to be done here?
—
Reply to this email directly, view it on GitHub
<#563 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJWQJOCTERRDDJVDQQMSC3T3R2Q75AVCNFSM6AAAAABZRB6HHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENRZHEZDCMJZHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.