> This page is for version 0.7.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.

# nemo_gym.web.datasets

Lossless upstream-row adapters for Gym web benchmark JSONL files.

## Module Contents

### Functions

| Name                                                                        | Description                                                              |
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| [`_start_urls`](#nemo_gym-web-datasets-_start_urls)                         | -                                                                        |
| [`adapt_webvoyager_record`](#nemo_gym-web-datasets-adapt_webvoyager_record) | -                                                                        |
| [`gym_row`](#nemo_gym-web-datasets-gym_row)                                 | Wrap a model-independent task in the request shape consumed by WebAgent. |
| [`load_json_records`](#nemo_gym-web-datasets-load_json_records)             | -                                                                        |
| [`write_jsonl`](#nemo_gym-web-datasets-write_jsonl)                         | -                                                                        |

### API

```python
nemo_gym.web.datasets._start_urls(
    value: typing.Any
) -> list[str]
```

```python
nemo_gym.web.datasets.adapt_webvoyager_record(
    record: collections.abc.Mapping[str, typing.Any]
) -> dict[str, typing.Any]
```

```python
nemo_gym.web.datasets.gym_row(
    task: nemo_gym.web.models.WebTask
) -> dict[str, typing.Any]
```

Wrap a model-independent task in the request shape consumed by WebAgent.

The policy adapter owns instructions, tools, image folding, and output
parsing. Keeping those fields out of prepared data lets the exact same
immutable 552-task population run with Nano Omni, Qwen, or another policy.

```python
nemo_gym.web.datasets.load_json_records(
    path: str | pathlib.Path
) -> list[dict[str, typing.Any]]
```

```python
nemo_gym.web.datasets.write_jsonl(
    rows: collections.abc.Iterable[collections.abc.Mapping[str, typing.Any]],
    output: str | pathlib.Path
) -> int
```