Skip to content
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] Syncing datatypes module _check.py and _convert.py with sktime #432

Merged
merged 4 commits into from
Jul 27, 2024

Conversation

julian-fong
Copy link
Contributor

As per requested by @fkiraly, we are updating the files _check.py and _convert.py to match functionality with the sktime library. Note that _common.py is exactly the same for both libraries, so no changes were needed.

This pr also should allow list of strings to be accepted as valid X_inner_mtype and y_inner_mtype.

@fkiraly Could you please do a review to ensure that the code is correct?

Thanks!

skpro/datatypes/_check.py Outdated Show resolved Hide resolved
skpro/datatypes/_check.py Outdated Show resolved Hide resolved
f"which is {as_scitype}"
)
to_type = same_scitype_mtypes[0]
# # if to_type is a list, we do the following:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this commented out? Can this not be entirely removed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

impacts both skpro and sktime

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment out code was not used at all in the sktime _convert.py file. will remove it. I only commented it out and left it there to see if it would break anything if it was commented

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

Added a quick review, and it seems there are a few minor things that might be worth changing both in sktime and skpro.

Also, question: are there no tests accompanying these changes?

@fkiraly fkiraly added enhancement module:datatypes datatypes module: data containers, checkers & converters labels Jul 27, 2024
@fkiraly fkiraly changed the title [ENH] Refactoring datatypes module _check.py and _convert.py to match sktime functionality [ENH] Syncing datatypes module _check.py and _convert.py with sktime Jul 27, 2024
@fkiraly fkiraly merged commit b569d80 into sktime:main Jul 27, 2024
36 checks passed
yarnabrina pushed a commit to sktime/sktime that referenced this pull request Jul 28, 2024
…_mtype` function (#6835)

Also added a input checker for `to_type` inside the `convert` function
inside `_convert`.

Relates to sktime/skpro#432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement module:datatypes datatypes module: data containers, checkers & converters
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants