nvalchemi.hooks.ReportingOrchestrator#
- class nvalchemi.hooks.ReportingOrchestrator(reporters, *, frequency=1, stages=None, rank_zero_only=False, error_policy=ReportingErrorPolicy.RAISE, state=None)[source]#
Fan out hook contexts to reporting sinks.
ReportingOrchestratoris itself a normal hook. It uses_runs_on_stageso it can be registered with both training and dynamics hook registries while still choosing the workflow stages it observes.- Parameters:
reporters (Sequence[Reporter]) – Reporters to call in order for each reporting event.
frequency (int, optional) – Run every
frequencyworkflow steps, using the existing hook registry gating. Default1.stages (set[Enum | str] | None, optional) – Stages to report. Enum values are matched by identity; strings are matched against enum member names. Defaults to
{"AFTER_OPTIMIZER_STEP", "AFTER_STEP"}, which gives once-per-step training and dynamics reporting without importing either workflow.rank_zero_only (bool, optional) – If
True, suppress child reporters on nonzero ranks unless they exposerequires_all_ranks=Truefor distributed collectives. Individual reporters may also exposerank_zero_only=Trueto request their own gating. DefaultFalse.error_policy (ReportingErrorPolicy | str, optional) – Reporter failure handling policy. Default
ReportingErrorPolicy.RAISE(the string"raise"is also accepted).state (ReportingState | None, optional) – Shared reporting state. If omitted, a new state object is created.
- property global_rank: int#
Return the current distributed rank, or zero outside distributed runs.
- property is_rank_zero: bool#
Return whether this process is rank zero.