IBM/lale

reuse common schemas in lale.lib.sklearn

hirzel opened this issue · 4 comments

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:

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

tol is a good candidate for a shared parameter