-
Notifications
You must be signed in to change notification settings - Fork 487
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
Meta name bool #997
Meta name bool #997
Conversation
Model Benchmark
|
Codecov Report
@@ Coverage Diff @@
## main #997 +/- ##
==========================================
+ Coverage 89.89% 89.91% +0.01%
==========================================
Files 18 19 +1
Lines 4653 4649 -4
==========================================
- Hits 4183 4180 -3
+ Misses 470 469 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Love the change, thanks for simplifying the implementation!
@alfonsogarciadecorral not sure if this needs to be added to a specific release, from my side this is more of a refactoring we can always merge into the master. @noxan what do you think? |
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.
LGTM overall, like the removal of duplicate code. I've added two suggestions, should be quick fixes for better readability - we can merge it with any upcoming release.
neuralprophet/forecaster.py
Outdated
@@ -705,6 +705,9 @@ def fit(self, df, freq="auto", validation_df=None, progress="bar", minimal=False | |||
# When only one time series is input, self.id_list = ['__df__'] | |||
self.num_trends_modelled = len(self.id_list) if self.config_trend.trend_global_local == "local" else 1 | |||
self.num_seasonalities_modelled = len(self.id_list) if self.config_season.global_local == "local" else 1 | |||
self.meta_name_bool = ( |
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.
Not really sure what meta_name_bool
stands for, could we come up with some more clear naming? For example meta_use_df_name
or something similar?
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.
I agree, for me its also not really clear what meta_name is referring to.
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, I agree!
What about:
- meta_used_in_forward
- model_uses_meta
?
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.
What exactly is meta even referring to? Its the name of the local dataset in case global / local modelling is used, correct?
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.
Yes, the dataloader has meta in it, including the 'ID' of the local dataset.
When doing global/local modeling we need to know the 'ID' of each sample on the batch.
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.
changed it to meta_used_in_model
- Didn't add "name" on it as this could be used as well once we have static covariates, for example
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 the improvement @alfonsogarciadecorral - I find the meta
naming of this functionality rather unclear, but that is not related to your work - I'll open a follow up issue on that.
Co-authored-by: Richard Stromer <[email protected]>
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.
LGTM - create the follow up issue separately
@ourownstory
This simple PR is to reduce some lines the global-local logic.
A boolean variable called
meta_name_bool
will be used if we need to know the time series ID when we interact with the Model.Which is the best release I should add this to?