[DOC] Add model usage examples (v2) - #2408
Open
ramanbansal1 wants to merge 1 commit into
Open
Conversation
ramanbansal1
requested review from
benHeid,
fkiraly,
jdb78 and
phoeenniixx
as code owners
September 3, 2026 18:43
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2408 +/- ##
=======================================
Coverage ? 88.20%
=======================================
Files ? 200
Lines ? 11170
Branches ? 0
=======================================
Hits ? 9852
Misses ? 1318
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
requested changes
Sep 5, 2026
phoeenniixx
left a comment
Member
There was a problem hiding this comment.
Thanks @ramanbansal1!
But if you look at the issues #2407 and #2377, we are planning to make some changes to the API, so these examples will be overridden very soon.
That is why I would suggest working on v1 examples for now
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
Related to: #2377
What does this implement/fix? Explain your changes.
This PR adds doctest-style usage examples to the v2 package classes for stable v2 models. The examples are minimal, CI-compliant docstrings that demonstrate the recommended high-
level package interface for the v2 API, helping users quickly adopt the new architecture.
• Added docstring usage examples for v2 package classes:
• Each example contains:
• Examples are CI-ready:
What should a reviewer concentrate their feedback on?
• Examples correctness:
• CI compliance:
• API consistency:
• Documentation quality:
Did you add any tests for the change?
Any other comments?
• The v2 API is still experimental (users see warnings when importing TimeSeries and DataModule classes), but these examples follow the current stable v2 patterns.
• Examples use minimal synthetic data to avoid external dependencies and ensure they work in CI environments without Lightning.
• The package-level interface (model_cfg, trainer_cfg, datamodule_cfg) is the recommended way to use v2 models, as demonstrated in these examples.
• Future work could add similar examples to the corresponding model classes (_v2.py files) in addition to the package classes.
PR checklist
• [x] The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. ([DOC])
• [ ] Added/modified tests
• [ ] Used pre-commit hooks when committing to ensure that code is compliant with hooks. Install hooks with pre-commit install . To run hooks independent of commit, execute p
re-commit run --all-files