From ac37128945e79ac18d45c371e0e24d7df312bbee Mon Sep 17 00:00:00 2001 From: Cheng Chi Date: Tue, 11 Apr 2023 15:19:07 -0400 Subject: [PATCH] added gitignore conda and fixed h5py_cache dependency --- .gitignore | 140 +++++++++++++++++++++++++++++++++++++++++ conda_env.yaml | 3 +- record_sim_episodes.py | 5 +- 3 files changed, 143 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..d1e4c693 --- /dev/null +++ b/.gitignore @@ -0,0 +1,140 @@ +bin +logs +wandb +outputs +data +data_local +.vscode +_wandb + +**/.DS_Store + +fuse.cfg + +*.ai + +# Generation results +results/ + +ray/auth.json + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ \ No newline at end of file diff --git a/conda_env.yaml b/conda_env.yaml index 9ab88c89..0f44d6b0 100644 --- a/conda_env.yaml +++ b/conda_env.yaml @@ -20,5 +20,4 @@ dependencies: - einops=0.6.0 - packaging=23.0 - h5py=3.8.0 - - pip: - - h5py_cache==1.0 + - ipython=8.12.0 diff --git a/record_sim_episodes.py b/record_sim_episodes.py index a8f8491e..253fdea1 100644 --- a/record_sim_episodes.py +++ b/record_sim_episodes.py @@ -3,7 +3,7 @@ import numpy as np import argparse import matplotlib.pyplot as plt -import h5py_cache +import h5py from constants import PUPPET_GRIPPER_POSITION_NORMALIZE_FN, SIM_TASK_CONFIGS from ee_sim_env import make_ee_sim_env @@ -158,8 +158,7 @@ def main(args): # HDF5 t0 = time.time() dataset_path = os.path.join(dataset_dir, f'episode_{episode_idx}') - with h5py_cache.File(dataset_path + '.hdf5', 'w', chunk_cache_mem_size=1024 ** 2 * 2) as root: - # with h5py.File(dataset_path + '.hdf5', 'w') as root: + with h5py.File(dataset_path + '.hdf5', 'w', rdcc_nbytes=1024 ** 2 * 2) as root: root.attrs['sim'] = True obs = root.create_group('observations') image = obs.create_group('images')