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.

silence warnings completely

See original GitHub issue

When running this I get a lot of warnings which makes it hard to read my own output

It’s warnings along the lines of

(pid=22798) UserWarning: Distributing <class 'numpy.ndarray'> object. This may take some time.

I have tried

import warnings
warnings.filterwarnings("ignore")

but that didn’t work.

Is there any parameter or env var which could silence all these?

Thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mvashishthacommented, Aug 31, 2022

@pyrito I think we shouldn’t have an optional setting that’s just a wrapper around a ray init option (log_to_driver=False). I think we should close this issue for now. If we hear that more users want to suppress warnings, we can consider either always setting log_to_driver=False or adding a section about that option in the documentation.

P.S. We may end up setting log_to_driver=False anyway, depending on what happens in https://github.com/ray-project/ray/issues/28216. It might be the way to get rid of ray error spam that I find really annoying when using Modin.

0reactions
pyritocommented, Aug 31, 2022

@mvashishtha is there anything more we can do from our end? I can think of trying to add an easily configurable option with modin.config that will suppress warnings at the Ray level, but I’m not sure if that’s something we want to go with.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable Python warnings?
Look at the Temporarily Suppressing Warnings section of the Python docs: If you are using code that you know will raise a warning,...
Read more >
Suppress Warnings In Python: All You Need To Know
Suppress warnings in python; warnings and types, ignore all warnings, ignore specific warnings, re-enable warnings.
Read more >
How to Suppress Warning Messages in Python
Method 1: Suppress Warnings with filterwarnings() ; module, This argument displays a warning message only once. This is independent of the number of...
Read more >
Warning control — Python 3.11.1 documentation
Temporarily Suppressing Warnings​​ This allows you to use known-deprecated code without having to see the warning while not suppressing the warning for other ......
Read more >
Suppress code analysis warnings - .NET
This article covers the various ways you can suppress warnings from code ... You can disable a rule that's causing a warning by...
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