monitor - Monitor fit progress¶
Monitor |
Base class for monitors. |
Logger |
Keeps a record of all values for the desired fields. |
TimedUpdate |
Indicate progress every n seconds. |
Progress monitors.
Process monitors accept a bumps.history.History
object each cycle
and perform some sort of work.
-
class
bumps.monitor.
Logger
(fields=(), table=None)[source]¶ Bases:
bumps.monitor.Monitor
Keeps a record of all values for the desired fields.
fields is a list of history fields to store.
table is an object with a store(field=value,…) method, which gets the current value of each field every time the history is updated.
Call
config_history()
with thebumps.history.History
object before starting so that the correct fields are stored.
-
class
bumps.monitor.
TimedUpdate
(progress=60, improvement=5)[source]¶ Bases:
bumps.monitor.Monitor
Indicate progress every n seconds.
The process should provide time, value, point, and step to the history update. Call
config_history()
with thebumps.history.History
object before starting so that these fields are stored.progress is the number of seconds to go before showing progress, such as time or step number.
improvement is the number of seconds to go before showing improvements to value.
By default, the updater only prints step number and improved value. Subclass TimedUpdate with replaced
show_progress()
andshow_improvement()
to trigger GUI updates or show parameter values.