agentlab.experiments.graph_execution_ray

Functions

execute_task_graph(exp_args_list[, ...])

Execute a task graph in parallel while respecting dependencies using Ray.

get_elapsed_time(task_ref)

poll_for_timeout(tasks, timeout[, poll_interval])

Cancel tasks that exceeds the timeout

agentlab.experiments.graph_execution_ray.execute_task_graph(exp_args_list: list[ExpArgs], avg_step_timeout=60)

Execute a task graph in parallel while respecting dependencies using Ray.

agentlab.experiments.graph_execution_ray.get_elapsed_time(task_ref: ObjectRef)
agentlab.experiments.graph_execution_ray.poll_for_timeout(tasks: dict[str, ObjectRef], timeout: float, poll_interval: float = 1.0)

Cancel tasks that exceeds the timeout

I tried various different methods for killing a job that hangs. so far it’s the only one that seems to work reliably (hopefully)

Parameters:
  • tasks – dict[str, ray.ObjectRef] Dictionary of task_id: task_ref

  • timeout – float Timeout in seconds

  • poll_interval – float Polling interval in seconds

Returns:

Dictionary of task_id: result

Return type:

dict[str, Any]