-
Notifications
You must be signed in to change notification settings - Fork 723
[ENH] Add predict to v2 models
#1984
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1984 +/- ##
=======================================
Coverage ? 86.31%
=======================================
Files ? 162
Lines ? 9594
Branches ? 0
=======================================
Hits ? 8281
Misses ? 1313
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| Configs to initialise ``lightning.Trainer``. Defaults to {}. | ||
| datamodule_cfg : Union[dict, str, Path], optional | ||
| Configs to initialise a ``LightningDataModule``. | ||
| - If dict, the keys and values are used as configuration parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor formatting issue: please have newlines around bullet point lists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for poiniting it out. I will make the changes to the PR soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extremely neat!
I like the design, and I think this is brilliantly done!
Some questions and requests:
- could you write a summary for the PR?
- could you add a vignette somewhere in a notebook or an "examples" section? I think this is crucial to have a full review.
- can you explain how or why the test configs can be replaced by a single test vignette?
- design questions: why are
fitandpredictkwargs there and not in__init__? Have you thought about this?
|
Hello there! I like the prediction callback, it is easy to read and fits in the whole architecture! I have 2 comments: THX! |
Sorry, I did not understand the question, can you please rephrase it?
Well But the usage of kwargs is still not mature enough, mainly these are added to provide a little more flexibility to the usage of |
I totally agree! I think this was added because the scaling was not present at D2 level when this model was implemented and we needed scaling here for some reason? (@PranavBhatP please correct me if I am wrong here). Anyways, I think #1983 will solve this issue to some extent.
Well a lot of work is done by
I am not quite clear about this right now, can you please elaborate your idea here? I agree we need temporal info in the output, but as numpy... I am not sure about it (how and why should we have numpy here?). I need some time to bring all the thoughts together! |
|
I will add the summary of the complete PR and add the example vignette to the notebooks as well. I just need some time, sorry, I got busy with some other things :) |
The
This is consequential though - also think about composite models where |
|
The main change to About the
True, I didnot think about this issue :) |
Yes, I also think we should someday have a meet and discuss about some things! |
Ok, that is good news - if you vouch for this being 1:1 (except for
I think that is the main reason for not having |
This PRs adds the
predictfunction and related functionality to v2Fixes #1883
PredictCallbackBase_pkgclass andpredictwrapperpredictpandas)ymlfile reading for cfgs (similar topytorch-tabular)Summary of changes:
Added
Base_pkgacts as a base class formodel_pkgclasses which wrap thefitandpredictmethods of the model layer and also acts as "fixture containers" for test coverage.trainer, model object, datamodules, and dataloaders (when calledfitorpredict)TimeSeriesclasses from data_scenarios which are used by test fixtures to create datamodules for different data_scenarios (inget_test_dataset_frommethod)Added
PredictCallbackwhich is used by thepredictofBaseModelto perform predictions based on different modes (raw,predict,quantile).Updated
BaseModelto havepredictfunction which perform predictions usingPredictCallback.Updated the
pkg(ormodel_pkg) classes to usedBase_pkg._get_test_datamodule_frommethod from the classes as the data modules are now created using theBase_pkg'spredictandfitfunctions.get_datamodule_clswhich returns the datamodule a model is compatible with -tsliborEncoderDecoder.Updated
_integrationfunction to reduce the workload of creatingtrainerobject as that also happens inside theBase_pkgclass and to usepredictandfitfunctions ofpkgclass.