From e4f8df66de6f59b9c6908891472c549af2ec14da Mon Sep 17 00:00:00 2001 From: Cheng Chi Date: Tue, 11 Apr 2023 15:00:56 -0400 Subject: [PATCH 1/3] added conda env --- conda_env.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 conda_env.yaml diff --git a/conda_env.yaml b/conda_env.yaml new file mode 100644 index 0000000..9ab88c8 --- /dev/null +++ b/conda_env.yaml @@ -0,0 +1,24 @@ +name: aloha +channels: + - pytorch + - nvidia + - conda-forge +dependencies: + - python=3.9 + - pip=23.0.1 + - pytorch=2.0.0 + - torchvision=0.15.0 + - pytorch-cuda=11.8 + - pyquaternion=0.9.9 + - pyyaml=6.0 + - rospkg=1.5.0 + - pexpect=4.8.0 + - mujoco=2.3.3 + - dm_control=1.0.9 + - py-opencv=4.7.0 + - matplotlib=3.7.1 + - einops=0.6.0 + - packaging=23.0 + - h5py=3.8.0 + - pip: + - h5py_cache==1.0 From 27d4b69c0e9b04f0742437da6c2c2c89408092d6 Mon Sep 17 00:00:00 2001 From: Cheng Chi Date: Tue, 11 Apr 2023 15:19:07 -0400 Subject: [PATCH 2/3] 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 0000000..d1e4c69 --- /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 9ab88c8..0f44d6b 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 a8f8491..253fdea 100644 --- a/record_sim_episodes.py +++ b/record_sim_episodes.py @@ -3,7 +3,7 @@ import os 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') From fac145ef1496ef98146e4193e8ca1de8a1b67660 Mon Sep 17 00:00:00 2001 From: Cheng Chi Date: Tue, 11 Apr 2023 17:47:25 -0400 Subject: [PATCH 3/3] updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2df26c8..f9e4830 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ You can find all scripted/human demo for simulated environments [here](https://d pip install einops pip install packaging pip install h5py - pip install h5py_cache + pip install ipython cd act/detr && pip install -e . ### Example Usages