autogenhub / autogen

A programming framework for agentic AI. Discord: https://discord.gg/pAbnFJrkgZ
https://autogenhub.github.io/autogen/
Apache License 2.0
119 stars 23 forks source link

Prevent FLAML logging warning on import #69

Closed marklysze closed 1 month ago

marklysze commented 1 month ago

Why are these changes needed?

Previous FLAML PR (#61) did not fully remove the FLAML warning showing when running AutoGen workflows due to FLAML in completion.py.

So, this PR will add a temporary logging NullHandler during import of FLAML functions in completion.py, then will remove the NullHandler afterwards.

Related issue number

61

Checks

sonichi commented 1 month ago

@thinkall FYI. This might be an issue to solve in FLAML.

thinkall commented 1 month ago

@thinkall FYI. This might be an issue to solve in FLAML.

The warning message in FLAML is expected. I would suggest adding a logger instead of importing it from FLAML. This PR also works well though.

marklysze commented 1 month ago

@thinkall FYI. This might be an issue to solve in FLAML.

The warning message in FLAML is expected. I would suggest adding a logger instead of importing it from FLAML. This PR also works well though.

Hi @thinkall, I tried that in a previous PR. I don't believe we're importing one now from FLAML. I think it's logging a warning regarding automl automatically.

thinkall commented 1 month ago

@thinkall FYI. This might be an issue to solve in FLAML.

The warning message in FLAML is expected. I would suggest adding a logger instead of importing it from FLAML. This PR also works well though.

Hi @thinkall, I tried that in a previous PR. I don't believe we're importing one now from FLAML. I think it's logging a warning regarding automl automatically.

I see. You're right.