Repro
import evalml
Root cause
get_importable_subclasses
tries to initialize every componentget_importable_subclasses
to generate the static lists of estimators and componentsSeems like we should do what we can to avoid raising warnings at import-time.
Ideas for a fix
get_importable_subclasses
to be generated at runtime, not at import-time. I.e. in component utilsdef _all_estimators():
return get_importable_subclasses(Estimator, used_in_automl=False)
...
TextFeaturizer
to not raise this particular warning. Add unit test to check for no warnings.get_importable_subclasses
to suppress any warnings coming from component initializationI suggest we do items 1 and 2.
When #1022 was merged - the runtime warning was removed. However, I'm still seeing the following warning:
2020-08-11 12:17:34,559 featuretools - WARNING Featuretools failed to load plugin nlp_primitives from library nlp_primitives. For a full stack trace, set logging to debug.
@dsherry I'll put up the PR to do items 1 and 2 as you mentioned above but @eccabay has informed me that this warning is not coming from our side.
After discussing with @rwedge there seems to be two solutions to the above featuretools warning:
use the beta pip dependency resolver
featuretools is in the process of making tensorflow optional and can be done by EOD 8/12/2020
I suggest we wait for the new featuretools release and confirm if the warning is still an issue.
Thanks @jeremyliweishih ! I agree option 2 here is best for handling the featuretools warning.
That aside, my understanding is you're currently working on options 1 and 2 from my comment from last week, correct? I think both of those changes, particularly the first, will add value here.
nlp-primitives 1.0 is out on pypi now and tensorflow is no longer a required dependency
Confirmed that warning does not pop up with latest version of nlp-primitives
. Thanks @rwedge! You can check here.
Awesome, thanks both!
Most helpful comment
nlp-primitives 1.0 is out on pypi now and tensorflow is no longer a required dependency