sc2_datasets.lightning.datamodules.sc2_replaypack_datamodule¶
Classes¶
Defines a LightningDataModule abstraction for a single StarCraft II replaypack. |
Module Contents¶
- class SC2ReplaypackDataModule(replaypack_name: str, unpack_dir: pathlib.Path | str = Path('./data/unpack').resolve(), download_dir: pathlib.Path | str = Path('./data/download').resolve(), url: str = '', download: bool = True, transform: Callable | None = None, batch_size: int = 256, num_workers: int = 0, unpack_n_workers: int = 16, validator: Callable | None = None)¶
Bases:
pytorch_lightning.LightningDataModuleDefines a LightningDataModule abstraction for a single StarCraft II replaypack.
- Parameters:
replaypack_name (str) – Specifies a replaypack name which will be used as a directory name.
unpack_dir (Path | str, optional) – Specifies the path where the replaypack (dataset) will be unpacked into a custom directory structure, by default “./data/unpack”
download_dir (Path | str, optional) – Specifies the path where the replaypack (dataset) will be downloaded, by default “./data/download”
url (str, optional) – Specifies the url which will be used to download the replaypack (dataset), by default “”
download (bool, optional) – Specifies if the dataset should be downloaded. Otherwise the dataset is loaded from the unpack_dir and a custom directory structure is assumed, by default True
transform (Callable | None, optional) – Specifies the PyTorch transforms to be used on the replaypack (dataset), Deprecated since version v1.5: Will be removed in v1.7.0, by default None
batch_size (int, optional) – Batch size which will be used for learning tasks, by default 256
num_workers (int, optional) – Number of workers used for dataloaders, by default 0
unpack_n_workers (int, optional) – Specifies the number of workers that will be used for unpacking the archive, by default 16
validator (Callable | None, optional) – Specifies the validation option for fetched data, this can also act as a filtering function that will be applied for the entirety of the dataset, by default None
- transform = None¶
- batch_size = 256¶
- num_workers = 0¶
- replaypack_name¶
- unpack_dir¶
- download_dir¶
- url = ''¶
- download = True¶
- unpack_n_workers = 16¶
- validator = None¶
- prepare_data() None¶
- setup(stage: str | None = None) None¶
- train_dataloader() torch.utils.data.dataloader.DataLoader¶
- val_dataloader() torch.utils.data.dataloader.DataLoader¶
- test_dataloader() torch.utils.data.dataloader.DataLoader¶
- teardown(stage: str | None = None) None¶