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

Add SSF method #727

Merged
merged 6 commits into from
Dec 14, 2024
Merged

Add SSF method #727

merged 6 commits into from
Dec 14, 2024

Conversation

anwai98
Copy link
Contributor

@anwai98 anwai98 commented Oct 8, 2024

Superseeds #726.

Hi @caroteu,
Thanks for adding the method.

I gave it a refactor so that we avoid adding components to PEFT_Sam and rely on surgery classes for implementing peft methods. And in general for PEFT methods in future, we should rely on performing all updates via surgery classes and keep the minimal design of the peft sam functionality.

There's also a major issue anyways (observed this in your PR, tried to take a look at it, couldn't manage to find out what's going on), but the SSF method does not work atm (i.e. this can be easily checked with the change in parameters when we freeze the image encoder vs SSF - the parameter count is the same + there are no parameters which expect gradient updates, which is not supposed to be the case as we update the scale and shift parameters).

I suggest you take over and see if you can figure out the issue.

(In case you figure out something, create a PR from the remote at https://github.com/computational-cell-analytics/micro-sam to the branch add-ssf - this would help us develop over PRs together)

Let me know if you have any questions.

@anwai98 anwai98 changed the title Add ssf Add SSF method Oct 8, 2024
caroteu and others added 2 commits October 15, 2024 23:16
Fixes SSF implementation - scale and shift parameters now seem to be working as expected
---------

Co-authored-by: Anwai Archit <[email protected]>
@anwai98 anwai98 marked this pull request as ready for review October 28, 2024 06:31
@anwai98
Copy link
Contributor Author

anwai98 commented Dec 4, 2024

This seems to work now. I think we can merge this as our experiments are in place for this method.

cc: @constantinpape

@constantinpape
Copy link
Contributor

I had to fix some merge conflicts, will merge once the tests pass.

@constantinpape constantinpape merged commit 98c4b07 into dev Dec 14, 2024
3 checks passed
@constantinpape constantinpape deleted the add-ssf branch December 14, 2024 16:49
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.

3 participants