Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging #32

Open
gromajus opened this issue Feb 4, 2021 · 2 comments
Open

logging #32

gromajus opened this issue Feb 4, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request Feature Request a new feature

Comments

@gromajus
Copy link

gromajus commented Feb 4, 2021

Hi!
I would like to ask if it is possible to turn off logging or change the logging level from python script that uses nlu library?
Even simple 'import nlu' generates lines of logs, loading models there are tons of them...

Before importing nlu, I am trying to create pyspark context and set desired log level as it is pointed in logs from import nlu: Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel)

But it doesn't seem to help, actually the opposite, I can't load models and do the predictions then...

The other approach was setting logging levels for all possible loggers: nlu, py4j, py4j.java_gateway to CRITICAL in my case

logging.getLogger('nlu').setLevel(logging.CRITICAL)
logging.getLogger('py4j').setLevel(logging.CRITICAL)
logging.getLogger('py4j.java_gateway').setLevel(logging.CRITICAL)

But it also didn't help.
There are still messages from e.g. WARN SparkSession$Builder, WARN ApacheUtils, I tensorflow/core/platform/cpu_feature_guard.cc:142], etc...

@C-K-Loan C-K-Loan added the enhancement New feature or request label Feb 5, 2021
@C-K-Loan C-K-Loan self-assigned this Feb 5, 2021
@C-K-Loan
Copy link
Member

C-K-Loan commented Feb 5, 2021

HI @gromajus currently there is no straightforward way to mute the Spark Logging messages.

We are looking into this and hopefully can provide a solution soon.

@gromajus
Copy link
Author

gromajus commented Feb 5, 2021

OK, thank you @C-K-Loan :)

@C-K-Loan C-K-Loan added the Feature Request a new feature label Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature Request a new feature
Projects
None yet
Development

No branches or pull requests

2 participants