Expose feature and label transformer in automl.py (#993)

* expose label and feature transformer

* linter apply

* avoid undefined attribute in flaml/automl/automl.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* avoid undefined attribute in flaml/automl/automl.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* retrigger checks

* retrigger checks

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
This commit is contained in:
Jane Illarionova 2023-04-15 12:06:47 -07:00 committed by GitHub
parent c9fc622af1
commit b235fe0098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -490,6 +490,16 @@ class AutoML(BaseEstimator):
with open(filename, "w") as f:
json.dump(best, f)
@property
def feature_transformer(self):
"""Returns AutoML Transformer"""
return getattr(self, "_transformer", None)
@property
def label_transformer(self):
"""Returns AutoML label transformer"""
return getattr(self, "_label_transformer", None)
@property
def classes_(self):
"""A numpy array of shape (n_classes,) for class labels."""