Skip to content

Commit

Permalink
Move metadata to JSON and add data_format (#156)
Browse files Browse the repository at this point in the history
* init draft PR

* fix bugs

* remove from hosting.py

* fix some tests

* fix problems

* remove h5py dependency in local

* general refactoring

* remove PettingZoo leftovers

* remove h5py in pydoc

* refactor minari_storage

* factor combine_datasets

* cache spaces and make them optional in metadata

* test fixes

* fix build 3.9 & some linter

* restore tests

* refactor get_normalized_score

* fix test after merge

* metadata on json +  support for multiple storages

* prepare for PR

* remove double import

* fix pre-commit

* disable tests with remote datasets

* fix pyproject.toml

* fix pre-commit

* fix rodrigo's comments

* simplify registry

* read metadata from json

* add minari show test

* fix typing gen_dataset

* fix pre-commit

* fix minari show table

* fix pre-commit

* improve list local robustness

* fix pre-commit

* address comments

* support none spaces

* fix format
  • Loading branch information
younik authored Feb 5, 2024
1 parent 26fb98e commit 7d85164
Show file tree
Hide file tree
Showing 12 changed files with 493 additions and 355 deletions.
1 change: 1 addition & 0 deletions docs/_scripts/gen_dataset_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def _md_table(table_dict: Dict[str, str]) -> str:
for dataset_id in all_remote_datasets.keys():

env_name, dataset_name, version = parse_dataset_id(dataset_id)
assert env_name is not None

if dataset_name not in filtered_datasets[env_name]:
max_version = get_remote_dataset_versions(env_name, dataset_name, True)[0]
Expand Down
2 changes: 1 addition & 1 deletion minari/dataset/minari_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(
if isinstance(data, MinariStorage):
self._data = data
elif isinstance(data, (str, os.PathLike)):
self._data = MinariStorage(data)
self._data = MinariStorage.read(data)
else:
raise ValueError(f"Unrecognized type {type(data)} for data")

Expand Down
Loading

0 comments on commit 7d85164

Please sign in to comment.