Closed wfondrie closed 5 months ago
Attention: Patch coverage is 94.65241%
with 10 lines
in your changes are missing coverage. Please review.
Project coverage is 96.13%. Comparing base (
bd2861f
) to head (38287c9
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks a lot @bittremieux! It turns out a missed a lot of documentation and you caught at least two potential bugs 🎉
Sorry the update has so many new changes - Ruff updated and apparently added another rule to the autoformatting.
I'm going to go ahead and merge so I can build atop this. @bittremieux, if there's anything else please let me know and I'll address it in a fresh PR!
This PR makes some pretty large API changes, but provide a lot more flexibility than before.
Changed
PeptideTransformer*
is nowAnalyteTransformer*
to reflect support for small molecules as well.PeptideDataset
was renamedAnalyteDataset
.forward()
methods for the Transformer modules have been updated to with additional keyword arguments. This enables BERT-style masking for training and such.global_token_hook()
method. This can be overwritten in a subclass to customize how a global token (the first element of the sequence) is created using the*args
and**kwargs
provided in the forward methods.Added
MoleculeTokenizer
.PeptideIonTokenizer.calculate_precursor_ions()
method is fully PyTorch, so it should be efficient for use during model training and inference. (see https://github.com/Noble-Lab/casanovo/pull/269)Next PR will be docs!