How severe does this issue affect your experience of using Ray?
Medium: It contributes to significant difficulty to complete my task, but I can work around it.
I’m currently using Ray 1.9.2 with numpy 1.22 and my logs are flooded with deprecation warnings by numpy:
python3.8/site-packages/ray/rllib/utils/debug.py:45: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe.
I saw this is fixed in the latest Ray 1.11 release. I plan to upgrade eventually, but I can’t do it right now. Is there any way to silence these warnings inside Ray?
I already have warnings.filterwarnings("ignore", category=DeprecationWarning) in my main script but it does not seem to work for the warnings inside ray.
Is there any config I can pass to ray to silence these warnings?
Maybe make this a feature request on GH?
I don’t know of any way to tell ray to silence external warnings.
A way this could work:
Specify your filters as a dict resembling the argument names of warnings.filterwarnings()
For example in your case: filter = {“action”: “ignore”, “category”:DeprecationWarning}
Pass it to ray with something like {..., "_filter_warnings": [filter]}
The module warnings simply keeps a list of filter that basically consist of your input arguments.
So we might even be able read this list and paste it elsewhere I think.
Now, I’ll try to either downgrade numpy (I think it doesn’t work on M1) or upgrade Ray as soon as possible (takes a while since there are many breaking changes).