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

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

Open
wants to merge 14 commits into
base: master
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?

svnv-svsv-jm and others added 8 commits January 3, 2024 20:23
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.104.1 to 0.109.2.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](tiangolo/fastapi@0.104.1...0.109.2)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [torch](https://github.com/pytorch/pytorch) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/main/RELEASE.md)
- [Commits](pytorch/pytorch@v2.1.1...v2.2.0)

---
updated-dependencies:
- dependency-name: torch
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [black](https://github.com/psf/black) from 23.11.0 to 24.2.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.11.0...24.2.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants