Fixed set_period() not updating decomposer parameters#3932
Conversation
set_period not updating in decomposer parameters
set_period not updating in decomposer parametersset_period() not updating decomposer parameters
Codecov Report
@@ Coverage Diff @@
## main #3932 +/- ##
=======================================
+ Coverage 99.7% 99.7% +0.1%
=======================================
Files 346 346
Lines 36709 36727 +18
=======================================
+ Hits 36576 36594 +18
Misses 133 133
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
d68cab9 to
55743b7
Compare
jeremyliweishih
left a comment
There was a problem hiding this comment.
LGTM but would be nice to have an explicit test for the decomposer.
| """ | ||
| self.period = self.determine_periodicity(X, y) | ||
| self.parameters.update({"period": self.period}) | ||
| self.update_parameters({"period": self.period}) |
There was a problem hiding this comment.
can you add a test verifying the period updates?
There was a problem hiding this comment.
There's a line in test_decomposer.py::test_decomposer_set_period that's currently commented out testing this, you should be able to uncomment that!
There was a problem hiding this comment.
I uncommented that line, I think that should be sufficient? @jeremyliweishih I can also break it out into its own separate test if need be.
eccabay
left a comment
There was a problem hiding this comment.
Looks good! I agree with Jeremy about the testing. Have you verified if there's anywhere else we update parameters that could benefit from this function?
| """ | ||
| self.period = self.determine_periodicity(X, y) | ||
| self.parameters.update({"period": self.period}) | ||
| self.update_parameters({"period": self.period}) |
There was a problem hiding this comment.
There's a line in test_decomposer.py::test_decomposer_set_period that's currently commented out testing this, you should be able to uncomment that!
|
@eccabay I did a quick ctrl+f search for places that update parameters and this should be it. I think this is the only place where we're updating the parameters from inside the component itself. |
Also introduces a way to update parameters in a component.
Resolves #3771