Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] speed up
BaseTransformer
checks and conversion boilerplate (#…
…5036) This PR speeds up `BaseTransformer` checks and conversion boilerplate: * replacing some `convert_to` calls by more specific `convert` calls that ensure we do not repeat mtype checks * specifying explicitly the needed metadata in an instance where all metadata was returned, to avoid costly metadata queries that are discarded * refactoring `convert` and `convert_to`, moving logic that determines the target mtype into a separate function, and allowing `convert` to have `list` as `to_type` * adding an option to `convert_to_scitype` to return the mtype of the converted-to output. This is passed as an input to `convert` in the `BaseTransformer` boilerplate to avoid checks to obtain this information.
- Loading branch information
Showing
3 changed files
with
160 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.