# Reader

## timenet.reader

Deserialization of a TimeF version directory into a :class:`~timenet.dataset.TimeFDataset`.

### TimeFReader

Reads a committed TimeF version directory. Use as a context manager to close shard handles.

#### metadata `property`

```
metadata: DatasetMetadata
```

The dataset's descriptive identity.

#### schema `property`

```
schema: DatasetSchema
```

The dataset's type declaration, reconstructed from the manifest.

#### tasks `property`

```
tasks: tuple[Task, ...]
```

All tasks, with `from_tasks` resolved.

#### close

```
close() -> None
```

Close every cached shard file handle and drop cached row groups.

#### iter\_samples

```
iter_samples() -> Iterator[Sample]
```

Yield each sample lazily without materializing a :class:`TimeFDataset`.

Yields:

| Type | Description |
| --- | --- |
| `Sample` | Each reconstructed :class:`Sample`. |

#### read

```
read() -> TimeFDataset
```

Materialize the full dataset.

Returns:

| Name | Type | Description |
| --- | --- | --- |
| `A` | `TimeFDataset` | class:`TimeFDataset` with lazy per-series loaders and the reconstructed schema/tasks. |
