Skip to content
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

Fix loading IntervenableModel for its subclasses #49

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Conversation

PinetreePantry
Copy link
Collaborator

Fix issue #45
One way is to replicate Pyvene's load() function in Pyreft. That is not great, because later if we modify Pyvene's load(), Pyreft()'s load() could be left behind.
Other way is to replicate all parameters of Pyvene's intervenable_model, which is what this PR does.

@frankaging
Copy link
Collaborator

Hey @PinetreePantry can you check memory overhead? please make sure this is only assigning pointers and creating another object (doubles the memory)

@PinetreePantry
Copy link
Collaborator Author

I think we are okay. We are not performing any large copies here, just pointing all the variables in the new class to the old class. The IntervenableModel object is being thrown away anyway after the load.

@frankaging frankaging merged commit 47d8fcb into main Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants