Execution flows and work inside Runs
log_params
, log_inputs
, and log_output
options. You can also control the default behavior when creating a run with dreadnode.run(..., autolog=False)
task()
) or a TaskSpan
object (task.run()
) that provides access to the task’s context, metrics, and output. You can get the raw TaskSpan
object by calling .run()
on the task.
dn.tag()
within a task, it applies to the task itself. You can override this behavior to apply tags to the run instead:
try/catch
block:
try/catch
logic inside the task itself:
try_()
) or skip failures during multiple calls try_map()
:
token_count
, that metric is:
token_count
tokenize.token_count
task_span.tasks
: List of child TaskSpan
objectstask_span.all_tasks
: Flat list of all tasks under this task, including subtaskstask_span.parent_task
: Reference to parent TaskSpan
(or None
for top-level tasks)task_span.run
: Reference to the RunSpan
containing this tasktry_run()
and similar methods to handle task failures gracefully.