Coverage for maze_dataset/dataset/__init__.py: 0%
4 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-09 12:48 -0600
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-09 12:48 -0600
1"""`MazeDatasetConfig`s are used to create a `MazeDataset` via `MazeDataset.from_config(cfg)`"
3When initializing mazes, further configuration options can be specified through the `from_config()` factory method as necessary. Options include 1) whether to generate the dataset during runtime or load an existing dataset, 2) if and how to parallelize generation, and 3) where to store the generated dataset. Full documentation of configuration options is available in our repository [@maze-dataset-github]. Available maze generation algorithms are static methods of the `LatticeMazeGenerators` class.
5Furthermore, a dataset of mazes can be filtered to satisfy certain properties:
7```python
8dataset_filtered: MazeDataset = dataset.filter_by.path_length(min_length=3)
9```
11Custom filters can be specified, and several filters are included:
13- `path_length(min_length: int)`: shortest length from the origin to target should be at least `min_length`.
14- `start_end_distance(min_distance: int)`: Manhattan distance between start and end should be at least `min_distance`, ignoring walls.
15- `remove_duplicates(...)`: remove mazes which are similar to others in the dataset, measured via Hamming distance.
16- `remove_duplicates_fast()`: remove mazes which are exactly identical to others in the dataset.
18All implemented maze generation algorithms are stochastic by nature. For reproducibility, the `seed` parameter of `MazeDatasetConfig` may be set. In practice, we do not find that exact duplicates of mazes are generated with any meaningful frequency,
19even when generating large datasets.
21"""
23from maze_dataset.dataset.collected_dataset import (
24 MazeDatasetCollection,
25 MazeDatasetCollectionConfig,
26)
27from maze_dataset.dataset.maze_dataset import MazeDataset
28from maze_dataset.dataset.maze_dataset_config import MazeDatasetConfig
30__all__ = [
31 # submodules
32 "collected_dataset",
33 "configs",
34 "dataset",
35 "filters",
36 "maze_dataset_config",
37 "maze_dataset",
38 "rasterized",
39 "success_predict_math",
40 # dataset classes
41 "MazeDataset",
42 "MazeDatasetConfig",
43 "MazeDatasetCollection",
44 "MazeDatasetCollectionConfig",
45]