[MNT] Improve coverage of test framework for ptf-v2 and fix TiDE categorical embedding bug - #2345
Open
harshsomankar123-tech wants to merge 5 commits into
Open
Conversation
…orical embedding bug
harshsomankar123-tech
force-pushed
the
improve-test-coverage-v2
branch
from
July 16, 2026 13:13
5b56e2c to
c58a5ee
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2345 +/- ##
=======================================
Coverage ? 87.60%
=======================================
Files ? 171
Lines ? 10157
Branches ? 0
=======================================
Hits ? 8898
Misses ? 1259
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
harshsomankar123-tech
marked this pull request as ready for review
July 16, 2026 17:31
harshsomankar123-tech
requested review from
benHeid,
fkiraly,
jdb78 and
phoeenniixx
as code owners
July 16, 2026 17:31
Contributor
Author
|
@phoeenniixx @fkiraly could you please take a look! |
phoeenniixx
requested changes
Aug 11, 2026
phoeenniixx
left a comment
Member
There was a problem hiding this comment.
Thanks!
This is a difficult task! Actually i was thinking of adding scenario classes and updating the test framework in a similar way as in sktime.
(also the tests are failing)
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.
Reference Issues/PRs
Fixes #2328.
What does this implement/fix? Explain your changes.
This PR increases the test coverage of the V2 testing framework by introducing new data scenarios, parameterizing integration tests, adding validation-check tests, and resolving a categorical embedding bug in the TiDE V2 model.
Specifically:
make_datasets_v2_without_covariatesto verify estimator behaviors on datasets containing only targets and group IDs without any covariates.make_datasets_v2_with_categoricalsto verify estimators handling categorical features alongside continuous features.test_all_estimators_v2.pyacross three data scenarios:with_covariates,without_covariates, andwith_categoricals.test_uninitialized_predict_errorto assert that calling.predict()on an uninitialized model correctly raises aRuntimeError.test_predict_save_to_dirto assert that calling.predict()with anoutput_dirsuccessfully saves the prediction dictionary to apredictions.pklfile.TslibDataModuleandEncoderDecoderTimeSeriesDataModulemetadata builders to compute and include"categorical_cardinalities"(derived from the dataset's unique values/max values).TIDEmodel constructor to automatically resolve categorical cardinalities from the datamodule metadata whenembsis not explicitly provided. This prevents theIndexErroron categorical feature embedding projection.What should a reviewer concentrate their feedback on?
"categorical_cardinalities"metadata propagation insideTslibDataModuleandEncoderDecoderTimeSeriesDataModule.TIDE.__init__that dynamically maps these cardinalities into embedding dimensions whenembsis not explicitly supplied in model configuration.Did you add any tests for the change?
Yes:
with_covariates,without_covariates, andwith_categoricals).test_uninitialized_predict_errorandtest_predict_save_to_dircheck cases intest_all_estimators_v2.py.Any other comments?
All V2 estimators (DLinear, TimeXer, TFT, TiDE) were verified to pass the integration and validation test suites successfully (201 total tests passed).
PR checklist
pre-commit install.To run hooks independent of commit, execute
pre-commit run --all-files