-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add verbose
argument to Chain
for logging of steps in chain
#274
Comments
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our Contributing Guide and Code of Conduct. |
@mtb-za thanks for opening the issue 👍 Yep, I guess putting some log messages and capturing execution time with
To test this, see the Pooch tests. They include a context manager to capture the log messages and verify that they are running. It would be fine to copy that to Verde. |
Description of the desired feature
Add an optional parameter to allow for
Chain
to provide an update on where it is during fitting. It will print log messages (and collect execution times?) ifTrue
, with a default toFalse
. The idea is that for long-running processing chains, one can see what is most time-consuming, as well as get information that it is continuing to run in the background. It will also allow for someone to provide the logs along with results, if needed, providing an audit trail outside the script used to create a given output.At minimum, this would require importing
logging
and then providing an appropriate logging level (probably INFO?) in the loop that calls each step. That would make theChain.fit
method look something like the following:It is also possible to add some additional support for timing of how long each step takes to run. Something similar could be added to
Chain.predict
, but that is usually much faster, so might be less useful there.Possible downsides are that the code itself becomes less clean, since there are now additional things being added that will clutter existing methods.
Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: