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
[ENH] iisignature
backend option for SignatureTransformer
#5398
Conversation
… large dimensions in the language analysis 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.
Thanks a lot!
I would request a few things around soft dependency handling, and "no breaking changes" - the philosophy is, no existing code for any user should change unexpectedly. So, I would suggest:
- to the signature transformer and relevant utility functions, add a
backend
parameter or similar, the default is as current and one option is"iisignature"
. - the backend is set to
iisignature
only if the option is set - the
iisignature
soft dependency should be added to the same dependency sets inpyproject.toml
that also containsesig
. - there should be a soft dependency check in the init of the signature transformer.
iisignatures
should be checked only if the backend parameter is set to it, with an informative error message (that tells the user that the backend requires it), for this we could use_check_soft_dependencies
.
iisignature
backend option for SignatureTransformer
…signature backend parameters and check for soft-dependency
Thank you for the detailed suggestions, they do make sense. I have updated the PR with your comments! |
sktime/transformations/panel/signature_based/_signature_method.py
Outdated
Show resolved
Hide resolved
sktime/transformations/panel/signature_based/_signature_method.py
Outdated
Show resolved
Hide resolved
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!
Only one blocking comment: The new dependency should have an upper bound.
The other comments are not blocking from my side.
hm, another remark: in |
Here's how I'd proceed: let's see what the tests do. If they run through, then all is fine. If not, we can exceptionally merge without the dep for testing and add a note to the docstring. |
Thank you. Are the tests already running? Sorry I am not sure how everything works -- (what am asking is if there is anything further I need to do now or simply wait). |
Hm, they didn't seem to have run. I restarted them. |
It looks like the a few checks failed due to the numpy dependency of the iisignature as expected; There's some code quality issue from black, etc. Is the way to fix those to be simply running black etc. of the code before committing? |
Yes, although some errors you have to fix manually, e.g., too long lines of code or grammar issues with docstrings. Here's the full guide on setting up code formatting checks locally: |
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 removed the iisignature
dependency from pyproject.toml
, and added a warning message to the user about reliability. That should take care of the issues mentioned previously.
Thank you! Sorry for the late response, really appreciate your help for my first PR. |
Well, thank you! We really appreciate your first PR! |
Reference Issues/PRs
Fixes #1591.
This PR also adds an option to choose no augmentation, currently the code returns an error if augmentations is None -- the user will be forced to choose an augmentation.
What does this implement/fix? Explain your changes.
Fixes a bug where a runtime error is returned if each point of the time-series has dimension more than 25.
An enhanced flexibility to allow to user to choose no stream augmentation.
Does your contribution introduce a new dependency? If yes, which one?
Soft dependency of the package iisignature is needed for the fix of #1591.
What should a reviewer concentrate their feedback on?
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
sktime
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
See here for further details on the algorithm maintainer role.
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.