-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into baselines-diffusion-policy
- Loading branch information
Showing
620 changed files
with
621,993 additions
and
7,205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,4 @@ videos/ | |
|
||
# testing | ||
.coverage* | ||
htmlcov/ | ||
htmlcov/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
# - id: check-yaml | ||
- id: end-of-file-fixer | ||
files: \.py$ | ||
- id: trailing-whitespace | ||
files: \.py$ | ||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black | ||
exclude: 'warp_maniskill/.*|docs/.*|examples/.*' | ||
args: | ||
- --line-length=88 | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
exclude: 'warp_maniskill/.*|docs/.*|examples/.*' | ||
args: | ||
- --profile=black | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
exclude: 'warp_maniskill/.*|docs/.*|examples/.*' | ||
args: | ||
- -r | ||
- --in-place | ||
- --remove-unused-variables | ||
# - --remove-all-unused-imports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
decisiontransformer.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM ag2897387/maniskill2 | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Decision Transformer | ||
|
||
This baseline is adapted from the `gym` example provided [here](https://github.com/kzl/decision-transformer/tree/master). This folder provides both a jupyter notebook version that can be run on Google Colab as well as a python script that can be used for training a model. A few environments have already been trained on and these runs can be viewed [here](https://wandb.ai/ag115115/decision-transformer). | ||
|
||
## Run Training Using Python Script | ||
|
||
### Using Docker | ||
|
||
1. Pull the docker image | ||
|
||
`docker pull ag2897387/dec_tr_mani:latest` | ||
|
||
2. Run the training script | ||
|
||
`docker run --rm -it --gpus all ag2897387/dec_tr_mani:latest python train.py --env LiftCube-v0 --dataset demos/v0/rigid_body/LiftCube-v0/trajectory.state.pd_ee_delta_pose.h5` | ||
|
||
There are additional arguments that specify parameters for the model and such. | ||
|
||
Results can also be logged to [Wandb](https://wandb.ai/) using the follow arguments. | ||
|
||
`docker run --rm -it --gpus all ag2897387/dec_tr_mani python train.py --dataset demos/v0/rigid_body/{env_id}/trajectory.state.pd_ee_delta_pose.h5 --log_to_wandb true --wandb_key <insert_wandb_key>` | ||
|
||
### Without Docker | ||
1. Install dependencies | ||
``` | ||
pip install mani_skill2 | ||
pip install -r requirements.txt | ||
``` | ||
2. Run the training script | ||
``` | ||
python train.py --env LiftCube-v0 --dataset demos/v0/rigid_body/LiftCube-v0/trajectory.state.pd_ee_delta_pose.h5 | ||
``` |
Oops, something went wrong.