MCPcopy Create free account
hub / github.com/NVlabs/CTG / dump_episode_buffer

Function dump_episode_buffer

scripts/scene_editor.py:348–357  ·  view source on GitHub ↗
(buffer, scene_index, start_frames, h5_path)

Source from the content-addressed store, hash-verified

346
347
348def dump_episode_buffer(buffer, scene_index, start_frames, h5_path):
349 import h5py
350 h5_file = h5py.File(h5_path, "a")
351
352 for ei, si, scene_buffer in zip(start_frames, scene_index, buffer):
353 for mk in scene_buffer:
354 h5key = "/{}_{}/{}".format(si, ei, mk)
355 h5_file.create_dataset(h5key, data=scene_buffer[mk])
356 h5_file.close()
357 print("scene {} written to {}".format(scene_index, h5_path))
358
359
360if __name__ == "__main__":

Callers 1

run_scene_editorFunction · 0.85

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected