Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the dual modality tokenization functionality as the project has transitioned to contrastive training.
- Removed dual modality test cases and related parameter handling from tests.
- Updated UmeTokenizerTransform in the source to support only single modality inputs and adjusted corresponding documentation.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/lobster/tokenization/test__ume_tokenizers.py | Dual modality tests removed to align with the new tokenization scheme |
| src/lobster/tokenization/_ume_tokenizers.py | Dual modality branch and parameters removed; docstrings and type hints updated for single modality |
Comments suppressed due to low confidence (1)
src/lobster/tokenization/_ume_tokenizers.py:511
- Since dual modality support has been removed, consider removing unused functions such as _encode_no_padding_no_special_tokens and _combine_and_pad to further simplify and clean up the code.
def _encode_no_padding_no_special_tokens(self, item: str | list[str], tokenizer, modality: Modality) -> dict[str, list[int]]:
ncfrey
approved these changes
May 27, 2025
| Examples: "amino_acid", "smiles", "nucleotide", | ||
| or ("amino_acid", "smiles"),... | ||
| modality : ModalityType or str | ||
| Single modality. Examples: "amino_acid", "smiles", "nucleotide", "coordinates_3d" |
…to ume-tokenizer-simplify
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.
We switched from masked pairs to contrastive training and this tokenization scheme is no longer needed