spdl.dataloader.TaskStatsHook

class TaskStatsHook(name: str, concurrency: int, interval: float | None = None)[source]

Track the task runtimes and success rate.

Parameters:
  • name – Nmae of the stage. Only used for logging.

  • concurrency – Concurrency of the stage. Only used for logging.

Methods

stage_hook()

Track the stage runtime and log the task stats.

task_hook()

Track task runtime and success rate.

stage_hook()[source]

Track the stage runtime and log the task stats.

task_hook()[source]

Track task runtime and success rate.