Hi everyone,
How can I silence warnings and output in IMP? I am using IMP.set_log_level(IMP.SILENT) but it is not working, and I have no clue about which argument I should put there (IMP.set_log_level(l = ?)). I would like it to work for both output (silencing verbose mode) and warnings.
Thanks!
Best, Altair
On 9/16/21 2:40 AM, Altair Hernández wrote: > How can I silence warnings and output in IMP? I am using > IMP.set_log_level(IMP.SILENT)
Yes, that is how you do it. But see also the note at https://integrativemodeling.org/2.15.0/doc/ref/namespaceIMP.html#a038e88ee10...
> I have no clue > about which argument I should put there (IMP.set_log_level(l = ?)).
Any of the LogLevel enum values can go there. See https://integrativemodeling.org/2.15.0/doc/ref/namespaceIMP.html#af0eddf379a...
> I would like it to work for both output (silencing verbose mode) and warnings.
If the warning comes from IMP itself, then set_log_level(IMP.SILENT) should suppress it. If it's a Python warning (many of those in IMP.pmi are for example) then use the regular Python mechanism to suppress them, e.g. https://docs.python.org/3/library/warnings.html#overriding-the-default-filte...
Ben
participants (2)
-
Altair Hernández
-
Ben Webb