Skip to content

Conversation

@Pinaka07
Copy link
Contributor

@Pinaka07 Pinaka07 commented Aug 28, 2025

This PR makes the pytorch_forecasting model overview self-updating.

  • Adds a small Sphinx extension (docs/source/_ext/model_overview.py) that
    writes models.rst from registry.all_objects(), including optional model tags
    and links to API docs.
  • Wires the extension in conf.py and keeps a lightweight placeholder
    models.rst which is overwritten at build time.

Benefits

  • No manual updates when models are added/renamed.
  • Consistency with sktime’s estimator overview approach.
  • Safe, fail-soft behavior if imports break (docs still build with a note).

closes #1934

@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@526d1d8). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1958   +/-   ##
=======================================
  Coverage        ?   86.97%           
=======================================
  Files           ?      160           
  Lines           ?     9463           
  Branches        ?        0           
=======================================
  Hits            ?     8230           
  Misses          ?     1233           
  Partials        ?        0           
Flag Coverage Δ
cpu 86.97% <ø> (?)
pytest 86.97% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Pinaka07
Copy link
Contributor Author

@fkiraly can you please tell me why the docs build is failing.

@fkiraly
Copy link
Collaborator

fkiraly commented Aug 28, 2025

unsure, you can see the log here: https://app.readthedocs.org/api/v2/build/29355136.txt

It looks like import failures?

@Pinaka07
Copy link
Contributor Author

@fkiraly Thanks for helping, I think the PR is ready to be merged. Can you please review it ?

@fkiraly
Copy link
Collaborator

fkiraly commented Aug 31, 2025

hmm, seems like it does not work? This is how the file builds:

image

(it is on the doc build job - the "real" docs will look exactly the same if deployed)

@fkiraly
Copy link
Collaborator

fkiraly commented Sep 1, 2025

there are no import failures, I think the page is simply not being overwritten as you intend?

@fkiraly
Copy link
Collaborator

fkiraly commented Sep 5, 2025

hm, I think it still does not work? Have a look at how sktime does this (in docs/conf.py)

@fkiraly
Copy link
Collaborator

fkiraly commented Sep 5, 2025

any ideas how to fix?

@Pinaka07
Copy link
Contributor Author

Pinaka07 commented Sep 7, 2025

any ideas how to fix?

Really sorry @fkiraly, as I was not able to respond. I am learning more about the sktime estimator overview and will update this code in a couple of days.

@fkiraly
Copy link
Collaborator

fkiraly commented Sep 7, 2025

no problem! Looking forward to this, the model overview will be great!

@Pinaka07
Copy link
Contributor Author

Pinaka07 commented Oct 29, 2025

Hi @fkiraly @christy @rustyconover @szepeviktor
I have resolved all the merge conflicts and ran unit tests for the logic verification
image

This PR is now ready for review.
Please review it and suggest modification.

Thank you.

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

  • It seems code formatting and readthedocs (documentation build) are failing - could you kindly look into that?
  • it seems you accidentally committed your venv to the branch, please remove this
  • same for the documentation build, this should not be committed to the repo

Signed-off-by: Pinaka07 <anandsingh.as1996@gmail.com>
@Pinaka07 Pinaka07 force-pushed the docs/auto-model-overview branch from 443bd37 to 7304e07 Compare November 8, 2025 15:47
- Added '.. raw:: html' directive with ':file:' option in model_overview.rst

Signed-off-by: Anand Singh <anandsingh.as1996@gmail.com>
@Pinaka07
Copy link
Contributor Author

Pinaka07 commented Nov 8, 2025

Hey @fkiraly @christy @rustyconover @szepeviktor
After months long effort debugging and testing, I have finally fixed the issue, the table is now auto-generated and is accurate as per issue description, I request you to review my implementation, and suggest changes(if any). The PR is ready to be merged!

Screenshot 2025-11-08 232259 Screenshot 2025-11-08 232329

Copy link
Member

@phoeenniixx phoeenniixx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Work! Thanks!
I want to suggest few points:

  • By looking at the screenshot you shared, the model overview is showing both metrics and the models, is it possible to display only models there and for metrics we have a different table? Ideally, the metrics should be shown in the metrics overview,
  • When I am trying to see the rendering using the CI, I cant see the table and this is what I get instead... Can you please have a look at it
Image

I am assuming there maybe some issue with the font color etc as well but I am not sure

@fkiraly fkiraly added the documentation Improvements or additions to documentation label Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] automated model overview page

3 participants