liesel-devs / liesel

A probabilistic programming framework
https://liesel-project.org
MIT License
38 stars 2 forks source link

Goose error logging: Include type of error #180

Open jobrachem opened 5 months ago

jobrachem commented 5 months ago

Currently, the messages that goose logs during MCMC sampling look like this:

image

For long-running models it would be useful to have early information about the type of error, since for example maximum tree depth errors can be less severe than divergent transitions.

I propose to change them by including the error name, for example, for a NUTS kernel:

liesel.goose.engine - WARNING - Errors encountered for kernel_00:
liesel.goose.engine - WARNING - Errors in [1, 2, 1, 50] of 50 transitions [Maximum tree depth]
liesel.goose.engine - WARNING - Errors in [0, 0, 0, 0] of 50 transitions [Divergent transition]