Repository navigation
Conversation
Test CoverageTotal: 74.96% (21214 / 28300 lines)
|
Logiquo
force-pushed
the
feat/seq-v2-3
branch
from
October 30, 2026 12:08
36e1e0f to
fbf16a2
Compare
SequenceEmbeddingModel embeds the packed records of every sequence_v2 field of a batch, level by level: one nn.Embedding per token namespace (<pad> embeds to zeros) and a linear projection of the values, concatenated. Offsets and times are passed through, so models can encode the hierarchy bottom-up. - embedding_dim takes one LevelEmbedding per level and field. - flatten_spatial keeps spatial value axes (e.g. ECG samples) apart and projects at each position. - pretrain initializes token namespaces from text-vector files (PretrainedEmbedding). - mask="concat" projects a level's values together with its missing indicators. - An empty numeric level embeds to an empty [0, D] tensor.
Logiquo
force-pushed
the
feat/seq-v2-3
branch
from
October 30, 2026 12:40
fbf16a2 to
8bc5b4f
Compare
This branch has not been deployed
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.
Third PR in the stack toward a unified sequence representation, on top of #1347. It adds
SequenceEmbeddingModel, the embedding building block for models overSequenceProcessorV2fields.Changes
SequenceEmbeddingModelembeds the packed records of everysequence_v2field of a batch, level by level. A record's embedding is onenn.Embeddingper token namespace (<pad>embeds to zeros) and a linear projection of its values, concatenated. Offsets and times are passed through, so models can encode the hierarchy bottom-up.embedding_dimtakes oneLevelEmbeddingper level and field.flatten_spatialkeeps spatial value axes (e.g. ECG samples) apart and projects at each position.pretraininitializes token namespaces from text-vector files (PretrainedEmbedding).mask="concat"projects a level's values together with its missing indicators.pyhealth.models, with an API page.