Repository navigation
Exclude padded time steps from WAPE evaluation - #2
Open
sushan5140 wants to merge 1 commit into
Open
sushan5140 wants to merge 1 commit into
sushan5140 wants to merge 1 commit into
Conversation
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
ConTSG passes each sample's valid sequence length to the metric runner in both fresh and cached evaluations. WAPE currently sums over the padded tensor. For a reference of
[2, 0], a prediction of[2, 99], andts_len=[1], the score is 4,950% on the current code and 0% with this patch.Change
Select positions where the time index is below
ts_lenbefore computing absolute errors and reference magnitudes. Both WAPE sums use the same valid positions, including when padding contains NaN or infinity. Batches without lengths use the full time axis. A zero valid denominator still yields NaN.Validation
python -m pytest tests/eval/test_wape.py -q -o addopts=went from 4 passing and 7 failing to 11 passing. This includes fresh evaluation and cache-only replay through the real evaluator and metric runner, with a deterministic CPU model fixture and Euclidean distance as a control.git diff --checkpassed.Validation used synthetic CPU inputs. Benchmark datasets, trained checkpoints, and published scores were outside this validation.