Commit
·
f37a8fc
1
Parent(s):
51dac85
Upload folder using huggingface_hub
Browse files- .summary/0/events.out.tfevents.1689527978.qgallouedec-MS-7C84 +3 -0
- README.md +1 -1
- checkpoint_p0/best_000004576_2342912_reward_564.175.pth +3 -0
- checkpoint_p0/checkpoint_000019376_9920512.pth +3 -0
- checkpoint_p0/checkpoint_000019544_10006528.pth +1 -1
- config.json +2 -2
- git.diff +25 -79
- replay.mp4 +2 -2
- sf_log.txt +0 -0
.summary/0/events.out.tfevents.1689527978.qgallouedec-MS-7C84
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4cfb168f7e6250bf7189c4ea1bedaddc3c1acf53f643640f3ea440ae47d07494
|
3 |
+
size 597902
|
README.md
CHANGED
@@ -15,7 +15,7 @@ model-index:
|
|
15 |
type: basketball-v2
|
16 |
metrics:
|
17 |
- type: mean_reward
|
18 |
-
value:
|
19 |
name: mean_reward
|
20 |
verified: false
|
21 |
---
|
|
|
15 |
type: basketball-v2
|
16 |
metrics:
|
17 |
- type: mean_reward
|
18 |
+
value: 584.02 +/- 49.43
|
19 |
name: mean_reward
|
20 |
verified: false
|
21 |
---
|
checkpoint_p0/best_000004576_2342912_reward_564.175.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d3aabe77d7a44a7d41b51a8d0772752de3e32255b1793f08b4502fb59e848207
|
3 |
+
size 98239
|
checkpoint_p0/checkpoint_000019376_9920512.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c982a51b57b393d643d5819ac029ad514597baf4ad26c0ad3913640d70f1ec80
|
3 |
+
size 98567
|
checkpoint_p0/checkpoint_000019544_10006528.pth
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 98567
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d3a3c6fcf8deff00a351fbc7f3191c5b427346f9a174528383921a2fe408848
|
3 |
size 98567
|
config.json
CHANGED
@@ -128,7 +128,7 @@
|
|
128 |
"wandb_user": "qgallouedec",
|
129 |
"wandb_project": "sample_facotry_metaworld"
|
130 |
},
|
131 |
-
"git_hash": "
|
132 |
"git_repo_name": "https://github.com/huggingface/gia",
|
133 |
-
"wandb_unique_id": "basketball-
|
134 |
}
|
|
|
128 |
"wandb_user": "qgallouedec",
|
129 |
"wandb_project": "sample_facotry_metaworld"
|
130 |
},
|
131 |
+
"git_hash": "0010a8dda1f21d81bec67d77b900206dea2683b2",
|
132 |
"git_repo_name": "https://github.com/huggingface/gia",
|
133 |
+
"wandb_unique_id": "basketball-v2_20230716_191935_788938"
|
134 |
}
|
git.diff
CHANGED
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
diff --git a/gia/eval/callback.py b/gia/eval/callback.py
|
2 |
index 5c3a080..4b6198f 100644
|
3 |
--- a/gia/eval/callback.py
|
@@ -14,45 +27,21 @@ index 5c3a080..4b6198f 100644
|
|
14 |
from gia.config import Arguments
|
15 |
from gia.eval.utils import is_slurm_available
|
16 |
|
17 |
-
diff --git a/gia/eval/evaluator.py b/gia/eval/evaluator.py
|
18 |
-
index 91b645c..3e2cae7 100644
|
19 |
-
--- a/gia/eval/evaluator.py
|
20 |
-
+++ b/gia/eval/evaluator.py
|
21 |
-
@@ -1,3 +1,5 @@
|
22 |
-
+from typing import Optional
|
23 |
-
+
|
24 |
-
import torch
|
25 |
-
|
26 |
-
from gia.config.arguments import Arguments
|
27 |
-
@@ -5,11 +7,12 @@ from gia.model import GiaModel
|
28 |
-
|
29 |
-
|
30 |
-
class Evaluator:
|
31 |
-
- def __init__(self, args: Arguments, task: str) -> None:
|
32 |
-
+ def __init__(self, args: Arguments, task: str, mean_random: Optional[float] = None) -> None:
|
33 |
-
self.args = args
|
34 |
-
self.task = task
|
35 |
-
+ self.mean_random = mean_random
|
36 |
-
|
37 |
-
- @torch.no_grad()
|
38 |
-
+ @torch.inference_mode()
|
39 |
-
def evaluate(self, model: GiaModel) -> float:
|
40 |
-
return self._evaluate(model)
|
41 |
-
|
42 |
diff --git a/gia/eval/rl/envs/core.py b/gia/eval/rl/envs/core.py
|
43 |
-
index ec5e5b2..
|
44 |
--- a/gia/eval/rl/envs/core.py
|
45 |
+++ b/gia/eval/rl/envs/core.py
|
46 |
-
@@ -
|
47 |
-
|
48 |
-
elif task_name.startswith("metaworld"):
|
49 |
-
import gymnasium as gym
|
50 |
-
- import metaworld
|
51 |
|
52 |
env_id = TASK_TO_ENV_MAPPING[task_name]
|
53 |
-
|
|
|
|
|
|
|
|
|
54 |
diff --git a/gia/eval/rl/gia_agent.py b/gia/eval/rl/gia_agent.py
|
55 |
-
index f0d0b9b..
|
56 |
--- a/gia/eval/rl/gia_agent.py
|
57 |
+++ b/gia/eval/rl/gia_agent.py
|
58 |
@@ -54,7 +54,7 @@ class GiaAgent:
|
@@ -60,62 +49,19 @@ index f0d0b9b..39dc0d2 100644
|
|
60 |
self.deterministic = deterministic
|
61 |
self.device = next(model.parameters()).device
|
62 |
- self._max_length = self.model.config.max_position_embeddings - 10
|
63 |
-
+ self._max_length = self.model.config.max_position_embeddings - 100
|
64 |
|
65 |
if isinstance(observation_space, spaces.Box):
|
66 |
self._observation_key = "continuous_observations"
|
67 |
-
@@ -75,6 +75,11 @@ class GiaAgent:
|
68 |
-
) -> Tuple[Tuple[Tensor, Tensor], ...]:
|
69 |
-
return tuple((k[:, :, -self._max_length :], v[:, :, -self._max_length :]) for (k, v) in past_key_values)
|
70 |
-
|
71 |
-
+ def set_model(self, model: GiaModel) -> None:
|
72 |
-
+ self.model = model
|
73 |
-
+ self.device = next(model.parameters()).device
|
74 |
-
+ self._max_length = self.model.config.max_position_embeddings
|
75 |
-
+
|
76 |
-
def reset(self, num_envs: int = 1) -> None:
|
77 |
-
if self.prompter is not None:
|
78 |
-
prompts = self.prompter.generate_prompts(num_envs)
|
79 |
diff --git a/gia/eval/rl/gym_evaluator.py b/gia/eval/rl/gym_evaluator.py
|
80 |
-
index f8531ee..
|
81 |
--- a/gia/eval/rl/gym_evaluator.py
|
82 |
+++ b/gia/eval/rl/gym_evaluator.py
|
83 |
-
@@ -1,7 +1,
|
84 |
import gym
|
85 |
from gym.vector.vector_env import VectorEnv
|
86 |
|
87 |
-from gia.eval.mappings import TASK_TO_ENV_MAPPING
|
88 |
-
+# from gia.eval.rl.envs.mappings import TASK_TO_ENV_MAPPING
|
89 |
from gia.eval.rl.rl_evaluator import RLEvaluator
|
90 |
|
91 |
|
92 |
-
diff --git a/gia/eval/rl/rl_evaluator.py b/gia/eval/rl/rl_evaluator.py
|
93 |
-
index c5cc423..91189f3 100644
|
94 |
-
--- a/gia/eval/rl/rl_evaluator.py
|
95 |
-
+++ b/gia/eval/rl/rl_evaluator.py
|
96 |
-
@@ -8,6 +8,10 @@ from gia.eval.rl.gia_agent import GiaAgent
|
97 |
-
|
98 |
-
|
99 |
-
class RLEvaluator(Evaluator):
|
100 |
-
+ def __init__(self, args, task):
|
101 |
-
+ super().__init__(args, task)
|
102 |
-
+ self.agent = GiaAgent()
|
103 |
-
+
|
104 |
-
def _build_env(self) -> VectorEnv: # TODO: maybe just a gym.Env ?
|
105 |
-
raise NotImplementedError
|
106 |
-
|
107 |
-
diff --git a/gia/eval/rl/scores_dict.json b/gia/eval/rl/scores_dict.json
|
108 |
-
index 1b8ebee..ff7d030 100644
|
109 |
-
--- a/gia/eval/rl/scores_dict.json
|
110 |
-
+++ b/gia/eval/rl/scores_dict.json
|
111 |
-
@@ -929,8 +929,8 @@
|
112 |
-
},
|
113 |
-
"metaworld-assembly": {
|
114 |
-
"expert": {
|
115 |
-
- "mean": 311.29314618777823,
|
116 |
-
- "std": 75.04282151450695
|
117 |
-
+ "mean": 3523.81468486244,
|
118 |
-
+ "std": 63.22745220327798
|
119 |
-
},
|
120 |
-
"random": {
|
121 |
-
"mean": 220.65601680730813,
|
|
|
1 |
+
diff --git a/data/envs/metaworld/train_all.sh b/data/envs/metaworld/train_all.sh
|
2 |
+
index dbf328a..c393191 100755
|
3 |
+
--- a/data/envs/metaworld/train_all.sh
|
4 |
+
+++ b/data/envs/metaworld/train_all.sh
|
5 |
+
@@ -4,7 +4,7 @@ ENVS=(
|
6 |
+
assembly
|
7 |
+
basketball
|
8 |
+
bin-picking
|
9 |
+
- box-close
|
10 |
+
+ #box-close
|
11 |
+
button-press-topdown
|
12 |
+
button-press-topdown-wall
|
13 |
+
button-press
|
14 |
diff --git a/gia/eval/callback.py b/gia/eval/callback.py
|
15 |
index 5c3a080..4b6198f 100644
|
16 |
--- a/gia/eval/callback.py
|
|
|
27 |
from gia.config import Arguments
|
28 |
from gia.eval.utils import is_slurm_available
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
diff --git a/gia/eval/rl/envs/core.py b/gia/eval/rl/envs/core.py
|
31 |
+
index ec5e5b2..3294471 100644
|
32 |
--- a/gia/eval/rl/envs/core.py
|
33 |
+++ b/gia/eval/rl/envs/core.py
|
34 |
+
@@ -180,7 +180,7 @@ def make(task_name: str, num_envs: int = 1):
|
35 |
+
import metaworld
|
|
|
|
|
|
|
36 |
|
37 |
env_id = TASK_TO_ENV_MAPPING[task_name]
|
38 |
+
- env = gym.vector.SyncVectorEnv([lambda: gym.make(env_id)] * num_envs)
|
39 |
+
+ env = gym.make(env_id)
|
40 |
+
|
41 |
+
else:
|
42 |
+
raise ValueError(f"Unknown task name: {task_name}")
|
43 |
diff --git a/gia/eval/rl/gia_agent.py b/gia/eval/rl/gia_agent.py
|
44 |
+
index f0d0b9b..255beda 100644
|
45 |
--- a/gia/eval/rl/gia_agent.py
|
46 |
+++ b/gia/eval/rl/gia_agent.py
|
47 |
@@ -54,7 +54,7 @@ class GiaAgent:
|
|
|
49 |
self.deterministic = deterministic
|
50 |
self.device = next(model.parameters()).device
|
51 |
- self._max_length = self.model.config.max_position_embeddings - 10
|
52 |
+
+ self._max_length = self.model.config.max_position_embeddings - 100
|
53 |
|
54 |
if isinstance(observation_space, spaces.Box):
|
55 |
self._observation_key = "continuous_observations"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
diff --git a/gia/eval/rl/gym_evaluator.py b/gia/eval/rl/gym_evaluator.py
|
57 |
+
index f8531ee..71e0fdc 100644
|
58 |
--- a/gia/eval/rl/gym_evaluator.py
|
59 |
+++ b/gia/eval/rl/gym_evaluator.py
|
60 |
+
@@ -1,7 +1,6 @@
|
61 |
import gym
|
62 |
from gym.vector.vector_env import VectorEnv
|
63 |
|
64 |
-from gia.eval.mappings import TASK_TO_ENV_MAPPING
|
|
|
65 |
from gia.eval.rl.rl_evaluator import RLEvaluator
|
66 |
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
replay.mp4
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4de040354cff140790c0a33263e19a506dabd69269979c5774863c1978a77e77
|
3 |
+
size 784409
|
sf_log.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|