question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable output / silent option?

See original GitHub issue

Would it be possible to have an option to disable any output / info messages when running the Profiler? I’ve had a look at the sources, and it seems simple prints are used, e.g. for:

Finding the Null values in the columns... (with 9 processes)
...

Maybe there could be a ‘silent=True’ option in the Profiler base class, or something similar? Having this output in the (standard) log(s) would still be useful, but as it is it gets in the way of my ‘normal’ command-line output, unless I apply some dodgy workarounds…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
makkuscommented, Aug 3, 2021

@ChrisWallace2020 thanks, much appreciated! I just tried out the latest version from git, and it works exactly as advertised for me, once I switchto logging.WARNING.

Actually, there was one warning still intact:

/home/markus/projects/dharpa/.direnv/python-3.9.6/lib/python3.9/site-packages/dataprofiler/profilers/profile_builder.py:584: RuntimeWarning: 

!!! WARNING Partial Profiler Failure !!!

Profiling Type: data_labeler
Exception: ModuleNotFoundError
Message: No module named 'tensorflow'

For labeler errors, try installing the extra ml requirements via:

$ pip install dataprofiler[ml] --user


  utils.warn_on_profile('data_labeler', e)

But I can turn that off easily by disabling the data_labeler in the profile options. It’s probably a good idea to do that explicitly anyway – even if though I deliberately did not install tensorflow, so I did not expect this to work. And since it’s a different sort of warning it probably makes sense to leave that one in.

Thanks again!

0reactions
ChrisWallace2020commented, Aug 2, 2021

@makkus the 2 PRs above (#357, #368) should resolve the issue.

The prints were replaced with logging.info so that the effective level may be set high enough to filter them out if you choose to do so. This can be set either through logging like normal or you can use the function set_verbosity we’ve written in dp_logging.py that takes in the logging level (logging.DEBUG, logging.INFO, logging.WARNING etc). DataProfiler-specific logging will output to stdout (if left verbose).

I hope this addresses your issue, let me know if there is any further feedback. If this addresses your initial issue feel free to close this out, please and thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

quiet or --silent option to suppress console output · Issue #222 ...
netlify deploy produces output which fails CI builds. Can't see a way to supsess it, redirect won't help, exit status would be 0...
Read more >
Silencing the Output of a Bash Command | Baeldung on Linux
To silence the output of a command, we redirect either stdout or stderr — or both — to /dev/null. To select which stream...
Read more >
Azure CLI: Suppress Output For Silent Commands / Quiet Mode
In these cases, it would be really helpful if there were a way to suppress Azure CLI command output so the command is...
Read more >
Automake Silent Rules (automake) - GNU.org
Passing --enable-silent-rules to configure will cause build rules to be less verbose; the option --disable-silent-rules will cause normal verbose output. At ...
Read more >
curl hide progress bar output on Linux/Unix shell scripts
The procedure to hide curl progress bar is to pass the -s or --silent option to the curl command: Open the terminal application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found