nvalchemi.training.distillation.evaluation.AcceptanceReport#

class nvalchemi.training.distillation.evaluation.AcceptanceReport(thresholds, evaluations, verdicts)[source]#

Verdicts, the student summary, and the exports a workflow logs.

The report is a final artifact rather than a stream, so it does not implement the Reporter protocol. Print it to a rich.console.Console for the dashboard view. Pass scalars() to a TensorBoardReporter, or to any scalar sink, for a durable record.

Parameters:
thresholds#

Bars the verdicts were formed against.

Type:

AcceptanceThresholds

evaluations#

Measurements the report was built from, in the order supplied.

Type:

tuple[StudentEvaluation, …]

verdicts#

One verdict per evaluation, aligned with evaluations.

Type:

tuple[StudentVerdict, …]

Examples

>>> from rich.console import Console
>>> from nvalchemi.training.distillation.evaluation import (
...     build_acceptance_report,
... )
>>> report = build_acceptance_report(evaluations, thresholds)
>>> Console().print(report)
>>> report.accepted
True
property accepted: bool#

Return whether every student cleared every bar it was given.

scalars()[source]#

Return a flat {student/group/metric: value} map of every number.

Returns:

Numeric metrics only, keyed for a scalar sink such as TensorBoardReporter. Verdicts appear as <student>/accepted with value 1.0 or 0.0. A top-level number such as num_parameters appears as <student>/num_parameters.

Return type:

dict[str, float]

to_dict()[source]#

Return the whole report as nested plain dictionaries.

Return type:

dict[str, Any]