-
Notifications
You must be signed in to change notification settings - Fork 366
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
feat: implement Decipher model in external #3015
Conversation
609785f
to
2baf11d
Compare
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3015 +/- ##
==========================================
+ Coverage 84.30% 84.58% +0.27%
==========================================
Files 173 178 +5
Lines 14795 15048 +253
==========================================
+ Hits 12473 12728 +255
+ Misses 2322 2320 -2
|
|
||
# The multiple outputs are computed as a single output layer, and then split | ||
indices = np.concatenate(([0], np.cumsum(self.output_dims))) | ||
self.output_slices = [slice(s, e) for s, e in zip(indices[:-1], indices[1:], strict=False)] |
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.
Can you explain?
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.
this produces slices along the output, which will just be a concatenated version of all outputs needed, so that the output can be separated by the provided input_dims. It's a bit tricky, but I think the comment above serves the purpose
""" | ||
return torch.optim.Adam([self._dummy_param]) | ||
|
||
def optimizer_step(self, *args, **kwargs): |
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.
Are these missing from LowLevelPyroTrainingPlan? Should we add them there?
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.
these are only in the PyroTrainingPlan, not the LowLevelPyroTrainingPlan. Whether we want to push it back into the low-level class is up to you
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.
Please provide more information on what context means and how to use it in the user guide.
CC @ANazaret
Implements Decipher model (https://github.com/azizilab/decipher, https://www.biorxiv.org/content/10.1101/2023.11.11.566719v1) into external/
For now, it only includes base implementation without many of the downstream workflows from the original implementation.
Includes minor non-breaking changes to the
LowLevelPyroTrainingPlan
.Test: was able to approximately reproduce figures from the tutorial (https://github.com/azizilab/decipher/blob/main/examples/1-tutorial.ipynb), some of the v plots for several random seeds below:
Original implementation:
New implementation: