Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/analysis utils #37

Merged
merged 76 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
c580620
Adding structure for vault analysis and fixing download_dataset.py va…
lbeyers Jul 24, 2024
c8687b2
Minimal saco addition.
lbeyers Jul 24, 2024
3696625
Put saco into vault analysis file, refined vault subsampling and sepa…
lbeyers Jul 24, 2024
409c567
Rename vault utils
lbeyers Jul 25, 2024
9f186bf
Change download dataset structure to include dataset source
lbeyers Jul 25, 2024
7f13c3c
Chore: clean up imports
lbeyers Jul 25, 2024
b217675
Test dataset downloading and added ability to enter custom download path
lbeyers Jul 25, 2024
ac7af59
Chore: update dataset download script to match download function
lbeyers Jul 25, 2024
44f9fa3
Added exception to catch bad url entries
lbeyers Jul 25, 2024
eca1107
Chore: add dataset source to main script for downloading datasets
lbeyers Jul 25, 2024
e8ff882
Extending user-friendliness of the vault downloading process and vaul…
lbeyers Jul 25, 2024
b6a7bf8
Vault analysis notebook added explanation of OG-MARL file structure v…
lbeyers Jul 25, 2024
7f4bbaa
Vault analysis demo: developing the subsampling explainer.
lbeyers Jul 25, 2024
16f2550
Vault subsampling working.
lbeyers Jul 25, 2024
d9b7a63
Merge branch 'main' into feat/analysis_utils
lbeyers Jul 25, 2024
753df52
Decide level of utils soon
lbeyers Jul 25, 2024
c9c719c
Still need to work on getting the subsample similar assimilated and s…
lbeyers Jul 26, 2024
2f37230
Pre-test tweaking of similar subsampling. One file for one subsamplin…
lbeyers Jul 29, 2024
77e7f9d
Chore: imports cleanup
lbeyers Jul 29, 2024
bc6b837
Saving of returns added so that no reprocessing is required
lbeyers Jul 29, 2024
941167d
Added combining of vaults, working in notebook.
lbeyers Jul 29, 2024
4157af4
Added utility to perform a full analysis. Now clean up and add in wha…
lbeyers Jul 29, 2024
5e2d63a
Improve dataset analysis full set.
lbeyers Jul 29, 2024
47c80e5
Bespoke sampling: made a start.
lbeyers Jul 29, 2024
755798b
Added more generalness to plotting all datasets in the vault.
lbeyers Jul 30, 2024
324d332
NB fix to subsampling function, off by one error.
lbeyers Jul 30, 2024
4106f56
Added the check for final transition being terminal back in.
lbeyers Jul 30, 2024
496daf1
Extended the bespoke subsampling notebook.
lbeyers Jul 30, 2024
bbcb525
Better notebook run
lbeyers Jul 30, 2024
87f8f86
Chore: imports cleanup
lbeyers Jul 30, 2024
070d494
Chore: cleanup dataset analysis notebook
lbeyers Jul 30, 2024
332ad0b
Updated dataset dict to include alberdice
lbeyers Aug 8, 2024
d3726f8
Minor changes to bespoke sampling notebook.
lbeyers Aug 8, 2024
ab31f73
Separated out changes: made function for describing structure, episod…
lbeyers Aug 15, 2024
2759a89
Chore: updated fn names.
lbeyers Aug 15, 2024
99107e5
Chore: docstrings
lbeyers Aug 15, 2024
c9c7db1
CHore: change wording.
lbeyers Aug 15, 2024
50de925
Minor update to make histograms have whitegrid style.
lbeyers Aug 15, 2024
be2ed27
Merge branch 'main' into feat/analysis_utils
lbeyers Aug 15, 2024
ff63745
Added utils for saving plots.
lbeyers Aug 15, 2024
9becb61
Added missing plot save into summary function.
lbeyers Aug 15, 2024
a927d4d
Minor change: don't save figs with titles.
lbeyers Aug 15, 2024
d73e489
Plot prettifying.
lbeyers Aug 15, 2024
1dca22e
Fix: correct getting the head of a vault.
lbeyers Aug 19, 2024
3cdb0c7
Tbl mtn distribution and check not save vault to same location within…
lbeyers Aug 20, 2024
eb43b4a
CHore: pre-commit.
lbeyers Aug 20, 2024
329323d
Chore: function typing for analyse_vaults.
lbeyers Aug 20, 2024
94f3d4d
Chore: Docstrings partially done for analyse_vault.
lbeyers Aug 20, 2024
e01afdc
Chore docstrings cont.
lbeyers Aug 20, 2024
3cfffca
CHore: typing functions in combine_vaults.
lbeyers Aug 20, 2024
051c3fa
Chore: typing for download_vault.
lbeyers Aug 20, 2024
2894f60
Chore: typing for subsample_bespoke.
lbeyers Aug 20, 2024
3e496d6
Chore: pre-commit and typing.
lbeyers Aug 20, 2024
979845b
Chore: reduce line lengths.
lbeyers Aug 21, 2024
d7881cf
Quickfix: get vault info of those available.
lbeyers Aug 21, 2024
3715efc
Added omiga and omar to the registry.
lbeyers Aug 21, 2024
3960d52
Add utils to save plots at custom path.
lbeyers Aug 22, 2024
fd2c805
Fix: handle larger batch sizes.
lbeyers Aug 22, 2024
cbe4a62
Fix: handle larger batch sizes.
lbeyers Aug 22, 2024
5c78fd5
Example notebook generates all episode return distribution plots.
lbeyers Aug 22, 2024
dcec56b
Improvements to manual subsampling notebook.
lbeyers Aug 22, 2024
25ed203
Improvements to dataset anaylsis and subsampling notebook.
lbeyers Aug 22, 2024
b4baa45
Fix: subsampling checks.
lbeyers Aug 22, 2024
1b461b8
Fix: strip->remove_suffix.
lbeyers Aug 22, 2024
50249cd
Updated notebooks.
lbeyers Aug 22, 2024
e255590
Fix: last pesky strip changed to remove_suffix.
lbeyers Aug 22, 2024
c613561
CHore:precommit.
lbeyers Aug 22, 2024
0ebc27f
Chore: some typos.
lbeyers Aug 22, 2024
92d1f00
Fix: ruff hook ID B006 no mutable default arguments.
lbeyers Aug 22, 2024
bf9da2c
Chore:address precommit issues.
lbeyers Aug 22, 2024
a0cf2cc
CHore: more pre-commit fixes.
lbeyers Aug 22, 2024
4a86475
Chore: pre-commit again.
lbeyers Aug 22, 2024
ccf603f
Chore:pre-commit wrap-ups.
lbeyers Aug 22, 2024
d9cd8ad
Remove two unnecessary notebooks.
lbeyers Aug 22, 2024
a6d9455
Merge branch 'main' into feat/analysis_utils
lbeyers Aug 22, 2024
d4093c8
Make printing options prettier.
lbeyers Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion baselines/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from og_marl.environments import get_environment
from og_marl.loggers import JsonWriter, WandbLogger
from og_marl.offline_dataset import download_and_unzip_vault
from og_marl.vault_utils.download_vault import download_and_unzip_vault
from og_marl.replay_buffers import FlashbaxReplayBuffer
from og_marl.tf2.networks import CNNEmbeddingNetwork
from og_marl.tf2.systems import get_system
Expand All @@ -24,6 +24,7 @@
set_growing_gpu_memory()

FLAGS = flags.FLAGS
flags.DEFINE_string("dataset_source", "og_marl", "Dataset source.")
flags.DEFINE_string("env", "pettingzoo", "Environment name.")
flags.DEFINE_string("scenario", "pursuit", "Environment scenario name.")
flags.DEFINE_string("dataset", "Good", "Dataset type.: 'Good', 'Medium', 'Poor' or 'Replay' ")
Expand Down
621 changes: 621 additions & 0 deletions examples/dataset_analysis_demo.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/download_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
from absl import app, flags

from og_marl.offline_dataset import download_and_unzip_vault
from og_marl.vault_utils.download_vault import download_and_unzip_vault

FLAGS = flags.FLAGS
flags.DEFINE_string("env_name", "smac_v1", "Environment name.")
Expand All @@ -22,7 +22,7 @@

def main(_):
# Download vault
download_and_unzip_vault(FLAGS.env_name, FLAGS.scenario_name)
download_and_unzip_vault(FLAGS.daset_source, FLAGS.env, FLAGS.scenario)

# NEXT STEPS: See `examples/dataset_api_demo.ipynb`

Expand Down
552 changes: 552 additions & 0 deletions examples/manual_dataset_subsampling_demo.ipynb

Large diffs are not rendered by default.

213 changes: 0 additions & 213 deletions og_marl/offline_dataset.py

This file was deleted.

Loading
Loading