> This page is for version 0.3.0.
> For other versions, use one of these documentation indexes:
> - Main (default): https://docs.nvidia.com/nemo/gym/main/llms.txt
> - 0.7.0: https://docs.nvidia.com/nemo/gym/v0.7.0/llms.txt
> - 0.6.0: https://docs.nvidia.com/nemo/gym/v0.6.0/llms.txt
> - 0.5.1: https://docs.nvidia.com/nemo/gym/v0.5.1/llms.txt
> - 0.5.0: https://docs.nvidia.com/nemo/gym/v0.5.0/llms.txt
> - 0.4.0: https://docs.nvidia.com/nemo/gym/v0.4.0/llms.txt
> - 0.3.0: https://docs.nvidia.com/nemo/gym/v0.3.0/llms.txt
> - 0.2.1: https://docs.nvidia.com/nemo/gym/v0.2.1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/gym/_mcp/server.

# nemo_gym.rollout_compare.report

Render a CompareResult as the text report and the JSON summary.

Finds the losing side's verifier output, from a file under the row's verifier logs directory
resolved against the roots or from a field embedded in the row, tails it, and lays out the
header, the category table and the flip, masked and missing sections. summary_dict is the
JSON shape the command writes.

## Module Contents

### Functions

| Name                                                                        | Description                                                                                             |
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [`_flip_block`](#nemo_gym-rollout_compare-report-_flip_block)               | -                                                                                                       |
| [`_losing_row`](#nemo_gym-rollout_compare-report-_losing_row)               | The worst row on the losing side (meaningful when a side has repeats).                                  |
| [`_resolve_logs_path`](#nemo_gym-rollout_compare-report-_resolve_logs_path) | -                                                                                                       |
| [`_roots_for`](#nemo_gym-rollout_compare-report-_roots_for)                 | -                                                                                                       |
| [`render_report`](#nemo_gym-rollout_compare-report-render_report)           | -                                                                                                       |
| [`summary_dict`](#nemo_gym-rollout_compare-report-summary_dict)             | -                                                                                                       |
| [`tail_lines`](#nemo_gym-rollout_compare-report-tail_lines)                 | -                                                                                                       |
| [`verifier_output`](#nemo_gym-rollout_compare-report-verifier_output)       | (text, source) for a row's verifier stdout: the file under `verifier_logs_dir` when it exists, else the |

### API

```python
nemo_gym.rollout_compare.report._flip_block(
    task: nemo_gym.rollout_compare.schema.TaskComparison,
    roots: nemo_gym.rollout_compare.schema.Roots,
    tail: int
) -> list[str]
```

```python
nemo_gym.rollout_compare.report._losing_row(
    side: nemo_gym.rollout_compare.schema.TaskSide
) -> dict[str, typing.Any]
```

The worst row on the losing side (meaningful when a side has repeats).

```python
nemo_gym.rollout_compare.report._resolve_logs_path(
    logs_dir: str,
    roots: list[pathlib.Path]
) -> typing.Optional[pathlib.Path]
```

```python
nemo_gym.rollout_compare.report._roots_for(
    roots: nemo_gym.rollout_compare.schema.Roots,
    side: nemo_gym.rollout_compare.schema.Side
) -> list[pathlib.Path]
```

```python
nemo_gym.rollout_compare.render_report(
    result: nemo_gym.rollout_compare.schema.CompareResult,
    roots: nemo_gym.rollout_compare.schema.Roots,
    tail: int = 15
) -> str
```

```python
nemo_gym.rollout_compare.summary_dict(
    result: nemo_gym.rollout_compare.schema.CompareResult
) -> dict[str, typing.Any]
```

```python
nemo_gym.rollout_compare.tail_lines(
    text: str,
    count: int
) -> list[str]
```

```python
nemo_gym.rollout_compare.verifier_output(
    row: dict[str, typing.Any],
    roots: list[pathlib.Path]
) -> tuple[typing.Optional[str], str]
```

(text, source) for a row's verifier stdout: the file under `verifier_logs_dir` when it exists, else the
text embedded in the row; `(None, reason)` when neither is available.