[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-users] IMP Silencing output



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#a038e88ee10717a2b570b298d75dbe0a2

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#af0eddf379aa036a59c47c5485c11e182

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-filter

	Ben
--
                      https://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle