Add golden-output regression test for feature engineering - #194
Merged
Conversation
… golden snapshot) Agent-Logs-Url: https://github.com/ch55secake/hyperion/sessions/ee73702d-5f4c-49dc-b185-845c802d3c72 Co-authored-by: ch55secake <87881861+ch55secake@users.noreply.github.com>
Owner
|
@copilot run ruff format . |
Agent-Logs-Url: https://github.com/ch55secake/hyperion/sessions/9acac620-170c-4a5e-b3c3-2711703b0835 Co-authored-by: ch55secake <87881861+ch55secake@users.noreply.github.com>
Contributor
Author
Done — |
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.
Description
Existing feature tests only validated shape and column presence — silent value regressions (wrong window, off-by-one, incorrect column wiring) would pass undetected. This adds three complementary test classes that assert on computed values directly.
Changes in this pull request
TestKnownInputSanitytotest_feature_engineering.py: constant-price OHLCV input (all prices = 100) where all SMA/EMA/WMA/HMA ≈ 100, ATR = 0, and Momentum_n = 0TestCrossIndicatorConsistencytotest_feature_regression.py: verify FE output matchesti.xxx().shift(1)directly for SMA_10, ATR, RSI, and Momentum_5TestGoldenOutputtotest_feature_regression.py: hard-coded last-5-row snapshot for 10 key features (seed=42, n=50) to catch silent value regressionsruff format .to ensure consistent code style