Closed chernyadev closed 4 months ago
I'm having this bug when caching the demos.
Traceback (most recent call last):
File "/Users/xiao/miniconda3/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/Users/xiao/miniconda3/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/Users/xiao/work/robobase/robobase/envs/bigym.py", line 184, in _get_demo_fn
demos = demo_store.get_demos(
File "/Users/xiao/work/bigym_release/demonstrations/demo_store.py", line 155, in get_demos
self.cache_demo(demo, frequency)
File "/Users/xiao/work/bigym_release/demonstrations/demo_store.py", line 81, in cache_demo
file_path = demo.save(Path(temp_dir) / demo.metadata.filename)
File "/Users/xiao/work/bigym_release/demonstrations/demo.py", line 285, in save
save_file(demo_dict, path, self.safetensor_metadata)
File "/Users/xiao/work/bigym_release/demonstrations/demo.py", line 317, in safetensor_metadata
return self.metadata.ready_for_safetensors()
File "/Users/xiao/work/bigym_release/demonstrations/utils.py", line 132, in ready_for_safetensors
"environment_data": json.dumps(asdict(self.environment_data)),
File "/Users/xiao/miniconda3/lib/python3.10/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/Users/xiao/miniconda3/lib/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/Users/xiao/miniconda3/lib/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/Users/xiao/miniconda3/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ListConfig is not JSON serializable
After looking into it, the bug seems to be that in the camera configs, resolution
is ListConfig
rather than list
. I temporarily patched it and pushed to this branch, but I think we need a more elegant fix.
For path of cached demos seem to have the wrong version? Currently mine is 0.9.0
, see my path below
/Users/xiao/.bigym/demonstrations/0.9.0
For path of cached demos seem to have the wrong version? Currently mine is
0.9.0
, see my path below/Users/xiao/.bigym/demonstrations/0.9.0
I tested again and this is the only issue left. Otherwise it is good to go!
Dataset and BiGym are versioned separately, so it’s intended that demonstrations have v0.9.0.
Refactor
DemoStore
to use GitHub releases from this repo: bigym_data.Additional changes:
tools/demo_player
by removing redundant functionality.