simrun
❭ robust_dask_delayed_execution
❭ RobustDaskDelayedExecution
RobustDaskDelayedExecution¶
- class simrun.robust_dask_delayed_execution.RobustDaskDelayedExecution(db)¶
Execute dask delayed objects in a robust way.
This class utilizes
data_base.IO.LoaderDumper.just_create_folder.ManagedFolder
objects to store delayed objects. It offers methods to run them exactly once. The return value is not saved if the dask delayeds objects don’t save them.This is used for long runing data generating simulations that can get interrupted (e.g. timeout on an HPC cluster, some error …) and you want to complete the remaining tasks later.
- Parameters:¶
db (
data_base.dataBase
) – The database containing theManagedFolder
objects, which in turn contain the dask delayed objects.- Attributes:¶
- db¶
The database containing the
ManagedFolder
objects, which in turn contain the dask delayed objects.- Type:¶
data_base.dataBase
- Methods:¶
Get the status on the computation of the delayed objects.
Add a delayed object to the database.
reset_status
(only_started)Reset the status of the delayed objects to
'not_started'
.run_db
(error_started)Run all delayed objects in the database.