Example usage

To use sc2_datasets in a project:

from sc2_datasets.available_replaypacks import EXAMPLE_SYNTHETIC_REPLAYPACKS
from sc2_datasets.torch.sc2_egset_dataset import SC2EGSetDataset

# Initialize the dataset:
sc2_egset_dataset = SC2EGSetDataset(
    unpack_dir="../tests/test_output/unpack",  # Specify existing directory path, where the data will be unpacked.
    download_dir="../tests/test_output/download",  # Specify existing directory path, where the data will be downloaded.
    download=True,
    names_urls=EXAMPLE_SYNTHETIC_REPLAYPACKS,  # Use a synthetic replaypack containing 1 replay.
)

# Iterate over instances:
for i in range(len(sc2_egset_dataset)):
    sc2_egset_dataset[i]
Extracting unpack: 100%|██████████| 1/1 [00:00<00:00, 200.00it/s]
Extracting 2022_TestReplaypack: 100%|██████████| 1/1 [00:00<00:00, 333.36it/s]