[ENH] add a tag register to the registry #2451
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.40) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 275 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.336
Real PR Conversation Timeline
1 comments
"Review active on #2451"
general
weight: 0.35
phoeenniixx
Reference Issues/PRs
Fixes #2333. Follows up on the review of #2334.
What does this implement/fix? Explain your changes.
Adds a class-based tag register to
pytorch_forecasting/_registry, following the patternsktimeandskprouse, and makes it the single place tag semantics are documented._registry/_tags.pycheck_tag_is_valid(tag_name, tag_value)all_tags(parent_types, return_names, as_dataframe)all_objectsrejects unknownfilter_tagsdocs/source/registry.rst, linked from the v1 and v2 API toctreesEach tag documents its possible values, its default, and what reads it, as asked for in the review of #2334. The same descriptions were previously copied across five places (both template READMEs, both template
_model_pkg.pycomment blocks, the package layer page); all five now point at the register.What should a reviewer concentrate their feedback on?
parent_typeforinfo:pred_typeandinfo:y_type.Did you add any tests for the change?
Yes,
_registry/tests/test_tags.py, 68 cases. Three are worth calling out:test_every_tag_is_documentedtest_every_declared_tag_is_registeredandtest_every_declared_tag_value_is_validtest_metric_type_enum_matches_test_all_metricsandtest_object_type_enum_covers_test_class_registryAny other comments?
Reading each tag's consumers turned up three things
1. The
capability:*family has no defaults, so an omitted tag reads back asNone, notFalse.2.
info:pred_typeis missing from every v2 package andinfo:y_typefrom three, although the v2 template asks for them. The fallback to[]is silent and narrows which losses those models are tested against.TFTForecasterin #2434 has the same gap.3.
info:metric_name,capability:quantile_generationandshape:adds_quantile_dimensionhave no consumer anywhere, including docs and tests.PR checklist