simrunrobust_dask_delayed_executionRobustDaskDelayedExecution

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 the ManagedFolder 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_status()

Get the status on the computation of the delayed objects.

add_delayed_to_db(d)

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.