-
Notifications
You must be signed in to change notification settings - Fork 51
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
[MNT] Deprecation message for CyclicBoosting
changes
#320
[MNT] Deprecation message for CyclicBoosting
changes
#320
Conversation
CyclicBoosting
changes
skpro/distributions/qpd.py
Outdated
comment = "Parameter 'lower' and 'upper' will be moved to \ | ||
class parameters in version X.X.X. \ | ||
To retain prior behaviour, set 'lower' to 0.0 \ | ||
and 'upper' to large number explicitly" |
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.
should this not be None
instead of a large number?
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.
It should be a large number here because 'upper' is used as the range of the differential. However, I made a mistake in the docstring for the default value of 'upper ', it is not None but 1e3 in the future version. In this case too, the large number should be set to the 'upper' parameter to cover the range of the user's dataset.
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 think this is good, given the changes.
I would improve it as follows:
- the message in
__init__
needs only be raised if the changing parameters are invoked with a non-default, since that is the only case where behaviour changes or can break.
The parameters in the methods imo can be removed without deprecation message, as they were not API compliant
Thanks, I modified as following your comment. the default values of 'lower' and 'upper' will be removed in the future version. I made a wrong deprecation message. It is also modified. If the default value is removed, a deprecation message is always raised, as this can break the user's code.
Sorry, I'm not sure I understand your comment. Which method did you mention? |
In addition, what future version should we specify in deprecation message? |
If we want to make further changes, these will have to wait until 2.5.0, as we will now proceed to the 2.3.0 release shortly, after which the second next MINOR release will be 2.5.0 - see point 4 here which explains this: https://www.sktime.net/en/stable/developer_guide/deprecation.html#deprecation-policy The changes in #329 or #327 should not prevent us from making further changes to the distribution interface. |
Deprecation messages for `CyclicBoosting` for deprecations and changes in 2.4.0. Alternative to #320. * restores sequence of parameters to sequence in version 2.2.2, to avoid breakage in the 2.3.0 release * adds deprecation message for `bound` parameter * renames new `version` parameter to `dist_type` - the name is a bit misleading, as it will probably imply "version" in the semantic versioning sense to an ordinary user. Does not require deprecation, because added since 2.2.2. Also makes improvements to the docstring of the `CyclicBoosting` estimator. Difference to #320: does not carry out deprecations for distributions, under a working assumption that #327 will be merged.
Thank you for your contribution. As there are no tasks left for me to do, I have no problem closing this PR if it is unnecessary. |
Well, I dealt only with the We may stlil have to decide what to do with the distributions, in deprecation. For instance:
My advice would hence be, let's be clear about the target interfaces, from that it will become clear whether we need any further change/deprecation management, or not. |
As mentioned in #327 , the lower and upper parameters are not necessarily needed in all QPD classes if findiff is not used. Therefore, the upper parameter can be removed in QPD_S and the lower and upper parameters in QPD_U.
The dist_shape parameter is an option for fine-tuning the QPD_U. Therefore, it can be removed as a deprecated parameter if simplification of the QPD class interface is a priority. How do you think?
It would be good to be able to specify scipy and skpro distributions, as you have implemented in #327. In this case, I don't think some support is needed in the deprecated process. Let me check the situation. Should I add a deplication message to this PR to meet the #327 specification? Is there anything else I should consider? |
The shape parameter is only used for the extended QPD versions (Which include QPD_U. That means only QPD_S and QPD_B are "original" ones.), which I suggest to remove here. |
Ok, that makes sense, I was wondering what these were used for, already. The need to use
I agree it should be removed. I would actually replace it by:
|
This might require extending the logic, at least addition of a test case that passes an I would also strongly suggest to rename the parameter |
…osting-deprecation-support
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@fkiraly
The |
Great! I think you're quite out of sync with your branch since the new release - can you merge |
I think I have resolved the conflicts in the main branch. |
👍 yes, looks like it! |
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.
Great!
One minor thing, we should ensure that users can already move to the future behaviour, i.e., have a chance to update their code in advance. That would mean adding the base_dist
parameter already right now, an dif it is passed, it overrides version
.
Have a look here how renaming a parameter works, including a suggested warning message: https://www.sktime.net/en/stable/developer_guide/deprecation.html#id2
Thank you. Fixes for parameter renaming have been applied. |
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.
Made some minor tweaks around the docstrings (moved to the "final" form), and release manager actions.
Reference Issues/PRs
#232
What does this implement/fix? Explain your changes.
Does your contribution introduce a new dependency? If yes, which one?
No
No
What should a reviewer concentrate their feedback on?
I'm not familiar with the detail for deprecation process and which future version we should set for removing default parameters.
Did you add any tests for the change?
No
Any other comments?
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
skpro
root directory (not theCONTRIBUTORS.md
). Common badges:code
- fixing a bug, or adding code logic.doc
- writing or improving documentation or docstrings.bug
- reporting or diagnosing a bug (get this pluscode
if you also fixed the bug in the PR).maintenance
- CI, test framework, release.See here for full badge reference
For new estimators
docs/source/api_reference/taskname.rst
, follow the pattern.Examples
section.python_dependencies
tag and ensureddependency isolation, see the estimator dependencies guide.