Sync DistanceMetrics docstrings with the actual signature and returns#93
Open
lonexreb wants to merge 1 commit intoNVlabs:mainfrom
Open
Sync DistanceMetrics docstrings with the actual signature and returns#93lonexreb wants to merge 1 commit intoNVlabs:mainfrom
lonexreb wants to merge 1 commit intoNVlabs:mainfrom
Conversation
src/alpamayo_r1/metrics/metric_api.py has two docstring drift bugs in DistanceMetrics that mirror the pattern PR NVlabs#86 fixed in distance_metrics.py / metric_utils.py: 1. DistanceMetrics.__init__ documents a `group_by_scenarios` parameter that does not exist in the signature (signature only has `prefix` and `time_step`). Replace the dead parameter entry with a real description of `time_step`, which has been undocumented since it was added. 2. DistanceMetrics.evaluate's Returns block lists `min_ade_sq` and `corner_distance_sq` (the "_sq" keys) which are never produced -- the body only emits `min_ade`, `min_ade/by_t={H:.1f}`, `ade`, `ade/by_t=3.0`, `corner_distance`, plus `_std` variants from summarize_metric when `num_traj_sets > 1`. The current docstring also omits all of `ade*` and `*by_t*` keys entirely. Pure docstring change. No code logic touched. Verification: the new keys exactly match the body's `metric_dict.update` calls (lines ~232, ~241, and the return of compute_grouped_corner_distance). Signed-off-by: lonexreb <[email protected]>
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.
Problem
Two docstring drift bugs in
DistanceMetrics(src/alpamayo_r1/metrics/metric_api.py) — same pattern that #86 already fixed for the lower-level functions indistance_metrics.py/metric_utils.py.1. Phantom
group_by_scenariosparameter on__init__The signature has only
prefixandtime_step.group_by_scenariosis documented but does not exist — likely a leftover from an earlier API. Worse,time_step(which is the actual second parameter and matters for the per-horizon keys) is undocumented.2.
_sqkeys inevaluate()Returns block that are never returnedThe body only emits
min_ade,min_ade/by_t={H:.1f},ade,ade/by_t=3.0,corner_distance, plus_stdvariants fromsummarize_metricwhennum_traj_sets > 1. The_sqkeys exist nowhere; theade*andby_t*keys (which are the bulk of the actual output) are completely undocumented.Fix
Pure docstring change. No code logic touched.
group_by_scenariosentry with an accurate description oftime_step.Returnsblock to list every key the body actually emits, mirror the format used in Sync metric docstrings with the keys actually returned #86 forcompute_minade, and call out that all keys are prefixed viaapply_prefix(self.prefix, ...).Verification
The new key list matches the body's
metric_dict.update(...)calls (around lines 232 forade, 241 forade/by_t=3.0, and the return ofcompute_grouped_corner_distanceforcorner_distance).