netket.callbacks.TimeoutΒΆ
-
class
netket.callbacks.
Timeout
(timeout)ΒΆ Bases:
object
A simple callback to stop NetKet after some time has passed.
- Inheritance
-
__init__
(timeout)[source]ΒΆ Constructs a new Timeout object that monitors whether a driver has been training for more than a given timeout in order to hard stop training.
- Parameters
timeout β Number of seconds to wait before hard stopping training.
- Methods
-
__call__
(step, log_data, driver)[source]ΒΆ A boolean function that determines whether or not to stop training.
- Parameters
step β An integer corresponding to the step (iteration or epoch) in training.
log_data β A dictionary containing log data for training.
driver β A NetKet variational driver.
- Returns
A boolean. If True, training continues, else, it does not.
Note
This callback does not make use of step, log_data nor driver.
-