|
1 | 1 | {
|
2 |
| - "cells": [ |
3 |
| - { |
4 |
| - "cell_type": "markdown", |
5 |
| - "metadata": {}, |
6 |
| - "source": [ |
7 |
| - "# Example usage\n", |
8 |
| - "\n", |
9 |
| - "To use `sc2_datasets` in a project:" |
10 |
| - ] |
11 |
| - }, |
12 |
| - { |
13 |
| - "cell_type": "code", |
14 |
| - "execution_count": 2, |
15 |
| - "metadata": {}, |
16 |
| - "outputs": [ |
17 |
| - { |
18 |
| - "name": "stderr", |
19 |
| - "output_type": "stream", |
20 |
| - "text": [ |
21 |
| - "Extracting unpack: 100%|██████████| 1/1 [00:00<00:00, 200.00it/s]\n", |
22 |
| - "Extracting 2022_TestReplaypack: 100%|██████████| 1/1 [00:00<00:00, 333.36it/s]\n" |
23 |
| - ] |
24 |
| - } |
25 |
| - ], |
26 |
| - "source": [ |
27 |
| - "from sc2_datasets.torch.sc2_egset_dataset import SC2EGSetDataset\n", |
28 |
| - "from sc2_datasets.available_replaypacks import EXAMPLE_SYNTHETIC_REPLAYPACKS\n", |
29 |
| - "\n", |
30 |
| - "# Initialize the dataset:\n", |
31 |
| - "sc2_egset_dataset = SC2EGSetDataset(\n", |
32 |
| - " unpack_dir=\"../tests/test_output/unpack\", # Specify existing directory path, where the data will be unpacked.\n", |
33 |
| - " download_dir=\"../tests/test_output/download\", # Specify existing directory path, where the data will be downloaded.\n", |
34 |
| - " download=True,\n", |
35 |
| - " names_urls=EXAMPLE_SYNTHETIC_REPLAYPACKS, # Use a synthetic replaypack containing 1 replay.\n", |
36 |
| - ")\n", |
37 |
| - "\n", |
38 |
| - "# Iterate over instances:\n", |
39 |
| - "for i in range(len(sc2_egset_dataset)):\n", |
40 |
| - " sc2_egset_dataset[i]" |
41 |
| - ] |
42 |
| - } |
43 |
| - ], |
44 |
| - "metadata": { |
45 |
| - "kernelspec": { |
46 |
| - "display_name": "Python 3.10.0 ('venv': venv)", |
47 |
| - "language": "python", |
48 |
| - "name": "python3" |
49 |
| - }, |
50 |
| - "language_info": { |
51 |
| - "codemirror_mode": { |
52 |
| - "name": "ipython", |
53 |
| - "version": 3 |
54 |
| - }, |
55 |
| - "file_extension": ".py", |
56 |
| - "mimetype": "text/x-python", |
57 |
| - "name": "python", |
58 |
| - "nbconvert_exporter": "python", |
59 |
| - "pygments_lexer": "ipython3", |
60 |
| - "version": "3.10.0" |
61 |
| - }, |
62 |
| - "vscode": { |
63 |
| - "interpreter": { |
64 |
| - "hash": "ddabeebea1640b0163a92815eef996f97fed6bbf3bb1d5b76776c493c09f748f" |
65 |
| - } |
66 |
| - } |
67 |
| - }, |
68 |
| - "nbformat": 4, |
69 |
| - "nbformat_minor": 4 |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "# Example usage\n", |
| 8 | + "\n", |
| 9 | + "To use `sc2_datasets` in a project:" |
| 10 | + ] |
| 11 | + }, |
| 12 | + { |
| 13 | + "cell_type": "code", |
| 14 | + "execution_count": 2, |
| 15 | + "metadata": {}, |
| 16 | + "outputs": [ |
| 17 | + { |
| 18 | + "name": "stderr", |
| 19 | + "output_type": "stream", |
| 20 | + "text": [ |
| 21 | + "Extracting unpack: 100%|██████████| 1/1 [00:00<00:00, 200.00it/s]\n", |
| 22 | + "Extracting 2022_TestReplaypack: 100%|██████████| 1/1 [00:00<00:00, 333.36it/s]\n" |
| 23 | + ] |
| 24 | + } |
| 25 | + ], |
| 26 | + "source": [ |
| 27 | + "from sc2_datasets.torch.sc2_egset_dataset import SC2EGSetDataset\n", |
| 28 | + "from sc2_datasets.available_replaypacks import EXAMPLE_SYNTHETIC_REPLAYPACKS\n", |
| 29 | + "\n", |
| 30 | + "# Initialize the dataset:\n", |
| 31 | + "sc2_egset_dataset = SC2EGSetDataset(\n", |
| 32 | + " unpack_dir=\"../tests/test_output/unpack\", # Specify existing directory path, where the data will be unpacked.\n", |
| 33 | + " download_dir=\"../tests/test_output/download\", # Specify existing directory path, where the data will be downloaded.\n", |
| 34 | + " download=True,\n", |
| 35 | + " names_urls=EXAMPLE_SYNTHETIC_REPLAYPACKS, # Use a synthetic replaypack containing 1 replay.\n", |
| 36 | + ")\n", |
| 37 | + "\n", |
| 38 | + "# Iterate over instances:\n", |
| 39 | + "for i in range(len(sc2_egset_dataset)):\n", |
| 40 | + " sc2_egset_dataset[i]" |
| 41 | + ] |
| 42 | + } |
| 43 | + ], |
| 44 | + "metadata": { |
| 45 | + "kernelspec": { |
| 46 | + "display_name": "Python 3.10.0 ('venv': venv)", |
| 47 | + "language": "python", |
| 48 | + "name": "python3" |
| 49 | + }, |
| 50 | + "language_info": { |
| 51 | + "codemirror_mode": { |
| 52 | + "name": "ipython", |
| 53 | + "version": 3 |
| 54 | + }, |
| 55 | + "file_extension": ".py", |
| 56 | + "mimetype": "text/x-python", |
| 57 | + "name": "python", |
| 58 | + "nbconvert_exporter": "python", |
| 59 | + "pygments_lexer": "ipython3", |
| 60 | + "version": "3.10.0" |
| 61 | + }, |
| 62 | + "vscode": { |
| 63 | + "interpreter": { |
| 64 | + "hash": "ddabeebea1640b0163a92815eef996f97fed6bbf3bb1d5b76776c493c09f748f" |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
| 68 | + "nbformat": 4, |
| 69 | + "nbformat_minor": 4 |
70 | 70 | }
|
0 commit comments