Generalize make_txt_embedding{,_json}.py#56
Open
NetZissou wants to merge 3 commits into
Open
Conversation
`make_txt_embedding.py:` - Add PRESETS dict (bioclip-2, bioclip-2.5-vith14) and --preset CLI flag - Add --model / --tokenizer / --embed-dim CLI flags for arbitrary models (e.g. BioCAP, future BioCLIP releases) - Replace hardcoded model_str/tokenizer_str/768 with parameterized values - Add Usage / Examples block to the module docstring `make_txt_embedding_json.py`: - Add drop_corrupted_rows() that removes rows whose any taxonomic rank matches an ISO-8601 timestamp or the literal string 'true' / 'false' - Filter is on by default; --no-corruption-filter reproduces the pre-existing upstream behavior used for BioCLIP 2 taxon JSON generation Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
egrace479
reviewed
May 29, 2026
Member
There was a problem hiding this comment.
A couple consistency notes.
I think we may want the default behavior to be no-corruption-filter since that wouldn't change existing outputs; it's probably better not to 'quietly' do extra filtering. We should watch for these items in future catalog iterations.
The newest catalog is the only one with the ISO and boolean issues, so this change will not impact any existing text embeddings. As such, the default to remove such entries is fine, especially since it print a statement about their removal.
Co-Authored-By: Elizabeth Campolongo <egrace479@users.noreply.github.com>
Contributor
Author
|
@egrace479 reverted to ab54735 |
egrace479
reviewed
May 29, 2026
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
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.
make_txt_embedding.py:make_txt_embedding_json.py: