Commit ·
d85c478
1
Parent(s): 37f1cd5
Upload . with huggingface_hub
Browse files- .gitattributes +1 -0
- .summary/0/events.out.tfevents.1678554454.qgallouedec-MS-7C84 +3 -0
- README.md +56 -0
- checkpoint_p0/best_000154176_78938112_reward_4602.423.pth +3 -0
- checkpoint_p0/checkpoint_000195056_99868672.pth +3 -0
- checkpoint_p0/checkpoint_000195328_100007936.pth +3 -0
- config.json +134 -0
- git.diff +328 -0
- replay.mp4 +3 -0
- sf_log.txt +0 -0
.gitattributes
CHANGED
|
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
replay.mp4 filter=lfs diff=lfs merge=lfs -text
|
.summary/0/events.out.tfevents.1678554454.qgallouedec-MS-7C84
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1889c6afc61419099c2178c65bb70cf60375e8e138a0650551d0302f9153e7c6
|
| 3 |
+
size 4384629
|
README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: sample-factory
|
| 3 |
+
tags:
|
| 4 |
+
- deep-reinforcement-learning
|
| 5 |
+
- reinforcement-learning
|
| 6 |
+
- sample-factory
|
| 7 |
+
model-index:
|
| 8 |
+
- name: APPO
|
| 9 |
+
results:
|
| 10 |
+
- task:
|
| 11 |
+
type: reinforcement-learning
|
| 12 |
+
name: reinforcement-learning
|
| 13 |
+
dataset:
|
| 14 |
+
name: stick-push-v2
|
| 15 |
+
type: stick-push-v2
|
| 16 |
+
metrics:
|
| 17 |
+
- type: mean_reward
|
| 18 |
+
value: 4615.51 +/- 6.54
|
| 19 |
+
name: mean_reward
|
| 20 |
+
verified: false
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
A(n) **APPO** model trained on the **stick-push-v2** environment.
|
| 24 |
+
|
| 25 |
+
This model was trained using Sample-Factory 2.0: https://github.com/alex-petrenko/sample-factory.
|
| 26 |
+
Documentation for how to use Sample-Factory can be found at https://www.samplefactory.dev/
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
## Downloading the model
|
| 30 |
+
|
| 31 |
+
After installing Sample-Factory, download the model with:
|
| 32 |
+
```
|
| 33 |
+
python -m sample_factory.huggingface.load_from_hub -r qgallouedec/sample-factory-stick-push-v2
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
## Using the model
|
| 38 |
+
|
| 39 |
+
To run the model after download, use the `enjoy` script corresponding to this environment:
|
| 40 |
+
```
|
| 41 |
+
python -m enjoy --algo=APPO --env=stick-push-v2 --train_dir=./train_dir --experiment=sample-factory-stick-push-v2
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
You can also upload models to the Hugging Face Hub using the same script with the `--push_to_hub` flag.
|
| 46 |
+
See https://www.samplefactory.dev/10-huggingface/huggingface/ for more details
|
| 47 |
+
|
| 48 |
+
## Training with this model
|
| 49 |
+
|
| 50 |
+
To continue training with this model, use the `train` script corresponding to this environment:
|
| 51 |
+
```
|
| 52 |
+
python -m train --algo=APPO --env=stick-push-v2 --train_dir=./train_dir --experiment=sample-factory-stick-push-v2 --restart_behavior=resume --train_for_env_steps=10000000000
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Note, you may have to adjust `--train_for_env_steps` to a suitably high number as the experiment will resume at the number of steps it concluded at.
|
| 56 |
+
|
checkpoint_p0/best_000154176_78938112_reward_4602.423.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0877d2c5e25c4ce56bd38db77bbf5e8fe6debc71e2ac104fa9cca60929000f18
|
| 3 |
+
size 98239
|
checkpoint_p0/checkpoint_000195056_99868672.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f652348981187242cf90f57a4e0935e0f39787ef3d0c5c32f5d3018a4359f9f
|
| 3 |
+
size 98567
|
checkpoint_p0/checkpoint_000195328_100007936.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a950be8b63ee717a4d133491eb3a8c535d53a72dd0243497abf08b805e795cb
|
| 3 |
+
size 98567
|
config.json
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"help": false,
|
| 3 |
+
"algo": "APPO",
|
| 4 |
+
"env": "stick-push-v2",
|
| 5 |
+
"experiment": "stick-push-v2",
|
| 6 |
+
"train_dir": "/home/qgallouedec/gia/data/envs/metaworld/train_dir",
|
| 7 |
+
"restart_behavior": "restart",
|
| 8 |
+
"device": "cpu",
|
| 9 |
+
"seed": null,
|
| 10 |
+
"num_policies": 1,
|
| 11 |
+
"async_rl": false,
|
| 12 |
+
"serial_mode": false,
|
| 13 |
+
"batched_sampling": false,
|
| 14 |
+
"num_batches_to_accumulate": 2,
|
| 15 |
+
"worker_num_splits": 2,
|
| 16 |
+
"policy_workers_per_policy": 1,
|
| 17 |
+
"max_policy_lag": 1000,
|
| 18 |
+
"num_workers": 8,
|
| 19 |
+
"num_envs_per_worker": 8,
|
| 20 |
+
"batch_size": 1024,
|
| 21 |
+
"num_batches_per_epoch": 4,
|
| 22 |
+
"num_epochs": 2,
|
| 23 |
+
"rollout": 64,
|
| 24 |
+
"recurrence": 1,
|
| 25 |
+
"shuffle_minibatches": false,
|
| 26 |
+
"gamma": 0.99,
|
| 27 |
+
"reward_scale": 0.1,
|
| 28 |
+
"reward_clip": 1000.0,
|
| 29 |
+
"value_bootstrap": true,
|
| 30 |
+
"normalize_returns": true,
|
| 31 |
+
"exploration_loss_coeff": 0.0,
|
| 32 |
+
"value_loss_coeff": 1.3,
|
| 33 |
+
"kl_loss_coeff": 0.1,
|
| 34 |
+
"exploration_loss": "entropy",
|
| 35 |
+
"gae_lambda": 0.95,
|
| 36 |
+
"ppo_clip_ratio": 0.2,
|
| 37 |
+
"ppo_clip_value": 1.0,
|
| 38 |
+
"with_vtrace": false,
|
| 39 |
+
"vtrace_rho": 1.0,
|
| 40 |
+
"vtrace_c": 1.0,
|
| 41 |
+
"optimizer": "adam",
|
| 42 |
+
"adam_eps": 1e-06,
|
| 43 |
+
"adam_beta1": 0.9,
|
| 44 |
+
"adam_beta2": 0.999,
|
| 45 |
+
"max_grad_norm": 3.5,
|
| 46 |
+
"learning_rate": 0.00295,
|
| 47 |
+
"lr_schedule": "linear_decay",
|
| 48 |
+
"lr_schedule_kl_threshold": 0.008,
|
| 49 |
+
"lr_adaptive_min": 1e-06,
|
| 50 |
+
"lr_adaptive_max": 0.01,
|
| 51 |
+
"obs_subtract_mean": 0.0,
|
| 52 |
+
"obs_scale": 1.0,
|
| 53 |
+
"normalize_input": true,
|
| 54 |
+
"normalize_input_keys": null,
|
| 55 |
+
"decorrelate_experience_max_seconds": 0,
|
| 56 |
+
"decorrelate_envs_on_one_worker": true,
|
| 57 |
+
"actor_worker_gpus": [],
|
| 58 |
+
"set_workers_cpu_affinity": true,
|
| 59 |
+
"force_envs_single_thread": false,
|
| 60 |
+
"default_niceness": 0,
|
| 61 |
+
"log_to_file": true,
|
| 62 |
+
"experiment_summaries_interval": 3,
|
| 63 |
+
"flush_summaries_interval": 30,
|
| 64 |
+
"stats_avg": 100,
|
| 65 |
+
"summaries_use_frameskip": true,
|
| 66 |
+
"heartbeat_interval": 20,
|
| 67 |
+
"heartbeat_reporting_interval": 180,
|
| 68 |
+
"train_for_env_steps": 100000000,
|
| 69 |
+
"train_for_seconds": 10000000000,
|
| 70 |
+
"save_every_sec": 15,
|
| 71 |
+
"keep_checkpoints": 2,
|
| 72 |
+
"load_checkpoint_kind": "latest",
|
| 73 |
+
"save_milestones_sec": -1,
|
| 74 |
+
"save_best_every_sec": 5,
|
| 75 |
+
"save_best_metric": "reward",
|
| 76 |
+
"save_best_after": 100000,
|
| 77 |
+
"benchmark": false,
|
| 78 |
+
"encoder_mlp_layers": [
|
| 79 |
+
64,
|
| 80 |
+
64
|
| 81 |
+
],
|
| 82 |
+
"encoder_conv_architecture": "convnet_simple",
|
| 83 |
+
"encoder_conv_mlp_layers": [
|
| 84 |
+
512
|
| 85 |
+
],
|
| 86 |
+
"use_rnn": false,
|
| 87 |
+
"rnn_size": 512,
|
| 88 |
+
"rnn_type": "gru",
|
| 89 |
+
"rnn_num_layers": 1,
|
| 90 |
+
"decoder_mlp_layers": [],
|
| 91 |
+
"nonlinearity": "tanh",
|
| 92 |
+
"policy_initialization": "torch_default",
|
| 93 |
+
"policy_init_gain": 1.0,
|
| 94 |
+
"actor_critic_share_weights": true,
|
| 95 |
+
"adaptive_stddev": false,
|
| 96 |
+
"continuous_tanh_scale": 0.0,
|
| 97 |
+
"initial_stddev": 1.0,
|
| 98 |
+
"use_env_info_cache": false,
|
| 99 |
+
"env_gpu_actions": false,
|
| 100 |
+
"env_gpu_observations": true,
|
| 101 |
+
"env_frameskip": 1,
|
| 102 |
+
"env_framestack": 1,
|
| 103 |
+
"pixel_format": "CHW",
|
| 104 |
+
"use_record_episode_statistics": false,
|
| 105 |
+
"with_wandb": true,
|
| 106 |
+
"wandb_user": "qgallouedec",
|
| 107 |
+
"wandb_project": "sample_facotry_metaworld",
|
| 108 |
+
"wandb_group": null,
|
| 109 |
+
"wandb_job_type": "SF",
|
| 110 |
+
"wandb_tags": [],
|
| 111 |
+
"with_pbt": false,
|
| 112 |
+
"pbt_mix_policies_in_one_env": true,
|
| 113 |
+
"pbt_period_env_steps": 5000000,
|
| 114 |
+
"pbt_start_mutation": 20000000,
|
| 115 |
+
"pbt_replace_fraction": 0.3,
|
| 116 |
+
"pbt_mutation_rate": 0.15,
|
| 117 |
+
"pbt_replace_reward_gap": 0.1,
|
| 118 |
+
"pbt_replace_reward_gap_absolute": 1e-06,
|
| 119 |
+
"pbt_optimize_gamma": false,
|
| 120 |
+
"pbt_target_objective": "true_objective",
|
| 121 |
+
"pbt_perturb_min": 1.1,
|
| 122 |
+
"pbt_perturb_max": 1.5,
|
| 123 |
+
"command_line": "--env stick-push-v2 --experiment stick-push-v2 --with_wandb True --wandb_user qgallouedec --wandb_project sample_facotry_metaworld",
|
| 124 |
+
"cli_args": {
|
| 125 |
+
"env": "stick-push-v2",
|
| 126 |
+
"experiment": "stick-push-v2",
|
| 127 |
+
"with_wandb": true,
|
| 128 |
+
"wandb_user": "qgallouedec",
|
| 129 |
+
"wandb_project": "sample_facotry_metaworld"
|
| 130 |
+
},
|
| 131 |
+
"git_hash": "2bb8d8c9cd813ffeafaad42038b1e71364092d36",
|
| 132 |
+
"git_repo_name": "https://github.com/huggingface/gia",
|
| 133 |
+
"wandb_unique_id": "stick-push-v2_20230311_180731_827485"
|
| 134 |
+
}
|
git.diff
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
diff --git a/data/envs/metaworld/generate_dataset.py b/data/envs/metaworld/generate_dataset.py
|
| 2 |
+
index dc51b4f..ed99a4a 100644
|
| 3 |
+
--- a/data/envs/metaworld/generate_dataset.py
|
| 4 |
+
+++ b/data/envs/metaworld/generate_dataset.py
|
| 5 |
+
@@ -4,7 +4,9 @@ from typing import Dict, Optional
|
| 6 |
+
import gym
|
| 7 |
+
import metaworld
|
| 8 |
+
import numpy as np
|
| 9 |
+
+import pandas as pd
|
| 10 |
+
import torch
|
| 11 |
+
+from datasets import Dataset
|
| 12 |
+
from huggingface_hub import HfApi, repocard, upload_folder
|
| 13 |
+
from sample_factory.algo.learning.learner import Learner
|
| 14 |
+
from sample_factory.algo.sampling.batched_sampling import preprocess_actions
|
| 15 |
+
@@ -12,11 +14,7 @@ from sample_factory.algo.utils.action_distributions import argmax_actions
|
| 16 |
+
from sample_factory.algo.utils.env_info import extract_env_info
|
| 17 |
+
from sample_factory.algo.utils.make_env import make_env_func_batched
|
| 18 |
+
from sample_factory.algo.utils.rl_utils import make_dones, prepare_and_normalize_obs
|
| 19 |
+
-from sample_factory.cfg.arguments import (
|
| 20 |
+
- load_from_checkpoint,
|
| 21 |
+
- parse_full_cfg,
|
| 22 |
+
- parse_sf_args,
|
| 23 |
+
-)
|
| 24 |
+
+from sample_factory.cfg.arguments import load_from_checkpoint, parse_full_cfg, parse_sf_args
|
| 25 |
+
from sample_factory.envs.env_utils import register_env
|
| 26 |
+
from sample_factory.model.actor_critic import create_actor_critic
|
| 27 |
+
from sample_factory.model.model_utils import get_rnn_size
|
| 28 |
+
@@ -165,10 +163,8 @@ def create_dataset(cfg: Config):
|
| 29 |
+
# Create dataset
|
| 30 |
+
dataset_size = 100_000
|
| 31 |
+
dataset = {
|
| 32 |
+
- "observations": np.zeros(
|
| 33 |
+
- (dataset_size, *env.observation_space["obs"].shape), dtype=env.observation_space["obs"].dtype
|
| 34 |
+
- ),
|
| 35 |
+
- "actions": np.zeros((dataset_size, *env.action_space.shape), env.action_space.dtype),
|
| 36 |
+
+ "observations": np.zeros((dataset_size, *env.observation_space["obs"].shape), dtype=np.float32),
|
| 37 |
+
+ "actions": np.zeros((dataset_size, *env.action_space.shape), np.float32),
|
| 38 |
+
"dones": np.zeros((dataset_size,), bool),
|
| 39 |
+
"rewards": np.zeros((dataset_size,), np.float32),
|
| 40 |
+
}
|
| 41 |
+
@@ -206,6 +202,13 @@ def create_dataset(cfg: Config):
|
| 42 |
+
|
| 43 |
+
env.close()
|
| 44 |
+
|
| 45 |
+
+ # Convert dict of numpy array to pandas dataframe
|
| 46 |
+
+# dataset = Dataset.from_dict(dataset)
|
| 47 |
+
+# dataset.create_config_id
|
| 48 |
+
+ # Set the card of the dataset
|
| 49 |
+
+# dataset.card = f""""""
|
| 50 |
+
+# dataset.push_to_hub("qgallouedec/prj_gia_dataset_metaworld_assembly_v2_1111_demo")
|
| 51 |
+
+
|
| 52 |
+
# Save dataset
|
| 53 |
+
repo_path = f"{cfg.train_dir}/datasets/{cfg.experiment}"
|
| 54 |
+
os.makedirs(repo_path, exist_ok=True)
|
| 55 |
+
diff --git a/data/envs/metaworld/generate_dataset_all.sh b/data/envs/metaworld/generate_dataset_all.sh
|
| 56 |
+
index 802bf5c..d66ae59 100755
|
| 57 |
+
--- a/data/envs/metaworld/generate_dataset_all.sh
|
| 58 |
+
+++ b/data/envs/metaworld/generate_dataset_all.sh
|
| 59 |
+
@@ -1,58 +1,13 @@
|
| 60 |
+
#!/bin/bash
|
| 61 |
+
|
| 62 |
+
ENVS=(
|
| 63 |
+
- assembly
|
| 64 |
+
- basketball
|
| 65 |
+
- bin-picking
|
| 66 |
+
- box-close
|
| 67 |
+
- button-press-topdown
|
| 68 |
+
- button-press-topdown-wall
|
| 69 |
+
- button-press
|
| 70 |
+
- button-press-wall
|
| 71 |
+
- coffee-button
|
| 72 |
+
- coffee-pull
|
| 73 |
+
- coffee-push
|
| 74 |
+
- dial-turn
|
| 75 |
+
- disassemble
|
| 76 |
+
- door-close
|
| 77 |
+
- door-lock
|
| 78 |
+
- door-open
|
| 79 |
+
- door-unlock
|
| 80 |
+
- drawer-close
|
| 81 |
+
- drawer-open
|
| 82 |
+
- faucet-close
|
| 83 |
+
- faucet-open
|
| 84 |
+
- hammer
|
| 85 |
+
- hand-insert
|
| 86 |
+
- handle-press-side
|
| 87 |
+
- handle-press
|
| 88 |
+
- handle-pull-side
|
| 89 |
+
- handle-pull
|
| 90 |
+
- lever-pull
|
| 91 |
+
- peg-insert-side
|
| 92 |
+
- peg-unplug-side
|
| 93 |
+
- pick-out-of-hole
|
| 94 |
+
- pick-place
|
| 95 |
+
- pick-place-wall
|
| 96 |
+
- plate-slide-back-side
|
| 97 |
+
- plate-slide-back
|
| 98 |
+
- plate-slide-side
|
| 99 |
+
- plate-slide
|
| 100 |
+
- push-back
|
| 101 |
+
- push
|
| 102 |
+
push-wall
|
| 103 |
+
reach
|
| 104 |
+
reach-wall
|
| 105 |
+
shelf-place
|
| 106 |
+
soccer
|
| 107 |
+
- stick-pull
|
| 108 |
+
- stick-push
|
| 109 |
+
- sweep-into
|
| 110 |
+
- sweep
|
| 111 |
+
- window-close
|
| 112 |
+
- window-open
|
| 113 |
+
)
|
| 114 |
+
|
| 115 |
+
for ENV in "${ENVS[@]}"; do
|
| 116 |
+
- python generate_dataset.py --env $ENV-v2 --experiment $ENV-v2 --train_dir=./train_dir
|
| 117 |
+
+ python generate_dataset.py --env $ENV-v2 --experiment $ENV-v2 --train_dir=./train_dir
|
| 118 |
+
done
|
| 119 |
+
diff --git a/data/envs/metaworld/push_all.sh b/data/envs/metaworld/push_all.sh
|
| 120 |
+
index 9d71467..d78c671 100755
|
| 121 |
+
--- a/data/envs/metaworld/push_all.sh
|
| 122 |
+
+++ b/data/envs/metaworld/push_all.sh
|
| 123 |
+
@@ -1,56 +1,56 @@
|
| 124 |
+
#!/bin/bash
|
| 125 |
+
|
| 126 |
+
ENVS=(
|
| 127 |
+
- assembly
|
| 128 |
+
- basketball
|
| 129 |
+
- bin-picking
|
| 130 |
+
- box-close
|
| 131 |
+
- button-press-topdown
|
| 132 |
+
- button-press-topdown-wall
|
| 133 |
+
- button-press
|
| 134 |
+
- button-press-wall
|
| 135 |
+
- coffee-button
|
| 136 |
+
- coffee-pull
|
| 137 |
+
- coffee-push
|
| 138 |
+
- dial-turn
|
| 139 |
+
- disassemble
|
| 140 |
+
- door-close
|
| 141 |
+
- door-lock
|
| 142 |
+
- door-open
|
| 143 |
+
- door-unlock
|
| 144 |
+
- drawer-close
|
| 145 |
+
- drawer-open
|
| 146 |
+
- faucet-close
|
| 147 |
+
- faucet-open
|
| 148 |
+
- hammer
|
| 149 |
+
- hand-insert
|
| 150 |
+
- handle-press-side
|
| 151 |
+
- handle-press
|
| 152 |
+
- handle-pull-side
|
| 153 |
+
- handle-pull
|
| 154 |
+
- lever-pull
|
| 155 |
+
- peg-insert-side
|
| 156 |
+
- peg-unplug-side
|
| 157 |
+
- pick-out-of-hole
|
| 158 |
+
- pick-place
|
| 159 |
+
- pick-place-wall
|
| 160 |
+
- plate-slide-back-side
|
| 161 |
+
- plate-slide-back
|
| 162 |
+
- plate-slide-side
|
| 163 |
+
- plate-slide
|
| 164 |
+
- push-back
|
| 165 |
+
- push
|
| 166 |
+
- push-wall
|
| 167 |
+
- reach
|
| 168 |
+
- reach-wall
|
| 169 |
+
+# assembly
|
| 170 |
+
+# basketball
|
| 171 |
+
+# bin-picking
|
| 172 |
+
+# box-close
|
| 173 |
+
+# button-press-topdown
|
| 174 |
+
+# button-press-topdown-wall
|
| 175 |
+
+# button-press
|
| 176 |
+
+# button-press-wall
|
| 177 |
+
+# coffee-button
|
| 178 |
+
+# coffee-pull
|
| 179 |
+
+# coffee-push
|
| 180 |
+
+# dial-turn
|
| 181 |
+
+# disassemble
|
| 182 |
+
+# door-close
|
| 183 |
+
+# door-lock
|
| 184 |
+
+# door-open
|
| 185 |
+
+# door-unlock
|
| 186 |
+
+# drawer-close
|
| 187 |
+
+# drawer-open
|
| 188 |
+
+# faucet-close
|
| 189 |
+
+# faucet-open
|
| 190 |
+
+# hammer
|
| 191 |
+
+# hand-insert
|
| 192 |
+
+# handle-press-side
|
| 193 |
+
+# handle-press
|
| 194 |
+
+# handle-pull-side
|
| 195 |
+
+# handle-pull
|
| 196 |
+
+# lever-pull
|
| 197 |
+
+# peg-insert-side
|
| 198 |
+
+# peg-unplug-side
|
| 199 |
+
+# pick-out-of-hole
|
| 200 |
+
+# pick-place
|
| 201 |
+
+# pick-place-wall
|
| 202 |
+
+# plate-slide-back-side
|
| 203 |
+
+# plate-slide-back
|
| 204 |
+
+# plate-slide-side
|
| 205 |
+
+# plate-slide
|
| 206 |
+
+# push-back
|
| 207 |
+
+# push
|
| 208 |
+
+# push-wall
|
| 209 |
+
+# reach
|
| 210 |
+
+# reach-wall
|
| 211 |
+
shelf-place
|
| 212 |
+
soccer
|
| 213 |
+
- stick-pull
|
| 214 |
+
- stick-push
|
| 215 |
+
- sweep-into
|
| 216 |
+
- sweep
|
| 217 |
+
- window-close
|
| 218 |
+
- window-open
|
| 219 |
+
+# stick-pull
|
| 220 |
+
+# stick-push
|
| 221 |
+
+# sweep-into
|
| 222 |
+
+# sweep
|
| 223 |
+
+# window-close
|
| 224 |
+
+# window-open
|
| 225 |
+
)
|
| 226 |
+
|
| 227 |
+
for ENV in "${ENVS[@]}"; do
|
| 228 |
+
diff --git a/data/envs/metaworld/train_all.sh b/data/envs/metaworld/train_all.sh
|
| 229 |
+
index dbf328a..1237f2c 100755
|
| 230 |
+
--- a/data/envs/metaworld/train_all.sh
|
| 231 |
+
+++ b/data/envs/metaworld/train_all.sh
|
| 232 |
+
@@ -1,48 +1,48 @@
|
| 233 |
+
#!/bin/bash
|
| 234 |
+
|
| 235 |
+
ENVS=(
|
| 236 |
+
- assembly
|
| 237 |
+
- basketball
|
| 238 |
+
- bin-picking
|
| 239 |
+
- box-close
|
| 240 |
+
- button-press-topdown
|
| 241 |
+
- button-press-topdown-wall
|
| 242 |
+
- button-press
|
| 243 |
+
- button-press-wall
|
| 244 |
+
- coffee-button
|
| 245 |
+
- coffee-pull
|
| 246 |
+
- coffee-push
|
| 247 |
+
- dial-turn
|
| 248 |
+
- disassemble
|
| 249 |
+
- door-close
|
| 250 |
+
- door-lock
|
| 251 |
+
- door-open
|
| 252 |
+
- door-unlock
|
| 253 |
+
- drawer-close
|
| 254 |
+
- drawer-open
|
| 255 |
+
- faucet-close
|
| 256 |
+
- faucet-open
|
| 257 |
+
- hammer
|
| 258 |
+
- hand-insert
|
| 259 |
+
- handle-press-side
|
| 260 |
+
- handle-press
|
| 261 |
+
- handle-pull-side
|
| 262 |
+
- handle-pull
|
| 263 |
+
- lever-pull
|
| 264 |
+
- peg-insert-side
|
| 265 |
+
- peg-unplug-side
|
| 266 |
+
- pick-out-of-hole
|
| 267 |
+
- pick-place
|
| 268 |
+
- pick-place-wall
|
| 269 |
+
- plate-slide-back-side
|
| 270 |
+
- plate-slide-back
|
| 271 |
+
- plate-slide-side
|
| 272 |
+
- plate-slide
|
| 273 |
+
- push-back
|
| 274 |
+
- push
|
| 275 |
+
- push-wall
|
| 276 |
+
- reach
|
| 277 |
+
- reach-wall
|
| 278 |
+
+# assembly
|
| 279 |
+
+# basketball
|
| 280 |
+
+# bin-picking
|
| 281 |
+
+# box-close
|
| 282 |
+
+# button-press-topdown
|
| 283 |
+
+# button-press-topdown-wall
|
| 284 |
+
+# button-press
|
| 285 |
+
+# button-press-wall
|
| 286 |
+
+# coffee-button
|
| 287 |
+
+# coffee-pull
|
| 288 |
+
+# coffee-push
|
| 289 |
+
+# dial-turn
|
| 290 |
+
+# disassemble
|
| 291 |
+
+# door-close
|
| 292 |
+
+# door-lock
|
| 293 |
+
+# door-open
|
| 294 |
+
+# door-unlock
|
| 295 |
+
+# drawer-close
|
| 296 |
+
+# drawer-open
|
| 297 |
+
+# faucet-close
|
| 298 |
+
+# faucet-open
|
| 299 |
+
+# hammer
|
| 300 |
+
+# hand-insert
|
| 301 |
+
+# handle-press-side
|
| 302 |
+
+# handle-press
|
| 303 |
+
+# handle-pull-side
|
| 304 |
+
+# handle-pull
|
| 305 |
+
+# lever-pull
|
| 306 |
+
+# peg-insert-side
|
| 307 |
+
+# peg-unplug-side
|
| 308 |
+
+# pick-out-of-hole
|
| 309 |
+
+# pick-place
|
| 310 |
+
+# pick-place-wall
|
| 311 |
+
+# plate-slide-back-side
|
| 312 |
+
+# plate-slide-back
|
| 313 |
+
+# plate-slide-side
|
| 314 |
+
+# plate-slide
|
| 315 |
+
+# push-back
|
| 316 |
+
+# push
|
| 317 |
+
+# push-wall
|
| 318 |
+
+# reach
|
| 319 |
+
+# reach-wall
|
| 320 |
+
shelf-place
|
| 321 |
+
soccer
|
| 322 |
+
stick-pull
|
| 323 |
+
@@ -55,4 +55,5 @@ ENVS=(
|
| 324 |
+
|
| 325 |
+
for ENV in "${ENVS[@]}"; do
|
| 326 |
+
python train.py --env $ENV-v2 --experiment $ENV-v2 --with_wandb True --wandb_user qgallouedec --wandb_project sample_facotry_metaworld
|
| 327 |
+
+ python enjoy.py --algo=APPO --env $ENV-v2 --experiment $ENV-v2 --train_dir=./train_dir --max_num_episodes=10 --push_to_hub --hf_repository=qgallouedec/sample-factory-$ENV-v2 --save_video --no_render --enjoy_script=enjoy --train_script=train --load_checkpoint_kind best
|
| 328 |
+
done
|
replay.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a418583241062f57c25b501078462e24036511917cdba9898a05605c88bf015
|
| 3 |
+
size 2660677
|
sf_log.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|