Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ColumnSpec maps flat and nested numeric catalog columns to tensors. resolve() validates against catalog meta (nested sub-column dtypes come from NestedDtype.column_dtypes) without computing data, and reports every problem at once. Nested columns are zero-padded to the batch maximum with a mask and lengths, vectorized via nest.len() and nest.to_flat(), with optional max_length truncation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ModelDeployment registers a WorkerPlugin that builds the model once per Dask worker from a ModelSpec (factory + state dict path, or an in-memory module), in eval mode on a device resolved on the worker. predict() maps each partition in order with task-local state and attaches predictions by position, so output stays aligned with input even for duplicate _healpix_29 values. OutputSpec builds the output meta and checks every batch's output shape and row count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trimmed design covering only what this branch ships (column spec and inference), with deferred items pointing to the full design. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #9 +/- ##
===========================================
- Coverage 100.00% 95.99% -4.01%
===========================================
Files 2 10 +8
Lines 7 474 +467
===========================================
+ Hits 7 455 +448
- Misses 0 19 +19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dougbrn
commented
Oct 15, 2026
| - output keys don't collide. | ||
|
|
||
| Every problem is reported in one `SpecError`. | ||
| - **Nested representation: zero padding with a mask.** Each batch is padded to its longest |
Collaborator
Author
There was a problem hiding this comment.
Padding here seems questionable, it's not padded globally, but per batch.
dougbrn
commented
Oct 15, 2026
Inputs are now plain catalog column names: flat columns by name and
nested sub-columns by LSDB's dotted names ('lc.flux'). Flat vs nested
and dtypes are read from catalog meta, checked before any data is
read, and dry-run on the empty meta frame. Batches are keyed by those
names; each nested column contributes a shared '<column>._mask' and
'<column>._lengths'. The model receives the batch dict, or a
forward(model, batch) adapter for positional models. Data preparation
is left to ordinary LSDB operations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both accept a single value for every nested input or a mapping keyed by nested column name, for multi-modal catalogs with several light curve and spectrum columns. Keys are column names rather than dotted sub-column names because sub-columns share one mask; unknown keys, dotted keys and invalid values are reported with the other input problems before any data is read. Co-Authored-By: Claude Opus 5.5 <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.
Change Description
MVP of the initial design: column spec + inference only. Training is deferred to a follow-up. Design: docs/design/initial-design.md (design PR).
Includes
docs/design/mvp-design.md, a trimmed design covering only what this PR ships; the full design (including training) is on thedesign/initial-designbranch.Solution Description
lsdb>=0.11andtorch>=2.4as core dependencies.ColumnSpec/Flat/Nested: maps numeric flat and nested catalog columns to tensors.resolve()validates against catalog meta (nested sub-column types viaNestedDtype.column_dtypes) without computing data, reporting every problem at once. This replaces the hand-built column preview from hyrax#1062.<key>_maskand<key>_lengths, vectorized, with optionalmax_lengthand head/tail truncation. Empty or null nested rows have length 0. Missing values raise.predict(catalog, model, spec, outputs)/ModelDeployment: a Dask WorkerPlugin builds the model once per worker from aModelSpec(factory + state-dict path, or an in-memory module), ineval()mode on a device resolved on the worker (default "cpu", "auto" opt-in). Returns a lazylsdb.Catalogwith correctmeta. Requires adask.distributedClient._healpix_29. Row counts are checked per batch.docs/examples/predict_on_catalog.py.Tests: spec validation (including a no-compute guard), collation against a per-row reference, alignment after a filter that empties partitions plus reordering, duplicate
_healpix_29values, one model build per worker, meta dtypes matching computed data, and failure modes. A deliberately reversed batch order makes the alignment tests fail.Deferred from the fuller branches: transforms,
pad_to/pad_value, null filling, dict outputs, no-client mode, and all of training.Note: CI only triggers on
main, so this PR gets no CI untildevis added to the workflow triggers (design doc §12).🤖 Generated with Claude Code