nvalchemi.hooks.Reporter#

class nvalchemi.hooks.Reporter(*args, **kwargs)[source]#

Protocol for reporting sinks owned by ReportingOrchestrator.

Reporters consume the existing hook context directly. They should not require the orchestrator to construct separate workflow event objects. Reporters may optionally expose rank_zero_only: bool to request per-reporter rank gating. Reporters that run distributed collectives must expose requires_all_ranks: bool so orchestrator-level rank gating does not skip nonzero ranks before a collective. Reporters may also implement __enter__, __exit__, or close for resource lifecycle management.

report(ctx, stage, state)[source]#

Consume one reporting event.

Parameters:
  • ctx (HookContext) – Workflow hook context.

  • stage (Enum) – Hook stage being reported.

  • state (ReportingState) – Shared reporting state for the orchestrator run.

Return type:

None