Skip to content

[BUG] fixes correct passing of index in v2 - #2369

Open
phoeenniixx wants to merge 4 commits into
sktime:mainfrom
phoeenniixx:index-bug
Open

[BUG] fixes correct passing of index in v2#2369
phoeenniixx wants to merge 4 commits into
sktime:mainfrom
phoeenniixx:index-bug

Conversation

@phoeenniixx

Copy link
Copy Markdown
Member

Fixes #2367

Adds a new prediction_start_idx to the collate_fn that is returned when return_info has index.

@phoeenniixx phoeenniixx added bug Something isn't working ptf-v2 Related to `pytorch-forecasting` v2 labels Aug 5, 2026
@phoeenniixx

Copy link
Copy Markdown
Member Author

Has to remove index from the cell in the tutorial as previously it was just printing y[1] (a random placeholder, see here). We still need to add some thing like x_to_index of v1, to make this index actually useful. But for now, it is similar to v1, matching group with decoder_idx (see x_to_index).

But this breaks what the cell printed before, as now preds["index"] is a 2d tensor and not 1d. So, i just removed it, it makes no sense there.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@phoeenniixx
phoeenniixx marked this pull request as ready for review August 5, 2026 07:50
@phoeenniixx

Copy link
Copy Markdown
Member Author

The big diff in the tutorial is because I had to rerun the whole nb locally to update the outputs :)

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@033169a). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pytorch_forecasting/callbacks/predict.py 81.81% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2369   +/-   ##
=======================================
  Coverage        ?   87.45%           
=======================================
  Files           ?      175           
  Lines           ?    10175           
  Branches        ?        0           
=======================================
  Hits            ?     8899           
  Misses          ?     1276           
  Partials        ?        0           
Flag Coverage Δ
cpu 87.45% <84.61%> (?)
pytest 87.45% <84.61%> (?)

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

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ptf-v2 Related to `pytorch-forecasting` v2

Projects

Development

Successfully merging this pull request may close these issues.

[BUG] index is not being returned correctly in v2

2 participants