results
results
¶
Result compilation for Safe Synthesizer pipeline runs.
Assembles generation output, evaluation scores, and timing into the
SafeSynthesizerResults and SafeSynthesizerSummary containers
consumed by the SDK and CLI.
Functions:
| Name | Description |
|---|---|
make_nss_summary |
Build a pipeline summary from timing, generation results, and evaluation. |
make_nss_results |
Build the final pipeline results container. |
make_nss_summary(timing, results=None, report=None)
¶
Build a pipeline summary from timing, generation results, and evaluation.
Extracts evaluation scores from report when available. If report
is None (e.g. PII-only mode), all scores default to None.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timing
|
SafeSynthesizerTiming
|
Wall-clock timing breakdown for the pipeline. |
required |
results
|
GenerateJobResults | DataFrame | None
|
Generation output -- a |
None
|
report
|
MultimodalReport | None
|
Evaluation report containing component scores. |
None
|
Returns:
| Type | Description |
|---|---|
SafeSynthesizerSummary
|
A populated |
Source code in src/nemo_safe_synthesizer/results.py
make_nss_results(generate_results, total_time=None, training_time=None, generation_time=None, evaluation_time=None, report=None)
¶
Build the final pipeline results container.
Combines generation output, timing, and an optional evaluation report
into a single SafeSynthesizerResults object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
generate_results
|
GenerateJobResults | DataFrame
|
Generation output -- a |
required |
total_time
|
float | None
|
Total wall-clock time in seconds. |
None
|
training_time
|
float | None
|
Training phase time in seconds. |
None
|
generation_time
|
float | None
|
Generation phase time in seconds. |
None
|
evaluation_time
|
float | None
|
Evaluation phase time in seconds. |
None
|
report
|
MultimodalReport | None
|
Evaluation report to render as HTML. |
None
|
Returns:
| Type | Description |
|---|---|
SafeSynthesizerResults
|
A |
SafeSynthesizerResults
|
optional HTML evaluation report. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |