haystack
haystack copied to clipboard
Remove dependency log messages
Is your feature request related to a problem? Please describe. A log message is shown when a PromptNode is initialized but there's nothing user can do to fix the warning. Can we remove this log completely?
/usr/local/lib/python3.10/dist-packages/torch/_utils.py:776: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
return self.fget.__get__(instance, owner)()
Describe the solution you'd like No warning logs from dependencies like torch
Describe alternatives you've considered N/A
Additional context N/A
This is more tricky than it seems.
Unfortunately from the warning is not clear who actually caused the warning to be raised. Torch is complaining someone is using a deprecated API: but is it Haystack? Is it Transformers? Is it some other obscure small library? No way to tell from the message alone. Silencing all these warning will make us miss all the instances where Haystack is at fault, so it might be dangerous. On the other hand, I agree these are noisy and we have no control over all the warning raised by other dependencies.
The best approach as usual would be figure out where they come from, investigate, and fix them, either in Haystack or in the offending library. But... that's a lot of work for very little gain :sweat_smile: and what why nobody ever did it.
Closing as won't fix for now, feel free to reopen if that becomes blocking.