alteryx / featuretools

An open source python library for automated feature engineering
https://www.featuretools.com
BSD 3-Clause "New" or "Revised" License
7.14k stars 872 forks source link

getting lots of warnings at import #2734

Open solegalli opened 1 month ago

solegalli commented 1 month ago

Hey guys!

When executing import featuretools as ft I get a lot of warnings:

2024-05-21 16:26:19,117 featuretools - WARNING    While loading primitives via "nlp_primitives" entry point, ignored primitive "DiversityScore" from "nlp_primitives.diversity_score" because a primitive with that name already exists in "premium_primitives.diversity_score"
2024-05-21 16:26:19,120 featuretools - WARNING    While loading primitives via "nlp_primitives" entry point, ignored primitive "LSA" from "nlp_primitives.lsa" because a primitive with that name already exists in "premium_primitives.lsa"
2024-05-21 16:26:19,122 featuretools - WARNING    While loading primitives via "nlp_primitives" entry point, ignored primitive "MeanCharactersPerSentence" from "nlp_primitives.mean_characters_per_sentence" because a primitive with that name already exists in "premium_primitives.mean_characters_per_sentence"
2024-05-21 16:26:19,122 featuretools - WARNING    While loading primitives via "nlp_primitives" entry point, ignored primitive "NumberOfSentences" from "nlp_primitives.number_of_sentences" because a primitive with that name already exists in "premium_primitives.number_of_sentences"
2024-05-21 16:26:19,123 featuretools - WARNING    While loading primitives via "nlp_primitives" entry point, ignored primitive "PartOfSpeechCount" from "nlp_primitives.part_of_speech_count" because a primitive with that name already exists in "premium_primitives.part_of_speech_count"
2024-05-21 16:26:19,127 featuretools - WARNING    While loading primitives via "nlp_primitives" entry point, ignored primitive "PolarityScore" from "nlp_primitives.polarity_score" because a primitive with that name already exists in "premium_primitives.polarity_score"
2024-05-21 16:26:19,129 featuretools - WARNING    While loading primitives via "nlp_primitives" entry point, ignored primitive "StopwordCount" from "nlp_primitives.stopword_count" because a primitive with that name already exists in "premium_primitives.stopword_count"

Any way to suppress this? Is this intentional?

I only installed featuretools, so I am not sure why I am seeing the nlp and premium primitives. Can it be that they were leftover from a previous installation? how can I completely remove all featuretools dependencies?

thehomebrewnerd commented 1 month ago

@solegalli Those specific warnings are intentional, but not ideal. The warning is just indicating that Featuretools found a primitive definition in multiple places so the warning is present to indicate only one of the definitions will be used for generating features. This is happening because we were in the process of moving primitives between libraries, but they are currently defined in multiple places. We would like to get this cleaned up, but just haven't had the time to do so yet.

You should be able to uninstall nlp-primitvies and premium-primitives and those warning should go away. If you used pip you can simply run pip uninstall nlp-primitives premium-primitives. If you are seeing those warnings without nlp-primitives or premium-primitives` in your environment we'll have to look into that further, but that should not happen.

thehomebrewnerd commented 1 month ago

Related issue: https://github.com/alteryx/featuretools/issues/2721#issue-2288200441

solegalli commented 1 month ago

Thank you!