Code Reference

adage.run_polling_workflow(controller, coroutine, update_interval, trackerlist=None, maxsteps=None)

run the polling-style workflow by periodically checkinng if a graph can be extended or any noted be submitted runs validation

Parameters:
  • controller – the workflow controller
  • coroutine – the adage coroutine to step through the workflow
  • update_interval – time interval between workflow ticks

:param trackerlist

Returns:None
Raises:RuntimeError – if graph is finished and graph validation failed or workflow is failed (nodes unsuccessful)
adage.rundag(adageobj=None, backend=None, extend_decider=None, submit_decider=None, finish_decider=None, recursive_updates=True, update_interval=0.01, loggername='adage', trackevery=1, workdir=None, default_trackers=True, additional_trackers=None, controller=None, maxsteps=None)

Main adage entrypoint. It’s a convenience wrapper around the main adage coroutine loop and sets up the backend, logging, tracking (for GIFs, Text Snapshots, etc..) and possible interactive hooks into the coroutine

Parameters:
  • adageobj – the adage workflow object
  • backend – the task execution backend to which to submit node tasks
  • extend_decider – decision coroutine to deal with whether to extend the workflow graph
  • submit_decider – decision coroutine to deal with whether to submit node tasks
  • update_interval – minimum looping interval for main adage loop
  • loggername – python logger to use
  • trackevery – tracking interval for default simple report tracker
  • workdir – workdir for default visual tracker
  • default_trackers – whether to enable default trackers (simple report, gif visualization, text snapshot)
  • additional_trackers – list of any additional tracking objects
  • controller – optional external controller (instead of adageobj parameter)
  • maxsteps – maximum number of steps in polling-style workflow
  • recursive_updates – recurse if any rule has been applied
adage.trackprogress(trackerlist, controller, method='track')

track adage workflow state using a list of trackers

Parameters:
  • trackerlist – the stackers which should inspect the workflow
  • adageobj – the adage workflow object
  • method – tracking method to call. Must be one of initialize, track, finalize
Returns:

None

class adage.graph.AdageDAG(data=None, **attr)
addTask(task, nodename='node', depends_on=None)

add a node based on a task to the DAG :param: task: the task object :param: nodename: name of the node :param: depends_on: list of node objects to be declared as dependencies :return: the newly created node object

adage.dagstate.node_ran_and_failed(nodeobj)
Parameters:nodeobj – the node object
Returns:
  • True if node has been processed and failed
  • False in all other cases
adage.dagstate.node_status(nodeobj)

boolean check on node status.

Parameters:nodeobj – the node object
Returns:
  • True if successful (i.e. has beedn submitted, finished processing and exited successfully)
  • False in all other cases
class adage.graph.AdageDAG(data=None, **attr)
addTask(task, nodename='node', depends_on=None)

add a node based on a task to the DAG :param: task: the task object :param: nodename: name of the node :param: depends_on: list of node objects to be declared as dependencies :return: the newly created node object