Add explicit producer observation metadata - #337
Open
AlexanderFengler wants to merge 3 commits into
Open
Conversation
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
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.
Purpose
Add a small, out-of-band descriptor API for producer observation schemas. This lets a
consumer inspect semantic observation width and per-field domains before simulation,
without changing any simulator result, registered model, HSSM wrapper, or downstream
consumer.
Scope
validate_observation_metadata(...)for explicitly declared producer metadataget_observation_metadata(...)for explicit mappings and annotated callablesobservation_schema_versionobservation_schemaobs_dimlegacy_rt_choiceprofile only when both the profile and exactcategorical
choicesare declaredfloating-dtype representability checks on actual result arrays
ssms.basic_simulatorsThe descriptor is not simulator-result metadata. Existing result metadata remains an
open producer-extension mapping, and no keys are added to or removed from it here.
Fail-closed behavior
The accessor never executes a callable and never infers a schema from
obs_dim,nchoices, result keys, sampled values, tags, simulator identity, or a dummy RT.Callable legacy
.obs_dimis deliberately ignored: semantic descriptor width comes fromthe schema and does not rewrite the existing HSSM compatibility attribute.
Verification
ruff check .ruff format --check .git diff --checkDeferred
SimulatoradoptionModelConfig/AssembledModeladoptionThose remain separate stacked PRs so this root stays reviewable. There are no dependency,
lockfile, simulator-output, or default-behavior changes in this PR.