Skip to content

ArtifactOf pydantic integration + registry.extra reorg (0.6.0) - #12

Open
adnanhd wants to merge 5 commits into
mainfrom
feat/artifact-of-extra-reorg
Open

ArtifactOf pydantic integration + registry.extra reorg (0.6.0)#12
adnanhd wants to merge 5 commits into
mainfrom
feat/artifact-of-extra-reorg

Conversation

@adnanhd

@adnanhd adnanhd commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Ships v0.6.0: a pydantic-native ArtifactOf type, a core/extra split for the
observability batteries, and a coverage pass.

Changes

  • ArtifactOf[Registry] (registry.integrations.pydantic): a field or
    @validate_call argument that accepts a live artifact of the registry's
    element type or a config to build, serializes mode-aware (python -> artifact,
    json -> the {type, data, meta} config), and accepts a union of registrars
    (ArtifactOf[A, B]). Its validator threads already-validated siblings
    (info.data) into the build scope, so a $sibling.attr() ref (e.g. an
    optimizer over $model.parameters()) resolves against the live sibling.
  • Core is bus-only: concrete meters (CPU/Memory/IO/Network/Heap/Recursion/
    Lifetime) and reporters (Journal/HTTPDashboard/OpenTelemetry) move to
    registry.extra; the core keeps the attach/detach/emit buses.
  • torch_compat -> examples: the torch demo (state-dict hashing, tensor-shape
    markers, the profiler meter) leaves the shipped package for examples/.
  • Coverage: raised to 85% with tests for the CLI, _version, engines,
    utils, and the validator mixin.

Breaking

  • Concrete meters/reporters import from registry.extra.meters /
    registry.extra.reporters (were top-level).
  • registry.experimental is gone; torch_compat lives in examples/.

Verification

pytest: full suite green except one pre-existing torch-profiler test
(unrelated -- a renamed torch attribute on this Python build).

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 81.87919% with 54 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
registry/extra/reporters.py 62.37% 38 Missing ⚠️
registry/extra/meters.py 89.62% 14 Missing ⚠️
registry/integrations/pydantic.py 96.61% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants