Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Support tuning any model and extend LSTMModel in docs to support multi-target datasets #1449

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

svnv-svsv-jm
Copy link

Description

This PR fixes my own issues:

It allows to tune "any" model, generalizing the optimize_hypetparameters function from TemporalFusionTransformer model, and it also add a "better" LSTMModel than the one shown in the documentation, which I tried to use on a multi-target dataset without success. My version does work on multi-target datasets, thanks to an extension to AutoRegressiveBaseModel.

My version of AutoRegressiveBaseModel inherits from the original to override a couple of methods. I should've probably just edited the original, but I'd like to hear your feedback before doing that. I'm also sure there was a simpler way for AutoRegressiveBaseModel to work with multi-target data. When I tried to just run the Documentation's example of LSTMModel but on a multi-target dummy dataset, it just did not work out of the box.

Checklist

Make sure to have fun coding!

@svnv-svsv-jm svnv-svsv-jm changed the title init Support tuning any model and extend LSTMModel in docs to support multi-target datasets Nov 22, 2023
@svnv-svsv-jm
Copy link
Author

What's blocking this?

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@svnv-svsv-jm
Copy link
Author

I don't understand why the docs test fails (I haven't changed anything there) and why the Black test fails if I ran black and on my machine black --check . returns:

>> black --check .
All done! ✨ 🍰 ✨
54 files would be left unchanged.

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2024

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (b3fcf86) 90.19% compared to head (652a4c1) 89.96%.
Report is 8 commits behind head on master.

Files Patch % Lines
pytorch_forecasting/models/_base_autoregressive.py 77.46% 16 Missing ⚠️
pytorch_forecasting/models/tuning.py 85.43% 15 Missing ⚠️
pytorch_forecasting/data/timeseries.py 0.00% 3 Missing ⚠️
pytorch_forecasting/models/lstm.py 98.83% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1449      +/-   ##
==========================================
- Coverage   90.19%   89.96%   -0.23%     
==========================================
  Files          30       33       +3     
  Lines        4724     4985     +261     
==========================================
+ Hits         4261     4485     +224     
- Misses        463      500      +37     
Flag Coverage Δ
cpu 89.96% <86.79%> (-0.23%) ⬇️
pytest 89.96% <86.79%> (-0.23%) ⬇️

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.

@fkiraly fkiraly changed the title Support tuning any model and extend LSTMModel in docs to support multi-target datasets [ENH] Support tuning any model and extend LSTMModel in docs to support multi-target datasets Sep 30, 2024
@fkiraly fkiraly added the enhancement New feature or request label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants