fix/embedding unique obs names#476
Draft
srivarra wants to merge 2 commits into
Draft
Conversation
EmbeddingWriter wrote stores with duplicate obs_names: write_on_epoch_end concatenated per-batch index frames without ignore_index, so the positional index restarted each batch (0,1,..,0,1,..) and those labels became obs_names. Consumers worked around this with scattered obs_names_make_unique() calls, which only dedupe a single store and break once N stores are ad.concat'd. obs_names is never referenced directly (cell identity lives in the obs columns), so make it an opaque, globally-unique handle: a random uuid4 per observation, assigned at the single creation site. Stores stay unique within and across any number of concatenated stores. Also pass ignore_index=True at the per-batch concat to drop the duplicate intermediate index. Refs #475 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
EmbeddingWriter now assigns unique uuid obs_names at the source, so the per-consumer obs_names_make_unique() calls are dead no-ops. Remove all nine across the mmd, linear-classifier, and pseudotime code paths. Refs #475 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
No description provided.