Repository navigation
[DOC] Add usage examples for TimeXer and TemporalFusionTransformer - #2444
Merged
phoeenniixx merged 2 commits intoOct 4, 2026
Merged
Conversation
Towards sktime#2377. These are the two remaining v1 models without a runnable Examples section.
atharva-mashalkar
requested review from
benHeid,
fkiraly,
jdb78 and
phoeenniixx
as code owners
October 3, 2026 12:44
NumPy docstring order puts Examples last.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2444 +/- ##
=======================================
Coverage ? 88.81%
=======================================
Files ? 218
Lines ? 11671
Branches ? 0
=======================================
Hits ? 10366
Misses ? 1305
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:
|
phoeenniixx
approved these changes
Oct 4, 2026
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
Towards #2377 (adds the remaining v1
TimeXerandTemporalFusionTransformeritems).What does this implement/fix? Explain your changes.
Adds a runnable
Examplessection to theTimeXerandTemporalFusionTransformerclass docstrings, in NumPy docstring style, following the mergedxLSTMTimeexample: toyTimeSeriesDataSet,from_dataset(...), afast_dev_runCPUTrainer, andpredict.TimeXeruses encoder length 16 andpatch_length=8so the context length is a multiple of the patch length.The TFT class docstring already documents
Parameters, so itsExamplessection is placed after that section.What should a reviewer concentrate their feedback on?
TimeXerencoder length andpatch_lengthTemporalFusionTransformerhidden_size,attention_head_size, andhidden_continuous_sizeDid you add any tests for the change?
No new tests; the examples are exercised by
TestAllPtForecasters.test_doctest_examples.Ran locally:
pytest --doctest-moduleson both model files (passed).PR checklist
pre-commit run --files)