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

reuse common schemas in lale.lib.sklearn #619

Open
hirzel opened this issue Mar 2, 2021 · 4 comments
Open

reuse common schemas in lale.lib.sklearn #619

hirzel opened this issue Mar 2, 2021 · 4 comments

Comments

@hirzel
Copy link
Member

hirzel commented Mar 2, 2021

Many operators in lale.lib.sklearn have similar schemas for fit, predict, transform, predict_proba, etc. Similarly, there are some hyperparameters that occur in many of the operators in lale.lib.sklearn, such as random_state, n_jobs, etc. We could make our code base smaller and easier to maintain by defining such schemas only once in a file imported by each of the operators, and then plugging them in at the right place.

We already do something like that for lale.lib.aif360:

@hirzel
Copy link
Member Author

hirzel commented Mar 18, 2021

Started a file for this, only used by one operator so far: https://github.com/IBM/lale/blob/master/lale/lib/sklearn/_common_schemas.py

@shinnar
Copy link
Member

shinnar commented Nov 1, 2022

tol is a good candidate for a shared parameter

@hirzel
Copy link
Member Author

hirzel commented Jan 6, 2023

@shinnar
Copy link
Member

shinnar commented Feb 3, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants