Skip to content

Commit

Permalink
Merge pull request #12 from instadeepai/docs/installation-readme
Browse files Browse the repository at this point in the history
Docs/installation readme: Trying out adding a nav hierarchy
  • Loading branch information
jcformanek authored Jan 31, 2024
2 parents 1c44159 + 36239c7 commit f458d14
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The following is a list of the latest updates to OG-MARL:

✅ We have implemented our **first set of JAX-based systems in OG-MARL**. Our JAX systems use [Flashbax](https://github.com/instadeepai/flashbax) as the replay buffer backend. Flashbax buffers are completly jit-able, which means that our JAX systems have fully intergrated and jitted training and data sampling.

✅ We have **intergrated [MARL-eval](https://github.com/instadeepai/marl-eval/tree/main)** into OG-MARL to standardise and simplify the reporting of experimental results.
✅ We have **integrated [MARL-eval](https://github.com/instadeepai/marl-eval/tree/main)** into OG-MARL to standardise and simplify the reporting of experimental results.

## Need for Speed 🏎️

Expand Down
64 changes: 64 additions & 0 deletions docs/datasets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Website Page</title>
</head>
<body>
<h1>Datasets</h1>
<h2>SMAC V1</h2>
<ul>
<li><a href=https://tinyurl.com/3m-dataset>3m</a></li>
<li><a href=https://tinyurl.com/8m-dataset>8m</a></li>
<li><a href=https://tinyurl.com/5m-vs-6m-dataset>5m_vs_6m</a></li>
<li><a href=https://tinyurl.com/2s3z-dataset>2s3z</a></li>
<li><a href=https://tinyurl.com/3s5z-vs-3s6z-dataset3>3s5z_vs_3s6z</a></li>
<li><a href=https://tinyurl.com/2c-vs-64zg-dataset>2c_vs_64zg</a></li>
<li><a href=https://tinyurl.com/27m-vs-30m-dataset>27m_vs_30m</a></li>
</ul>

<h2>SMAC V2</h2>
<ul>
<li><a href=https://tinyurl.com/terran-5-vs-5-dataset>terran_5_vs_5</a></li>
<li><a href=https://tinyurl.com/zerg-5-vs-5-dataset>zerg_5_vs_5</a></li>
<li><a href=https://tinyurl.com/terran-10-vs-10-dataset>terran_10_vs_10</a></li>
</ul>

<h2>Flatland</h2>
<ul>
<li><a href=https://tinyurl.com/3trains-dataset>3_trains</a></li>
<li><a href=https://tinyurl.com/5trains-dataset>5_trains</a></li>
</ul>

<h2>PettingZoo</h2>
<ul>
<li><a href=https://tinyurl.com/pursuit-dataset>pursuit</a></li>
<li><a href=https://tinyurl.com/pistonball-dataset>pistonball</a></li>
<li><a href=https://tinyurl.com/coop-pong-dataset>coop_pong</a></li>
<li><a href=https://tinyurl.com/kaz-dataset>kaz</a></li>
</ul>

<h2>MaMuJoCo</h2>
<ul>
<li><a href=https://tinyurl.com/2halfcheetah-dataset>2_halfcheetah</a></li>
<li><a href=https://tinyurl.com/2ant-dataset>2_ant</a></li>
<li><a href=https://tinyurl.com/4ant-dataset>4_ant</a></li>
</ul>

<h2>Voltage Control</h2>
<ul>
<li><a href=https://tinyurl.com/case33-3min-final-dataset>case33_3min_final</a></li>
</ul>

<h2>City Learn</h2>
<ul>
<li><a href=https://tinyurl.com/2022-all-phases-dataset>2022_all_phases</a></li>
</ul>

<h2>MPE</h2>
<ul>
<li><a href=https://tinyurl.com/simple-adversary-dataset>simple_adversary</a></li>
</ul>

</body>
</html>
63 changes: 63 additions & 0 deletions docs/html_from_dict.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
DATASET_URLS = {
"smac_v1": {
"3m": "https://tinyurl.com/3m-dataset",
"8m": "https://tinyurl.com/8m-dataset",
"5m_vs_6m": "https://tinyurl.com/5m-vs-6m-dataset",
"2s3z": "https://tinyurl.com/2s3z-dataset",
"3s5z_vs_3s6z": "https://tinyurl.com/3s5z-vs-3s6z-dataset3",
"2c_vs_64zg": "https://tinyurl.com/2c-vs-64zg-dataset",
"27m_vs_30m": "https://tinyurl.com/27m-vs-30m-dataset"
},
"smac_v2": {
"terran_5_vs_5": "https://tinyurl.com/terran-5-vs-5-dataset",
"zerg_5_vs_5": "https://tinyurl.com/zerg-5-vs-5-dataset",
"terran_10_vs_10": "https://tinyurl.com/terran-10-vs-10-dataset"
},
"flatland": {
"3_trains": "https://tinyurl.com/3trains-dataset",
"5_trains": "https://tinyurl.com/5trains-dataset"
},
"pettingzoo": {
"pursuit": "https://tinyurl.com/pursuit-dataset",
"pistonball":"https://tinyurl.com/pistonball-dataset",
"coop_pong":"https://tinyurl.com/coop-pong-dataset",
"kaz":"https://tinyurl.com/kaz-dataset"
},
"mamujoco": {
"2_halfcheetah": "https://tinyurl.com/2halfcheetah-dataset",
"2_ant": "https://tinyurl.com/2ant-dataset",
"4_ant": "https://tinyurl.com/4ant-dataset"
},
"voltage_control": {
"case33_3min_final": "https://tinyurl.com/case33-3min-final-dataset",
},
"city_learn": {
"2022_all_phases":"https://tinyurl.com/2022-all-phases-dataset"
},
"mpe": {
"simple_adversary":"https://tinyurl.com/simple-adversary-dataset"
}
}

env_names = ["SMAC V1","SMAC V2","Flatland","PettingZoo","MaMuJoCo","Voltage Control","City Learn","MPE"]

lines = ["<!DOCTYPE html>\n",
"<html lang=\"en\">\n",
"<meta charset=\"UTF-8\">\n",
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n",
"<title>Website Page</title>\n",
"</head>\n",
"<body>\n",
"<h1>Datasets</h1>\n"
]
for i,env in enumerate(list(DATASET_URLS.keys())):
lines.extend(["<h2>"+env_names[i]+"</h2>\n","<ul>\n"])
for map in DATASET_URLS[env].keys():
lines.append(" <li><a href="+DATASET_URLS[env][map]+">"+map+"</a></li>\n")
lines.extend(["</ul>\n","\n"])

lines.extend(["</body>\n", "</html>\n"])

f = open("test.txt","w")
f.writelines(lines)
f.close()
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ theme:
icon: material/weather-night
name: Switch to light mode

nav:
-Home: 'index.md'
-Datasets: 'datasets.md'

markdown_extensions:
- attr_list
- md_in_html
Expand Down
24 changes: 18 additions & 6 deletions og_marl/offline_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __getattr__(self, name):
"8m": "https://tinyurl.com/8m-dataset",
"5m_vs_6m": "https://tinyurl.com/5m-vs-6m-dataset",
"2s3z": "https://tinyurl.com/2s3z-dataset",
"3s5z_vs_3s6z": "ttps://tinyurl.com/3s5z-vs-3s6z-dataset3",
"3s5z_vs_3s6z": "https://tinyurl.com/3s5z-vs-3s6z-dataset3",
"2c_vs_64zg": "https://tinyurl.com/2c-vs-64zg-dataset",
"27m_vs_30m": "https://tinyurl.com/27m-vs-30m-dataset"
},
Expand All @@ -135,24 +135,36 @@ def __getattr__(self, name):
"3_trains": "https://tinyurl.com/3trains-dataset",
"5_trains": "https://tinyurl.com/5trains-dataset"
},
"pettingzoo": {
"pursuit": "https://tinyurl.com/pursuit-dataset",
"pistonball":"https://tinyurl.com/pistonball-dataset",
"coop_pong":"https://tinyurl.com/coop-pong-dataset",
"kaz":"https://tinyurl.com/kaz-dataset"
},
"mamujoco": {
"2_halfcheetah": "",
"2_ant": "",
"4_ant": ""
"2_halfcheetah": "https://tinyurl.com/2halfcheetah-dataset",
"2_ant": "https://tinyurl.com/2ant-dataset",
"4_ant": "https://tinyurl.com/4ant-dataset"
},
"voltage_control": {
"case33_3min_final": "https://tinyurl.com/case33-3min-final-dataset",
},
"city_learn": {
"2022_all_phases":"https://tinyurl.com/2022-all-phases-dataset"
},
"mpe": {
"simple_adversary":"https://tinyurl.com/simple-adversary-dataset"
}
}
def download_and_unzip_dataset(env_name, scenario_name, dataset_base_dir="./datasets"):
dataset_download_url = DATASET_URLS[env_name][scenario_name]

os.makedirs(f'{dataset_base_dir}/tmp/', exist_ok=True)
os.makedirs(f'{dataset_base_dir}/{env_name}/{scenario_name}', exist_ok=True)
os.makedirs(f'{dataset_base_dir}/{env_name}', exist_ok=True)

zip_file_path = f'{dataset_base_dir}/tmp/tmp_dataset.zip'

extraction_path = f'{dataset_base_dir}/{env_name}/{scenario_name}'
extraction_path = f'{dataset_base_dir}/{env_name}/'

response = requests.get(dataset_download_url, stream=True)
total_length = response.headers.get('content-length')
Expand Down

0 comments on commit f458d14

Please sign in to comment.