Repository navigation
Conversation
Change map
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: NVIDIA/kumo-engine/.coderabbit.yaml
- Review profile: QUIET
- Plan: Enterprise
- Run ID:
27abe888-d440-4212-bd1a-b59a2746c5b0
📒 Files selected for processing: 4
packages/kumo-core/src/kumo_core/sources/object_store_sessions.pypackages/kumo-engine/kumo/engine/_provenance.pypackages/kumo-engine/kumo/engine/graph.pypackages/kumo-engine/test/test_snapshot_manifest.py
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments: 1
packages/kumo-engine/kumo/engine/graph.py: 1
269-269: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winTrack backfill warnings only after a backfill failure.
If a fresh manifest write fails, Line 269 adds its path to
_warned_backfill. If the index is later reused and its backfill also fails, the backfill failure produces no warning. Add the path to this set only whenfreshis false.Proposed change
if fresh or path not in _warned_backfill: - _warned_backfill.add(path) + if not fresh: + _warned_backfill.add(path) warnings.warn(
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: NVIDIA/kumo-engine/.coderabbit.yaml
- Review profile: QUIET
- Plan: Enterprise
- Run ID:
fec48a97-da42-43cd-9e74-6708ef97c388
📒 Files selected for processing: 4
packages/kumo-engine/kumo/engine/_manifest.pypackages/kumo-engine/kumo/engine/_provenance.pypackages/kumo-engine/kumo/engine/graph.pypackages/kumo-engine/test/test_snapshot_manifest.py
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.
75f9e80 to
a748d54
Compare
aaron-kumo
left a comment
There was a problem hiding this comment.
The separation between snapshots, model bundles, and explicit scoring inputs looks sound. My main concern is preserving enough information now for future restoration, freshness, and compatibility checks. We can defer those policies, but information omitted from today’s artifacts will be difficult to recover later.
P2 — Record the DiskGraph producer version/build.
environment() records engine, core, Torch, and Python versions, but omits the DiskGraph package that actually writes the index. Format constants identify the declared storage formats, but cannot distinguish implementations with different behavior or fixes under the same format version. Please record the installed DiskGraph version and a build identifier when available. This should be diagnostic provenance; package-version differences should not automatically imply incompatibility.
Discussion — Should the artifact retain the Custom SQL definition?
Could we retain literal SQL alongside its fingerprint, with an explicit option to omit/redact it for distribution? The product already persists literal SQL in table definitions and exposes it through SDK objects and generated scripts. Hash-only storage introduces a more restrictive policy here and loses the ability to inspect transformations, explain changes, or reconstruct the source definition.
SQL can contain sensitive literals or business logic, so an explicit retention policy makes sense. Is there a specific sharing or privacy requirement driving unconditional omission? If not, I’d favor retaining the SQL, dialect, resolution namespace, and referenced tables. The exact-text fingerprint and normalized-query fingerprint should also have distinct purposes; the existing Custom SQL identity already uses normalization.
Discussion — Can source identity and version evidence be structured before publication?
Could we preserve a credential-free source descriptor and typed version evidence rather than only {connector, location, version}? For example, a Snowflake table coordinate needs account context, and an actual source version, a metadata timestamp, and an hour-bucket fallback have different guarantees.
For Custom SQL, the version calculation already gathers dependency versions and folds in a staleness bucket. Could those components be retained alongside the resulting hash? Otherwise future freshness checks cannot explain whether the query, a dependency, or only the bucket changed.
I’m not suggesting implementing every comparison now. A small versioned representation that retains the evidence—including observation time, fallback status, and observed versus reconstructed provenance—would leave those decisions open.
Discussion — Should publication offer a metadata-completeness requirement?
Best-effort manifest writing seems appropriate for preserving existing local snapshot() behavior. Should export/publication optionally require complete provenance, though? Otherwise a newly created snapshot whose manifest write failed can become a durable artifact without the evidence needed for future compatibility checks. Legacy artifacts could remain supported with an explicit incomplete-provenance state.
|
P2 — Record the DiskGraph producer version/build. Discussion — Should the artifact retain the Custom SQL definition? Your two remaining points, both in 60e1ab6:
Discussion — Can source identity and version evidence be structured before publication? Discussion — Should publication offer a metadata-completeness requirement? CodeRabbit: object-store locations keep their percent-encoding, a |
c354971 to
71fcb43
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed parents Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fit resolves the MLOps settings, runs the new _fit, then stores the bundle; _finish_fit no longer takes settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed snapshot, training table or model store warns by default, as before, and raises with on_error='raise'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ning and explain steps A pure extraction; two comments the step names now say are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Snapshots and training tables no longer get a made-up kumo.<kind>_uri tag; a model keeps kumo.bundle_uri. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Loading moves to Reading artifacts back, scoring to Score, export and load under Reference; lineage and moving snapshots are condensed. on_error is documented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stack: #53 → #112 → #50 → #60 → #64; #114 on #112; #115 on #64. Merge bottom to top.
Summary
Every graph snapshot, training table and model bundle now carries a self-contained
_provenance.jsonthat leads back to the source table versions (and locations, wherever the source backend can name them), query, plan and engine build that produced it. Today a model has no id, an artifact records no lineage, an index works only on the machine that built it, and scoring needs the training job'sGraph.This PR adds
kumo.MLOps/with kumo.mlops(...)to store each artifact once under one artifact root (s3://,gs://, local, or a(connector, path)file store from #112);GraphSnapshot.export/load_from_connectorto move a checksummed index between machines;snapshot.source_changes(graph)to see which tables changed since a snapshot; andTrainer.predict(snapshot)to score a stored snapshot with the trained query.MLOps(on_error='raise')turns a failed store into aRuntimeErrorafter the call finishes. Off unless asked for.Usage
Back-compat
Without a block or
mlops=, existing calls behave as before."reconstructed": true.manifestisNone.verify_model_bundlereturn valueDatabricksConnector(identity=...)identityis now optional (ambient auth).RuntimeErrorinstead, once the call has finished, withMLOps(on_error='raise').Testing
test_snapshot_export.py(round trip, reuse, interrupted and concurrent exports, corrupt markers,source_changes,on_error),test_snapshot_manifest.py,test_training_table_export.py,test_holdout_df.py(published model's holdout, loaded and fetched holdout, empty test split),test_bundle_provenance.py,test_query_from_snapshot.py,test_filestore_sink.py(identical bundle reused),test_mlops.py,test_graph_mismatch.py,test_artifacts.py.test_sink_delete.py; Snowflake, Databricks and BigQuery identity tests assertversion_kind.range_checksums_cover_every_listed_file_and_the_manifest; pybindtest_exception_exports.py.test_snapshot_export_live.py.Change map: see the
kumo-pr-change-mapcomment.🤖 Generated with Claude Code