szang18 commited on
Commit
19db224
·
verified ·
1 Parent(s): 143575e

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: IPEC-COMMUNITY/spatialvla-4b-224-pt
3
+ library_name: peft
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
200
+ ### Framework versions
201
+
202
+ - PEFT 0.14.0
action_tokenizer.py ADDED
@@ -0,0 +1,431 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ action_tokenizer.py
3
+
4
+ Extension class; wraps base LLM/VLM tokenizer with logic to discretize and tokenize continuous robot actions.
5
+ """
6
+ from typing import List, Union, Dict, Optional
7
+ import numpy as np
8
+ from transformers import PreTrainedTokenizerBase
9
+ from scipy.stats import norm
10
+ import torch
11
+
12
+ ACTION_TOKEN = '<ACTION{:05d}>'
13
+
14
+ class ActionTokenizer:
15
+ def __init__(
16
+ self,
17
+ tokenizer: PreTrainedTokenizerBase,
18
+ num_bins: int = 256,
19
+ min_action: int = -1,
20
+ max_action: int = 1,
21
+ ):
22
+ self._vocab_size = num_bins
23
+ self.tokenizer = tokenizer
24
+ self.min_action, self.max_action = min_action, max_action
25
+ self.bin_centers = np.linspace(min_action, max_action, num_bins)
26
+
27
+ # add special action tokens to language tokenizer
28
+ token_list = [ACTION_TOKEN.format(i) for i in range(self._vocab_size)]
29
+ self.token_array = np.array(token_list)
30
+
31
+ num_new_tokens = self.tokenizer.add_tokens(token_list, special_tokens=True)
32
+ print(f"Add {num_new_tokens} TRANSLATION TOKENS, tokenizer vocab size {self.tokenizer.vocab_size} / {len(tokenizer)}")
33
+
34
+ self.action_token_begin_idx = self.token_start_idx = self.tokenizer.convert_tokens_to_ids(self.token_array[0])
35
+ self.token_end_idx = self.tokenizer.convert_tokens_to_ids(self.token_array[-1])
36
+
37
+ def __call__(self, action: np.ndarray) -> List[str]:
38
+ """Discretize continuous actions to tokens.
39
+ action: np.ndarray, (n, 7), continuous actions in Cartesian or Spherical coordinates.
40
+ return: np.ndarray, (n, 7), tokens.
41
+ """
42
+ action = np.clip(action, a_min=float(self.min_action), a_max=float(self.max_action))
43
+ ids = np.digitize(action, self.bin_centers, right=True) # [0, 255]
44
+ return self.token_array[ids]
45
+
46
+ def decode_token_ids_to_actions(self, action_token_id: np.ndarray) -> np.ndarray:
47
+ """decode token ids to continuous actions.
48
+ action_token_id: np.ndarray, (n, 7), token ids.
49
+ return: np.ndarray, (n, 7), continuous actions
50
+ """
51
+ ids = action_token_id - self.action_token_begin_idx
52
+ ids = np.clip(ids, a_min=0, a_max=self._vocab_size - 1)
53
+ return self.bin_centers[ids]
54
+
55
+ @property
56
+ def vocab_size(self) -> int:
57
+ return self._vocab_size
58
+
59
+ class TranslationTokenizer:
60
+ def __init__(
61
+ self,
62
+ tokenizer: PreTrainedTokenizerBase,
63
+ num_bins: Dict,
64
+ bin_policy: Optional[Dict] = None,
65
+ use_spherical: bool = True,
66
+ ):
67
+ self.tokenizer = tokenizer
68
+ self.num_theta_bins = num_bins["theta_bins"]
69
+ self.num_phi_bins = num_bins["phi_bins"]
70
+ self.num_r_bins = num_bins["r_bins"]
71
+ self.use_spherical = use_spherical
72
+
73
+ # for indexing
74
+ self.NP = self.num_phi_bins * self.num_r_bins
75
+
76
+ # add special action tokens to language tokenizer
77
+ self._vocab_size = self.num_theta_bins * self.num_phi_bins * self.num_r_bins
78
+ token_list = [ACTION_TOKEN.format(i) for i in range(self._vocab_size)]
79
+ self.token_array = np.array(token_list)
80
+
81
+ num_new_tokens = self.tokenizer.add_tokens(token_list, special_tokens=True)
82
+ print(f"Add {num_new_tokens} TRANSLATION TOKENS, tokenizer vocab size {self.tokenizer.vocab_size} / {len(tokenizer)}")
83
+
84
+ self.token_start_idx = self.tokenizer.convert_tokens_to_ids(self.token_array[0])
85
+ self.token_end_idx = self.tokenizer.convert_tokens_to_ids(self.token_array[-1])
86
+ self.set_bins(bin_policy)
87
+
88
+ def set_bins(self, bin_policy):
89
+ self.theta_bins = np.array(bin_policy["theta_bins"])
90
+ self.phi_bins = np.array(bin_policy["phi_bins"])
91
+ self.r_bins = np.array(bin_policy["r_bins"])
92
+
93
+ def cartesian_to_spherical(self, x, y, z):
94
+ theta = np.arctan2(np.sqrt(x**2 + y**2), z) # polar angle
95
+ phi = np.arctan2(y, x) # azimuthal angle
96
+ r = np.sqrt(x**2 + y**2 + z**2)
97
+ return theta, phi, r
98
+
99
+ def spherical_to_cartesian(self, theta, phi, r):
100
+ x = r * np.sin(theta) * np.cos(phi)
101
+ y = r * np.sin(theta) * np.sin(phi)
102
+ z = r * np.cos(theta)
103
+ return x, y, z
104
+
105
+ def __call__(self, action: np.ndarray) -> List[str]:
106
+ """Discretize continuous actions to tokens.
107
+ action: np.ndarray, (n, 3), continuous actions in Cartesian or Spherical coordinates.
108
+ return: np.ndarray, (n,), tokens.
109
+ """
110
+ if self.use_spherical:
111
+ theta, phi, r = self.cartesian_to_spherical(action[:, 0], action[:, 1], action[:, 2])
112
+ else:
113
+ theta, phi, r = action[:, 0], action[:, 1], action[:, 2]
114
+
115
+ disc_theta = np.digitize(theta, self.theta_bins[1:-1]) # b
116
+ disc_phi = np.digitize(phi, self.phi_bins[1:-1])
117
+ disc_r = np.digitize(r, self.r_bins[1:-1])
118
+ ids = disc_theta * self.NP + disc_phi * self.num_r_bins + disc_r
119
+ return self.token_array[ids]
120
+
121
+ def decode_token_ids_to_actions(self, action_token_id: np.ndarray) -> np.ndarray:
122
+ """decode token ids to continuous actions.
123
+ action_token_id: np.ndarray, (n,), token ids.
124
+ return: np.ndarray, (n, 3), continuous actions
125
+ """
126
+ action_token_id = np.clip(action_token_id, self.token_start_idx, self.token_end_idx)
127
+ ids = action_token_id - self.token_start_idx
128
+ disc_theta, disc_phi, disc_r = ids // self.NP, (ids % self.NP) // self.num_r_bins, ids % self.num_r_bins
129
+
130
+ theta = 0.5 * (self.theta_bins[disc_theta] + self.theta_bins[disc_theta + 1])
131
+ phi = 0.5 * (self.phi_bins[disc_phi] + self.phi_bins[disc_phi + 1])
132
+ r = 0.5 * (self.r_bins[disc_r] + self.r_bins[disc_r + 1])
133
+
134
+ # clip action to [-1, 1], due to the spherical coordinate action space is the circumscribed sphere of the Cartesian action space.
135
+ x, y, z = self.spherical_to_cartesian(theta, phi, r) if self.use_spherical else (theta, phi, r)
136
+ x, y, z = np.clip([x, y, z], -1, 1)
137
+ return np.stack((x, y, z), axis=1)
138
+
139
+ @property
140
+ def vocab_size(self) -> int:
141
+ return self._vocab_size
142
+
143
+ class RotationTokenizer:
144
+ def __init__(
145
+ self,
146
+ tokenizer: PreTrainedTokenizerBase,
147
+ num_bins: Dict,
148
+ bin_policy: Optional[Dict] = None,
149
+ array_begin_idx=None,
150
+ ):
151
+ self.tokenizer = tokenizer
152
+ self.num_roll_bins = num_bins["roll_bins"] # M
153
+ self.num_pitch_bins = num_bins["pitch_bins"] # N
154
+ self.num_yaw_bins = num_bins["yaw_bins"] # P
155
+ self.array_begin_idx = array_begin_idx
156
+
157
+ # for indexing
158
+ self.NP = self.num_pitch_bins * self.num_yaw_bins
159
+
160
+ # add special action tokens to language tokenizer
161
+ self._vocab_size = self.num_roll_bins * self.num_pitch_bins * self.num_yaw_bins
162
+ token_list = [ACTION_TOKEN.format(i + self.array_begin_idx) for i in range(self._vocab_size)]
163
+ self.token_array = np.array(token_list)
164
+
165
+ num_new_tokens = self.tokenizer.add_tokens(token_list, special_tokens=True)
166
+ print(f"Add {num_new_tokens} ROTATION TOKENS to tokenizer, tokenizer vocab size {self.tokenizer.vocab_size} / {len(tokenizer)}")
167
+
168
+ self.token_start_idx = self.tokenizer.convert_tokens_to_ids(self.token_array[0])
169
+ self.token_end_idx = self.tokenizer.convert_tokens_to_ids(self.token_array[-1])
170
+ self.set_bins(bin_policy)
171
+
172
+ def set_bins(self, bin_policy):
173
+ self.roll_bins = np.array(bin_policy["roll_bins"])
174
+ self.pitch_bins = np.array(bin_policy["pitch_bins"])
175
+ self.yaw_bins = np.array(bin_policy["yaw_bins"])
176
+
177
+ def __call__(self, action: np.ndarray) -> List[str]:
178
+ """Discretize continuous actions to tokens.
179
+ action: np.ndarray, (n, 3), continuous actions in Cartesian or Spherical coordinates.
180
+ return: np.ndarray, (n,), tokens.
181
+ """
182
+ roll, pitch, yaw = action[:, 0], action[:, 1], action[:, 2]
183
+ disc_roll = np.clip(np.digitize(roll, self.roll_bins) - 1, 0, self.num_roll_bins - 1)
184
+ disc_pitch = np.clip(np.digitize(pitch, self.pitch_bins) - 1, 0, self.num_pitch_bins - 1)
185
+ disc_yaw = np.clip(np.digitize(yaw, self.yaw_bins) - 1, 0, self.num_yaw_bins - 1)
186
+
187
+ ids = disc_roll * self.NP + disc_pitch * self.num_yaw_bins + disc_yaw
188
+ return self.token_array[ids]
189
+
190
+ def decode_token_ids_to_actions(self, action_token_id: Union[np.int64, np.ndarray]) -> np.ndarray:
191
+ """decode token ids to continuous actions.
192
+ action_token_id: np.ndarray, (n,), token ids.
193
+ return: np.ndarray, (n, 3), continuous actions
194
+ """
195
+ action_token_id = np.clip(action_token_id, a_min=self.token_start_idx, a_max=self.token_end_idx)
196
+ ids = action_token_id - self.token_start_idx
197
+ disc_roll, disc_pitch, disc_yaw = ids // self.NP, (ids % self.NP) // self.num_yaw_bins, ids % self.num_yaw_bins
198
+
199
+ roll = 0.5 * (self.roll_bins[disc_roll] + self.roll_bins[disc_roll + 1])
200
+ pitch = 0.5 * (self.pitch_bins[disc_pitch] + self.pitch_bins[disc_pitch + 1])
201
+ yaw = 0.5 * (self.yaw_bins[disc_yaw] + self.yaw_bins[disc_yaw + 1])
202
+ return np.stack((roll, pitch, yaw), axis=1)
203
+
204
+ @property
205
+ def vocab_size(self) -> int:
206
+ return self._vocab_size
207
+
208
+ class GripperTokenzier:
209
+ def __init__(
210
+ self,
211
+ tokenizer: PreTrainedTokenizerBase,
212
+ num_bins: int = 2,
213
+ array_begin_idx = None,
214
+ ) -> None:
215
+ self.tokenizer = tokenizer
216
+ self.num_bins = num_bins
217
+ self.array_begin_idx = array_begin_idx
218
+ token_list = [ACTION_TOKEN.format(i + self.array_begin_idx) for i in range(self.num_bins)]
219
+ self.token_array = np.array(token_list)
220
+
221
+ num_new_tokens = self.tokenizer.add_tokens(token_list, special_tokens=True)
222
+ print(f"Add {num_new_tokens} GRIPPER TOKENS to tokenizer, tokenizer vocab size {self.tokenizer.vocab_size} / {len(tokenizer)}")
223
+
224
+ self.token_start_idx = self.tokenizer.convert_tokens_to_ids(self.token_array[0])
225
+ self.token_end_idx = self.tokenizer.convert_tokens_to_ids(self.token_array[-1])
226
+
227
+ def __call__(self, action: np.ndarray) -> List[str]:
228
+ """Discretize continuous actions to tokens.
229
+ action: np.ndarray, (n,), continuous actions in Cartesian or Spherical coordinates.
230
+ return: np.ndarray, (n,), tokens.
231
+ """
232
+ ids = np.where(action >= 0.5, 1, 0)
233
+ return self.token_array[ids]
234
+
235
+ def decode_token_ids_to_actions(self, action_token_id: np.ndarray) -> np.ndarray:
236
+ """decode token ids to continuous actions.
237
+ action_token_id: np.ndarray, (n,), token ids.
238
+ return: np.ndarray, (n, 1), continuous actions
239
+ """
240
+ action_token_id = np.clip(action_token_id, self.token_start_idx, self.token_end_idx)
241
+ ids = action_token_id - self.token_start_idx
242
+ actions = np.where(ids == 0, 0., 1.)
243
+ return actions[:, None]
244
+
245
+ @property
246
+ def vocab_size(self) -> int:
247
+ return self.num_bins
248
+
249
+ class SpatialActionTokenizer:
250
+ range_bins = {
251
+ "translation": {
252
+ "theta_bins": (0.0, np.pi),
253
+ "phi_bins": (-np.pi, np.pi),
254
+ "r_bins": (0.0, np.sqrt(3)),
255
+ },
256
+ "rotation": {
257
+ "roll_bins": (-1.0, 1.0),
258
+ "pitch_bins": (-1.0, 1.0),
259
+ "yaw_bins": (-1.0, 1.0),
260
+ },
261
+ }
262
+ def __init__(
263
+ self,
264
+ tokenizer: PreTrainedTokenizerBase,
265
+ num_bins: Dict,
266
+ gs_params: Dict = None,
267
+ bin_policy: Dict = None,
268
+ use_spherical: bool = True,
269
+ min_sigma: float = 0.0,
270
+ min_action: float = -1.0,
271
+ max_action: float = 1.0,
272
+ ):
273
+ """set bin_policy if exist, otherwise, caculate bin_policy from gs_params or use uniform bin grids.
274
+ gs_params: Optional[Dict],
275
+ bin_policy: Optional[Dict],
276
+ """
277
+ self.tokenizer = tokenizer
278
+ self.min_action, self.max_action = min_action, max_action
279
+ self.num_bins = num_bins
280
+ self.min_sigma = min_sigma
281
+
282
+ # set bin policy
283
+ self.bin_policy = bin_policy if bin_policy else self.get_bin_policy(gs_params, self.min_sigma)
284
+ self.translation_tokenizer = TranslationTokenizer(
285
+ self.tokenizer,
286
+ self.num_bins["translation"],
287
+ self.bin_policy["translation"],
288
+ use_spherical=use_spherical
289
+ )
290
+
291
+ self.rotation_tokenizer = RotationTokenizer(
292
+ self.tokenizer,
293
+ self.num_bins["rotation"],
294
+ self.bin_policy["rotation"],
295
+ array_begin_idx=self.translation_tokenizer.vocab_size,
296
+ )
297
+
298
+ self.gripper_tokenizer = GripperTokenzier(
299
+ self.tokenizer,
300
+ self.num_bins["gripper"],
301
+ array_begin_idx=self.translation_tokenizer.vocab_size + self.rotation_tokenizer.vocab_size
302
+ )
303
+ self._vocab_size = self.translation_tokenizer.vocab_size + self.rotation_tokenizer.vocab_size + self.gripper_tokenizer.vocab_size
304
+
305
+ def __call__(self, action: np.ndarray) -> List[str]:
306
+ """Discretize continuous actions to tokens.
307
+ action: np.ndarray, (n, 7), continuous actions in Cartesian coordinates.
308
+ return: np.ndarray, (n, 3), tokens.
309
+ """
310
+ if len(action.shape) == 1:
311
+ assert action.shape[0] == 7, f"action dim mismatch, got action shape: {action.shape}"
312
+ action = action.reshape(1, 7)
313
+ assert action.shape[1] == 7, f"action dim mismatch, got action shape: {action.shape}"
314
+
315
+ action = np.clip(action, a_min=self.min_action, a_max=self.max_action)
316
+ trans_tokens = self.translation_tokenizer(action[:, :3]) # (n,)
317
+ rot_tokens = self.rotation_tokenizer(action[:, 3:6]) # (n,)
318
+ grip_tokens = self.gripper_tokenizer(action[:, 6]) # (n,)
319
+ return np.stack((trans_tokens, rot_tokens, grip_tokens), axis=1) # (n, 3)
320
+
321
+ def decode_token_ids_to_actions(self, action_token_ids: np.ndarray) -> np.ndarray:
322
+ """decode token ids to continuous actions.
323
+ action_token_ids: np.ndarray, (n, 3), token ids.
324
+ """
325
+ if len(action_token_ids.shape) == 1:
326
+ assert action_token_ids.shape[0] == 3, f"action token id numbers mismatich, need 3 got {action_token_ids.shape[0]}"
327
+ action_token_ids = action_token_ids.reshape(1, 3)
328
+ assert action_token_ids.shape[1] == 3, f"token id numbers mismatich, need 3 got {action_token_ids.shape[1]}"
329
+
330
+ trans_action = self.translation_tokenizer.decode_token_ids_to_actions(action_token_ids[:, 0]) # (n, 3)
331
+ rot_action = self.rotation_tokenizer.decode_token_ids_to_actions(action_token_ids[:, 1]) # (n, 3)
332
+ grip_action = self.gripper_tokenizer.decode_token_ids_to_actions(action_token_ids[:, 2]) # (n, 1)
333
+ return np.concatenate((trans_action, rot_action, grip_action), axis=1) # (n, 7)
334
+
335
+ @property
336
+ def vocab_size(self) -> int:
337
+ return self._vocab_size
338
+
339
+ @property
340
+ def action_token_begin_idx(self) -> int:
341
+ return self.translation_tokenizer.token_start_idx
342
+
343
+ def get_bin_policy(self, gs_params=None, min_sigma=0.0):
344
+ bin_policy = {
345
+ "translation": {"theta_bins": None, "phi_bins": None, "r_bins": None},
346
+ "rotation": {"roll_bins": None, "pitch_bins": None, "yaw_bins": None}
347
+ }
348
+ if gs_params is None:
349
+ for bin_type in self.range_bins.keys():
350
+ for bin_key in self.range_bins[bin_type].keys():
351
+ bin_policy[bin_type][bin_key] = np.linspace(*self.range_bins[bin_type][bin_key], self.num_bins[bin_type][bin_key] + 1)
352
+ print(f"use unifrom bin grids ... \n{bin_policy}")
353
+ else:
354
+ for bin_type in self.range_bins.keys():
355
+ for bin_key in self.range_bins[bin_type].keys():
356
+ mu = gs_params[bin_key.split("_")[0].lower()]["mu"]
357
+ sigma = max(gs_params[bin_key.split("_")[0].lower()]["sigma"], min_sigma)
358
+ bin_bound_prob = np.linspace(
359
+ norm.cdf(self.range_bins[bin_type][bin_key][0], loc=mu, scale=sigma),
360
+ norm.cdf(self.range_bins[bin_type][bin_key][1], loc=mu, scale=sigma),
361
+ self.num_bins[bin_type][bin_key] + 1,
362
+ )
363
+ bin_boundary = norm.ppf(bin_bound_prob, loc=mu, scale=sigma)
364
+ bin_policy[bin_type][bin_key] = np.clip(
365
+ bin_boundary,
366
+ self.range_bins[bin_type][bin_key][0],
367
+ self.range_bins[bin_type][bin_key][1],
368
+ ).tolist() # for serialize
369
+ print(f"caculate bin grids from gaussians \n{bin_policy}")
370
+ return bin_policy
371
+
372
+ def get_norm_meshgrid(self, bin_policy):
373
+ grids = []
374
+ policy = {k1: {k2: np.array(v2) for k2, v2 in v1.items()} for k1, v1 in bin_policy.items()}
375
+ # NOTE: use unify k,v order of range_bins (tpr, rpy)
376
+ for bin_type in self.range_bins.keys():
377
+ bounds = []
378
+ for bin_key in self.range_bins[bin_type].keys():
379
+ minb, maxb = self.range_bins[bin_type][bin_key][0], self.range_bins[bin_type][bin_key][1]
380
+ bin_boundary = policy[bin_type][bin_key]
381
+ bin_center = (bin_boundary[:-1] + bin_boundary[1:]) / 2
382
+ bin_center = np.concatenate([np.array([minb]),bin_center,np.array([maxb])]) # padding
383
+ bin_center = (bin_center - minb) / (maxb - minb) # nomalize (m, n, k)
384
+ bounds.append(bin_center)
385
+ # generate grids
386
+ grid_x, grid_y, grid_z = np.meshgrid(*bounds)
387
+ grids += [np.stack([grid_x, grid_y, grid_z], -1).reshape(-1, 3)]
388
+ return grids[0], grids[1] # (N, 3)
389
+
390
+ def spatial_embedding_adaption(self, gs_params, embeddings: torch.nn.Embedding, min_sigma=0.0, adpt_feature=False):
391
+ """
392
+ gs_params0, gs_params1: Dict
393
+ embeddings: tensor (S,E)
394
+ """
395
+ from scipy.interpolate import griddata
396
+ new_policy = self.get_bin_policy(gs_params, min_sigma=min_sigma)
397
+ trans_grids0, rot_grids0 = self.get_norm_meshgrid(self.bin_policy)
398
+ trans_grids1, rot_grids1 = self.get_norm_meshgrid(new_policy)
399
+
400
+ print("overwrite bin policy and tokenizer bins ...")
401
+ self.bin_policy = new_policy
402
+ self.min_sigma = min_sigma
403
+ self.translation_tokenizer.set_bins(new_policy["translation"])
404
+ self.rotation_tokenizer.set_bins(new_policy["rotation"])
405
+
406
+ if adpt_feature:
407
+ emb_data = embeddings.weight.data # (S, e)
408
+ _, E = emb_data.shape
409
+
410
+ # translation
411
+ m, n, k = (self.num_bins["translation"][k] for k in ["theta_bins", "phi_bins", "r_bins"])
412
+ N = m*n*k
413
+ trans_emb_data = emb_data[:N,].reshape(m, n, k, -1).permute(3, 0, 1, 2) # (e, m, n, k)
414
+ pad_emb = torch.nn.functional.pad(trans_emb_data, (1, 1, 1, 1, 1, 1), "replicate").permute(1, 2, 3, 0).reshape(-1, E)
415
+ adpt_trans_emb = griddata(trans_grids0, pad_emb.float(), trans_grids1, method='linear')
416
+ adpt_trans_emb = adpt_trans_emb.reshape(m+2, n+2, k+2, E)[1:-1, 1:-1, 1:-1,]
417
+
418
+ # rotation
419
+ m1, n1, k1 = (self.num_bins["rotation"][k] for k in ["roll_bins", "pitch_bins", "yaw_bins"])
420
+ M = m1*n1*k1
421
+ rot_emb_data = emb_data[N : N + M,].reshape(m1, n1, k1, -1).permute(3, 0, 1, 2) # (e, m, n, k)
422
+ pad_emb = torch.nn.functional.pad(rot_emb_data, (1, 1, 1, 1, 1, 1), "replicate").permute(1, 2, 3, 0).reshape(-1, E)
423
+ adpt_rot_emb = griddata(rot_grids0, pad_emb.float(), rot_grids1, method='linear')
424
+ adpt_rot_emb = adpt_rot_emb.reshape(m1+2, n1+2, k1+2, E)[1:-1, 1:-1, 1:-1,]
425
+
426
+ # set data
427
+ device, dtype = embeddings.weight.data.device, embeddings.weight.data.dtype
428
+ embeddings.weight.data[:N] = torch.Tensor(adpt_trans_emb.reshape(-1, E), device=device).to(dtype)
429
+ embeddings.weight.data[N:N+M] = torch.Tensor(adpt_rot_emb.reshape(-1, E), device=device).to(dtype)
430
+ print("DONE! adapt spatial embedding to new gaussian distributation finished.")
431
+ print(embeddings.weight.data)
adapter_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "IPEC-COMMUNITY/spatialvla-4b-224-pt",
5
+ "bias": "none",
6
+ "eva_config": null,
7
+ "exclude_modules": null,
8
+ "fan_in_fan_out": false,
9
+ "inference_mode": true,
10
+ "init_lora_weights": "gaussian",
11
+ "layer_replication": null,
12
+ "layers_pattern": null,
13
+ "layers_to_transform": null,
14
+ "loftq_config": {},
15
+ "lora_alpha": 32,
16
+ "lora_bias": false,
17
+ "lora_dropout": 0.0,
18
+ "megatron_config": null,
19
+ "megatron_core": "megatron.core",
20
+ "modules_to_save": [],
21
+ "peft_type": "LORA",
22
+ "r": 32,
23
+ "rank_pattern": {},
24
+ "revision": null,
25
+ "target_modules": [
26
+ "fc2",
27
+ "linear",
28
+ "out_proj",
29
+ "gate_proj",
30
+ "o_proj",
31
+ "q_proj",
32
+ "position_embedding_head.3",
33
+ "position_embedding_head.0",
34
+ "down_proj",
35
+ "k_proj",
36
+ "up_proj",
37
+ "v_proj",
38
+ "fc1"
39
+ ],
40
+ "task_type": "CAUSAL_LM",
41
+ "use_dora": false,
42
+ "use_rslora": false
43
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:321e8bf39040ecb5cc098d9c1a5d949863b8984e7284834c6ed1284cfae9330a
3
+ size 118478120
global_step20000/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba2aede6b1df77b71c4892ad88bda9f33409895b5e59a6bdd649f141fc52771b
3
+ size 88799120
global_step20000/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c18c2d01d4ba549d29734b5e4dd0f9746384bc14b9ac06efe309101be15f637
3
+ size 88798544
global_step20000/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37be0911da3ad4fe5511128313655e786b3214cc756103aae74384fdcc3df55d
3
+ size 88792016
global_step20000/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a025c115f1da140a7a883998b2c4cb3a55e7df9801aed9212e54075f91f4b3a9
3
+ size 88788624
global_step20000/bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9cfd19e10f2d22f9c014b8f0073154c5600f949e933ad4cd4020b9002c5206f
3
+ size 88788240
global_step20000/bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1ef3bbe9d768d8c27d3f67e0cb7487d7f9fd2235b0526ac43e1d6498ea236ee
3
+ size 88788048
global_step20000/bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0052e1b05a49523bdf2c059acd156a32c843d943978d98f58e6829fc31e01f7b
3
+ size 88788560
global_step20000/bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:050596d6b020de84b3013a4a2c09a804a90f4c35efb24e6cfa1d6a7fde2dce31
3
+ size 88789520
global_step20000/mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72997e653930faaf3c066d4f82a1834386f75086babb84d66fe65311e1385935
3
+ size 119108780
latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step20000
preprocessor_config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "auto_map": {
3
+ "AutoProcessor": "processing_spatialvla.SpatialVLAProcessor"
4
+ },
5
+ "do_convert_rgb": null,
6
+ "do_normalize": false,
7
+ "do_rescale": true,
8
+ "do_resize": true,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_processor_type": "SiglipImageProcessor",
15
+ "image_seq_length": 256,
16
+ "image_std": [
17
+ 0.5,
18
+ 0.5,
19
+ 0.5
20
+ ],
21
+ "processor_class": "SpatialVLAProcessor",
22
+ "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "height": 224,
26
+ "width": 224
27
+ }
28
+ }
processing_spatialvla.py ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2024 The HuggingFace Inc. team.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ import logging
16
+ from typing import List, Optional, Union, Dict
17
+ import numpy as np
18
+ import torch
19
+ from transformers.feature_extraction_utils import BatchFeature
20
+ from transformers.image_utils import ImageInput, is_valid_image
21
+ from transformers.processing_utils import Unpack, _validate_images_text_input_order, ProcessorMixin
22
+ from transformers.tokenization_utils_base import AddedToken, PreTokenizedInput, TextInput
23
+ from transformers.utils import logging
24
+ from transformers.models.paligemma.processing_paligemma import (
25
+ make_batched_images,
26
+ build_string_from_input,
27
+ _is_str_or_image,
28
+ PaliGemmaProcessorKwargs,
29
+ IMAGE_TOKEN,
30
+ EXTRA_TOKENS
31
+ )
32
+ from .action_tokenizer import SpatialActionTokenizer
33
+ logger = logging.get_logger(__name__)
34
+
35
+ class SpatialVLAProcessor(ProcessorMixin):
36
+ attributes = ["image_processor", "tokenizer"]
37
+ valid_kwargs = ["chat_template"]
38
+ image_processor_class = "SiglipImageProcessor"
39
+ tokenizer_class = ("GemmaTokenizer", "GemmaTokenizerFast")
40
+
41
+ def __init__(
42
+ self,
43
+ image_processor=None,
44
+ tokenizer=None,
45
+ chat_template=None,
46
+ statistics: Optional[dict] = None,
47
+ bin_policy=None,
48
+ intrinsic_config=None,
49
+ action_config=None,
50
+ num_obs_steps=1,
51
+ obs_delta=1,
52
+ action_chunk_size=1,
53
+ min_sigma=0.0,
54
+ **kwargs,
55
+ ):
56
+ if image_processor is None:
57
+ raise ValueError("You need to specify an `image_processor`.")
58
+ if tokenizer is None:
59
+ raise ValueError("You need to specify a `tokenizer`.")
60
+ if not hasattr(image_processor, "image_seq_length"):
61
+ raise ValueError("Image processor is missing an `image_seq_length` attribute.")
62
+
63
+ self.image_seq_length = image_processor.image_seq_length
64
+
65
+ if not hasattr(tokenizer, "image_token"):
66
+ image_token = AddedToken(IMAGE_TOKEN, normalized=False, special=True)
67
+ tokens_to_add = {"additional_special_tokens": [image_token]}
68
+ tokenizer.add_special_tokens(tokens_to_add)
69
+ self.image_token_id = tokenizer.convert_tokens_to_ids(IMAGE_TOKEN)
70
+ else:
71
+ self.image_token_id = tokenizer.image_token_id
72
+
73
+ tokenizer.add_tokens(EXTRA_TOKENS)
74
+ tokenizer.add_bos_token = False
75
+ tokenizer.add_eos_token = False
76
+
77
+ super().__init__(image_processor, tokenizer, chat_template=chat_template)
78
+
79
+ # action tokenizer
80
+ self.statistics = statistics if statistics else {}
81
+ self.bin_policy = bin_policy
82
+ self.min_sigma = min_sigma
83
+ self.intrinsic_config = intrinsic_config
84
+ self.action_config = action_config
85
+ self.num_obs_steps = num_obs_steps
86
+ self.obs_delta = obs_delta
87
+ self.action_chunk_size = action_chunk_size
88
+ self.dataset_intrinsics = {}
89
+ height, width = image_processor.size["height"], image_processor.size["width"]
90
+
91
+ # scale intrinsic matrix
92
+ for k, v in intrinsic_config.items():
93
+ K = torch.tensor(v["intrinsic"]).float()
94
+ K[:2] *= torch.tensor([width / v["width"], height / v["height"]])[:, None]
95
+ self.dataset_intrinsics[k] = K
96
+
97
+ self.action_tokenizer = SpatialActionTokenizer(
98
+ tokenizer=tokenizer, num_bins=action_config["num_bins"],
99
+ bin_policy=bin_policy, use_spherical=action_config["use_spherical"],
100
+ min_sigma=min_sigma,
101
+ )
102
+
103
+ def __call__(
104
+ self,
105
+ images: ImageInput = None,
106
+ text: Union[TextInput, PreTokenizedInput, List[TextInput], List[PreTokenizedInput]] = None,
107
+ unnorm_key: Optional[str] = None,
108
+ suffix_actions: Optional[np.array] = None, # (t e)
109
+ **kwargs: Unpack[PaliGemmaProcessorKwargs],
110
+ ) -> BatchFeature:
111
+ images, text = _validate_images_text_input_order(images, text)
112
+
113
+ output_kwargs = self._merge_kwargs(
114
+ PaliGemmaProcessorKwargs,
115
+ tokenizer_init_kwargs=self.tokenizer.init_kwargs,
116
+ **kwargs,
117
+ )
118
+ if suffix_actions is not None:
119
+ action_tokens = self.action_tokenizer(suffix_actions) # (n,3)
120
+ suffix="".join(action_tokens.flatten())
121
+ else:
122
+ suffix = output_kwargs["text_kwargs"].pop("suffix", None)
123
+
124
+ return_token_type_ids = True if suffix is not None else False
125
+
126
+ if images is None:
127
+ raise ValueError("`images` are expected as arguments to a `PaliGemmaProcessor` instance.")
128
+ if text is None:
129
+ logger.warning_once( "You are using PaliGemma without a text prefix. It will perform as a picture-captioning model.")
130
+ text = ""
131
+
132
+ if _is_str_or_image(text):
133
+ text = [text]
134
+ elif isinstance(text, list) and _is_str_or_image(text[0]):
135
+ pass
136
+
137
+ if text is not None and images is not None:
138
+ if not any(IMAGE_TOKEN in sample for sample in text):
139
+ if isinstance(text, List) and isinstance(images, List):
140
+ if len(images) != len(text):
141
+ raise ValueError(
142
+ f"Received {len(images)} images for {len(text)} prompts. Each prompt should be associated with an image or list of images."
143
+ )
144
+ if is_valid_image(images):
145
+ images = [[images]]
146
+ elif isinstance(images, list) and is_valid_image(images[0]):
147
+ images = [[image] for image in images]
148
+ elif not (isinstance(images, list) and isinstance(images[0], list) and is_valid_image(images[0][0])):
149
+ raise ValueError("images must be an image, list of images or list of list of images")
150
+ if suffix is not None and _is_str_or_image(suffix): suffix = [suffix]
151
+ if suffix is not None: suffix = [sfx + self.tokenizer.eos_token for sfx in suffix]
152
+ input_strings = [
153
+ build_string_from_input(
154
+ prompt=prompt,
155
+ bos_token=self.tokenizer.bos_token,
156
+ image_seq_len=self.image_seq_length,
157
+ image_token=IMAGE_TOKEN,
158
+ num_images=len(image_list) if isinstance(image_list, list) else 1,
159
+ )
160
+ for prompt, image_list in zip(text, images)
161
+ ]
162
+ images = make_batched_images(images)
163
+ else:
164
+ expanded_samples = []
165
+ for sample in text:
166
+ expanded_sample = sample.replace(IMAGE_TOKEN, IMAGE_TOKEN * self.image_seq_length)
167
+ bos_rfind_index = expanded_sample.rfind(IMAGE_TOKEN)
168
+ bos_index = bos_rfind_index + len(IMAGE_TOKEN) if bos_rfind_index != -1 else 0
169
+ expanded_sample = (
170
+ expanded_sample[:bos_index] + self.tokenizer.bos_token + expanded_sample[bos_index:]
171
+ )
172
+ expanded_samples.append(expanded_sample)
173
+ input_strings = [f"{sample}\n" for sample in expanded_samples]
174
+ pixel_values = self.image_processor(images, **output_kwargs["images_kwargs"])["pixel_values"]
175
+
176
+ if output_kwargs["text_kwargs"].get("max_length", None) is not None:
177
+ output_kwargs["text_kwargs"]["max_length"] += self.image_seq_length
178
+
179
+ inputs = self.tokenizer(
180
+ input_strings,
181
+ text_pair=suffix,
182
+ return_token_type_ids=return_token_type_ids,
183
+ **output_kwargs["text_kwargs"],
184
+ )
185
+
186
+ intrinsic = self.dataset_intrinsics[unnorm_key] if unnorm_key in self.dataset_intrinsics else self.dataset_intrinsics["default"]
187
+ return_data = {**inputs, "pixel_values": pixel_values, "intrinsic": intrinsic}
188
+
189
+ if return_token_type_ids:
190
+ labels = inputs["input_ids"].masked_fill(inputs["token_type_ids"] == 0, -100)
191
+ return_data.update({"labels": labels})
192
+ return BatchFeature(data=return_data)
193
+
194
+ # Copied from transformers.models.clip.processing_clip.CLIPProcessor.batch_decode with CLIP->Gemma
195
+ def batch_decode(self, *args, **kwargs):
196
+ """
197
+ This method forwards all its arguments to GemmaTokenizerFast's [`~PreTrainedTokenizer.batch_decode`]. Please
198
+ refer to the docstring of this method for more information.
199
+ """
200
+ return self.tokenizer.batch_decode(*args, **kwargs)
201
+
202
+ # Copied from transformers.models.clip.processing_clip.CLIPProcessor.decode with CLIP->Gemma
203
+ def decode(self, *args, **kwargs):
204
+ """
205
+ This method forwards all its arguments to GemmaTokenizerFast's [`~PreTrainedTokenizer.decode`]. Please refer to
206
+ the docstring of this method for more information.
207
+ """
208
+ return self.tokenizer.decode(*args, **kwargs)
209
+
210
+ @property
211
+ def model_input_names(self):
212
+ tokenizer_input_names = self.tokenizer.model_input_names
213
+ image_processor_input_names = self.image_processor.model_input_names
214
+ return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names))
215
+
216
+ def decode_actions(
217
+ self,
218
+ generation_outputs: torch.Tensor,
219
+ unnorm_key: Optional[str] = None,
220
+ ) -> Dict[str, torch.Tensor]:
221
+ action_token_num = 3 # translation + rotation + gripper
222
+ predicted_action_token_ids = generation_outputs[0, : action_token_num * self.action_chunk_size].detach().cpu().long().numpy()
223
+ assert self.tokenizer.eos_token != predicted_action_token_ids[-1], "[error] actions contain EOS token, please check you truncation settings!"
224
+
225
+ if predicted_action_token_ids.shape[0] < action_token_num * self.action_chunk_size: # pad with zeros
226
+ logger.warning(f"Padding zero action!")
227
+ predicted_action_token_ids = np.concatenate(
228
+ [
229
+ predicted_action_token_ids,
230
+ np.zeros(action_token_num * self.action_chunk_size - predicted_action_token_ids.shape[0], dtype=np.longlong),
231
+ ]
232
+ )
233
+ predicted_action_token_ids = predicted_action_token_ids.reshape(-1, action_token_num)
234
+ normalized_action_chunks = self.action_tokenizer.decode_token_ids_to_actions(predicted_action_token_ids)
235
+
236
+ if unnorm_key is None:
237
+ logger.warning(f"unnorm_key {unnorm_key} is not in statistics, use next one")
238
+ unnorm_key = next(self.statistics.keys())
239
+ action_norm_stats = self.statistics[unnorm_key]["action"]
240
+
241
+ action_dim = len(action_norm_stats["q01"])
242
+ mask = np.array(action_norm_stats.get("mask", np.ones(action_dim)), dtype=bool)
243
+ action_high, action_low = np.array(action_norm_stats["q99"]), np.array(action_norm_stats["q01"])
244
+
245
+ actions = []
246
+ for normalized_actions in normalized_action_chunks:
247
+ action = np.where(
248
+ mask,
249
+ 0.5 * (normalized_actions + 1) * (action_high - action_low) + action_low,
250
+ normalized_actions,
251
+ )
252
+ actions.append(action)
253
+ actions = np.stack(actions)
254
+ return {"actions": actions, "action_ids": predicted_action_token_ids}
processor_config.json ADDED
@@ -0,0 +1,3848 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "action_chunk_size": 4,
3
+ "action_config": {
4
+ "distribution": "gaussian",
5
+ "num_bins": {
6
+ "gripper": 2,
7
+ "rotation": {
8
+ "pitch_bins": 16,
9
+ "roll_bins": 16,
10
+ "yaw_bins": 16
11
+ },
12
+ "total": 8194,
13
+ "translation": {
14
+ "phi_bins": 32,
15
+ "r_bins": 8,
16
+ "theta_bins": 16
17
+ }
18
+ },
19
+ "use_spherical": true
20
+ },
21
+ "auto_map": {
22
+ "AutoProcessor": "processing_spatialvla.SpatialVLAProcessor"
23
+ },
24
+ "bin_policy": {
25
+ "rotation": {
26
+ "pitch_bins": [
27
+ -1.0,
28
+ -0.6785015894338633,
29
+ -0.516796358161167,
30
+ -0.3978678314258641,
31
+ -0.29907867426319246,
32
+ -0.21158608510441518,
33
+ -0.13081651669135252,
34
+ -0.05392877158612959,
35
+ 0.02113881590329744,
36
+ 0.0961313749999302,
37
+ 0.17278161860263358,
38
+ 0.25310821063971767,
39
+ 0.33985580585203445,
40
+ 0.4373796767941653,
41
+ 0.5539451994131283,
42
+ 0.7100308525313351,
43
+ 0.9999999999999999
44
+ ],
45
+ "roll_bins": [
46
+ -1.0,
47
+ -0.7121298287894609,
48
+ -0.5564581819056097,
49
+ -0.440071773405789,
50
+ -0.3426461358467384,
51
+ -0.25595819395001274,
52
+ -0.17566893098554964,
53
+ -0.09904102149491184,
54
+ -0.024059205927849478,
55
+ 0.05100802578115137,
56
+ 0.12790631705350436,
57
+ 0.20869987492610076,
58
+ 0.2962359118858219,
59
+ 0.3951018734752948,
60
+ 0.5141779624401348,
61
+ 0.6762450862353777,
62
+ 1.0
63
+ ],
64
+ "yaw_bins": [
65
+ -1.0,
66
+ -0.6910047644696934,
67
+ -0.5313988287371314,
68
+ -0.4133376866679583,
69
+ -0.3150057290436059,
70
+ -0.22777658299365705,
71
+ -0.14715771012527992,
72
+ -0.07034330907230311,
73
+ 0.004712965738136004,
74
+ 0.07975252682496348,
75
+ 0.15651401950954372,
76
+ 0.23703420508371892,
77
+ 0.32409736463921823,
78
+ 0.4221473708283458,
79
+ 0.5396818128475004,
80
+ 0.6980345545587262,
81
+ 1.0
82
+ ]
83
+ },
84
+ "translation": {
85
+ "phi_bins": [
86
+ -3.1415926535897927,
87
+ -2.5597806593194092,
88
+ -2.1899702111786126,
89
+ -1.9071489188814448,
90
+ -1.6724463283141142,
91
+ -1.4683467869586326,
92
+ -1.2853487663890668,
93
+ -1.1176672338183495,
94
+ -0.961484031585327,
95
+ -0.8141204989748655,
96
+ -0.6736024210639718,
97
+ -0.5384120746595923,
98
+ -0.40733740832383114,
99
+ -0.279375002438531,
100
+ -0.15366425283265983,
101
+ -0.029440234757304742,
102
+ 0.0940021938080639,
103
+ 0.2173378027339352,
104
+ 0.34123726674747146,
105
+ 0.46639302836823826,
106
+ 0.5935473848733163,
107
+ 0.7235258808185444,
108
+ 0.857280204661428,
109
+ 0.9959469801163238,
110
+ 1.1409329906705301,
111
+ 1.2940454053271015,
112
+ 1.4577019170652383,
113
+ 1.6352913749303837,
114
+ 1.8318407243899377,
115
+ 2.0553733807372363,
116
+ 2.320069275631962,
117
+ 2.6552436426949604,
118
+ 3.141592653589793
119
+ ],
120
+ "r_bins": [
121
+ 2.220446049250313e-16,
122
+ 0.19677118231539265,
123
+ 0.3506298590504556,
124
+ 0.4881976731379496,
125
+ 0.621970275186659,
126
+ 0.7620978861167458,
127
+ 0.9228346010157172,
128
+ 1.1393317208802278,
129
+ 1.7320508075688767
130
+ ],
131
+ "theta_bins": [
132
+ 0.0,
133
+ 0.7067187338585303,
134
+ 0.9814199309359143,
135
+ 1.1752042640550222,
136
+ 1.3331175751173345,
137
+ 1.4713205387280388,
138
+ 1.5977846301055496,
139
+ 1.7172771763957553,
140
+ 1.8331248472067783,
141
+ 1.9480194771467687,
142
+ 2.0644993054216925,
143
+ 2.1853608246107656,
144
+ 2.314189357400805,
145
+ 2.456314355008026,
146
+ 2.621028843347318,
147
+ 2.828352346005421,
148
+ 3.141592653589793
149
+ ]
150
+ }
151
+ },
152
+ "intrinsic_config": {
153
+ "bridge_orig/1.0.0": {
154
+ "height": 480,
155
+ "intrinsic": [
156
+ [
157
+ 623.588,
158
+ 0,
159
+ 319.501
160
+ ],
161
+ [
162
+ 0,
163
+ 623.588,
164
+ 239.545
165
+ ],
166
+ [
167
+ 0,
168
+ 0,
169
+ 1
170
+ ]
171
+ ],
172
+ "width": 640
173
+ },
174
+ "default": {
175
+ "height": 480,
176
+ "intrinsic": [
177
+ [
178
+ 623.588,
179
+ 0,
180
+ 319.501
181
+ ],
182
+ [
183
+ 0,
184
+ 623.588,
185
+ 239.545
186
+ ],
187
+ [
188
+ 0,
189
+ 0,
190
+ 1
191
+ ]
192
+ ],
193
+ "width": 640
194
+ },
195
+ "roboverse/1.0.0": {
196
+ "height": 256,
197
+ "intrinsic": [
198
+ [
199
+ 293.19970703125,
200
+ 0.0,
201
+ 128.0
202
+ ],
203
+ [
204
+ 0.0,
205
+ 293.19970703125,
206
+ 128.0
207
+ ],
208
+ [
209
+ 0.0,
210
+ 0.0,
211
+ 1.0
212
+ ]
213
+ ],
214
+ "width": 256
215
+ }
216
+ },
217
+ "min_sigma": 0.0,
218
+ "num_obs_steps": 1,
219
+ "obs_delta": 1,
220
+ "processor_class": "SpatialVLAProcessor",
221
+ "statistics": {
222
+ "austin_buds_dataset_converted_externally_to_rlds/0.1.0": {
223
+ "action": {
224
+ "mask": [
225
+ true,
226
+ true,
227
+ true,
228
+ true,
229
+ true,
230
+ true,
231
+ false
232
+ ],
233
+ "max": [
234
+ 1.0,
235
+ 1.0,
236
+ 1.0,
237
+ 0.0,
238
+ 0.0,
239
+ 0.0,
240
+ 1.0
241
+ ],
242
+ "mean": [
243
+ -0.07678329944610596,
244
+ 0.0036849123425781727,
245
+ 0.05644941329956055,
246
+ 0.0,
247
+ 0.0,
248
+ 0.0,
249
+ 0.3510494828224182
250
+ ],
251
+ "min": [
252
+ -1.0,
253
+ -1.0,
254
+ -1.0,
255
+ 0.0,
256
+ 0.0,
257
+ 0.0,
258
+ 0.0
259
+ ],
260
+ "q01": [
261
+ -1.0,
262
+ -0.9599999785423279,
263
+ -0.8714285492897034,
264
+ 0.0,
265
+ 0.0,
266
+ 0.0,
267
+ 0.0
268
+ ],
269
+ "q99": [
270
+ 1.0,
271
+ 0.8600000143051147,
272
+ 1.0,
273
+ 0.0,
274
+ 0.0,
275
+ 0.0,
276
+ 1.0
277
+ ],
278
+ "std": [
279
+ 0.6367746591567993,
280
+ 0.3788914680480957,
281
+ 0.47796377539634705,
282
+ 0.0,
283
+ 0.0,
284
+ 0.0,
285
+ 0.4772108495235443
286
+ ]
287
+ },
288
+ "num_trajectories": 50,
289
+ "num_transitions": 34112,
290
+ "proprio": {
291
+ "max": [
292
+ 0.0,
293
+ 0.0,
294
+ 0.0,
295
+ 0.0,
296
+ 0.0,
297
+ 0.0,
298
+ 0.0
299
+ ],
300
+ "mean": [
301
+ 0.0,
302
+ 0.0,
303
+ 0.0,
304
+ 0.0,
305
+ 0.0,
306
+ 0.0,
307
+ 0.0
308
+ ],
309
+ "min": [
310
+ 0.0,
311
+ 0.0,
312
+ 0.0,
313
+ 0.0,
314
+ 0.0,
315
+ 0.0,
316
+ 0.0
317
+ ],
318
+ "q01": [
319
+ 0.0,
320
+ 0.0,
321
+ 0.0,
322
+ 0.0,
323
+ 0.0,
324
+ 0.0,
325
+ 0.0
326
+ ],
327
+ "q99": [
328
+ 0.0,
329
+ 0.0,
330
+ 0.0,
331
+ 0.0,
332
+ 0.0,
333
+ 0.0,
334
+ 0.0
335
+ ],
336
+ "std": [
337
+ 0.0,
338
+ 0.0,
339
+ 0.0,
340
+ 0.0,
341
+ 0.0,
342
+ 0.0,
343
+ 0.0
344
+ ]
345
+ }
346
+ },
347
+ "austin_sailor_dataset_converted_externally_to_rlds/0.1.0": {
348
+ "action": {
349
+ "mask": [
350
+ true,
351
+ true,
352
+ true,
353
+ true,
354
+ true,
355
+ true,
356
+ false
357
+ ],
358
+ "max": [
359
+ 1.0,
360
+ 1.0,
361
+ 1.0,
362
+ 0.0,
363
+ 0.0,
364
+ 0.375,
365
+ 1.0
366
+ ],
367
+ "mean": [
368
+ 0.011825386434793472,
369
+ 0.0064610871486365795,
370
+ 0.060236409306526184,
371
+ 0.0,
372
+ 0.0,
373
+ 0.0016465834341943264,
374
+ 0.5260950326919556
375
+ ],
376
+ "min": [
377
+ -1.0,
378
+ -1.0,
379
+ -1.0,
380
+ 0.0,
381
+ 0.0,
382
+ -0.375,
383
+ 0.0
384
+ ],
385
+ "q01": [
386
+ -1.0,
387
+ -0.9828571677207947,
388
+ -0.6000000238418579,
389
+ 0.0,
390
+ 0.0,
391
+ -0.17249999940395355,
392
+ 0.0
393
+ ],
394
+ "q99": [
395
+ 1.0,
396
+ 0.9457142949104309,
397
+ 1.0,
398
+ 0.0,
399
+ 0.0,
400
+ 0.17892856895923615,
401
+ 1.0
402
+ ],
403
+ "std": [
404
+ 0.46348854899406433,
405
+ 0.41240164637565613,
406
+ 0.41186293959617615,
407
+ 0.0,
408
+ 0.0,
409
+ 0.0578608438372612,
410
+ 0.49893733859062195
411
+ ]
412
+ },
413
+ "num_trajectories": 240,
414
+ "num_transitions": 353094,
415
+ "proprio": {
416
+ "max": [
417
+ 0.0,
418
+ 0.0,
419
+ 0.0,
420
+ 0.0,
421
+ 0.0,
422
+ 0.0,
423
+ 0.0
424
+ ],
425
+ "mean": [
426
+ 0.0,
427
+ 0.0,
428
+ 0.0,
429
+ 0.0,
430
+ 0.0,
431
+ 0.0,
432
+ 0.0
433
+ ],
434
+ "min": [
435
+ 0.0,
436
+ 0.0,
437
+ 0.0,
438
+ 0.0,
439
+ 0.0,
440
+ 0.0,
441
+ 0.0
442
+ ],
443
+ "q01": [
444
+ 0.0,
445
+ 0.0,
446
+ 0.0,
447
+ 0.0,
448
+ 0.0,
449
+ 0.0,
450
+ 0.0
451
+ ],
452
+ "q99": [
453
+ 0.0,
454
+ 0.0,
455
+ 0.0,
456
+ 0.0,
457
+ 0.0,
458
+ 0.0,
459
+ 0.0
460
+ ],
461
+ "std": [
462
+ 0.0,
463
+ 0.0,
464
+ 0.0,
465
+ 0.0,
466
+ 0.0,
467
+ 0.0,
468
+ 0.0
469
+ ]
470
+ }
471
+ },
472
+ "austin_sirius_dataset_converted_externally_to_rlds/0.1.0": {
473
+ "action": {
474
+ "mask": [
475
+ true,
476
+ true,
477
+ true,
478
+ true,
479
+ true,
480
+ true,
481
+ false
482
+ ],
483
+ "max": [
484
+ 1.0002285242080688,
485
+ 0.960608720779419,
486
+ 1.105179786682129,
487
+ 0.0,
488
+ 0.0,
489
+ 0.341785728931427,
490
+ 1.0
491
+ ],
492
+ "mean": [
493
+ 0.077476866543293,
494
+ 0.031955525279045105,
495
+ 0.04244735836982727,
496
+ 0.0,
497
+ 0.0,
498
+ -0.01603454165160656,
499
+ 0.43260180950164795
500
+ ],
501
+ "min": [
502
+ -1.0183025598526,
503
+ -0.9800000190734863,
504
+ -0.9774575233459473,
505
+ 0.0,
506
+ 0.0,
507
+ -0.34607142210006714,
508
+ 0.0
509
+ ],
510
+ "q01": [
511
+ -0.780905865430832,
512
+ -0.5667179036140442,
513
+ -0.5254343223571777,
514
+ 0.0,
515
+ 0.0,
516
+ -0.28495091378688814,
517
+ 0.0
518
+ ],
519
+ "q99": [
520
+ 0.9569637751579284,
521
+ 0.6971374487876891,
522
+ 0.8124888157844541,
523
+ 0.0,
524
+ 0.0,
525
+ 0.1971428543329239,
526
+ 1.0
527
+ ],
528
+ "std": [
529
+ 0.3906330168247223,
530
+ 0.2998153865337372,
531
+ 0.2782270312309265,
532
+ 0.0,
533
+ 0.0,
534
+ 0.08120641857385635,
535
+ 0.49528202414512634
536
+ ]
537
+ },
538
+ "num_trajectories": 559,
539
+ "num_transitions": 279939,
540
+ "proprio": {
541
+ "max": [
542
+ 0.0,
543
+ 0.0,
544
+ 0.0,
545
+ 0.0,
546
+ 0.0,
547
+ 0.0,
548
+ 0.0
549
+ ],
550
+ "mean": [
551
+ 0.0,
552
+ 0.0,
553
+ 0.0,
554
+ 0.0,
555
+ 0.0,
556
+ 0.0,
557
+ 0.0
558
+ ],
559
+ "min": [
560
+ 0.0,
561
+ 0.0,
562
+ 0.0,
563
+ 0.0,
564
+ 0.0,
565
+ 0.0,
566
+ 0.0
567
+ ],
568
+ "q01": [
569
+ 0.0,
570
+ 0.0,
571
+ 0.0,
572
+ 0.0,
573
+ 0.0,
574
+ 0.0,
575
+ 0.0
576
+ ],
577
+ "q99": [
578
+ 0.0,
579
+ 0.0,
580
+ 0.0,
581
+ 0.0,
582
+ 0.0,
583
+ 0.0,
584
+ 0.0
585
+ ],
586
+ "std": [
587
+ 0.0,
588
+ 0.0,
589
+ 0.0,
590
+ 0.0,
591
+ 0.0,
592
+ 0.0,
593
+ 0.0
594
+ ]
595
+ }
596
+ },
597
+ "bc_z/0.1.0": {
598
+ "action": {
599
+ "mask": [
600
+ true,
601
+ true,
602
+ true,
603
+ true,
604
+ true,
605
+ true,
606
+ false
607
+ ],
608
+ "max": [
609
+ 0.2165454924106598,
610
+ 0.1251407265663147,
611
+ 0.10772687941789627,
612
+ 0.33544227480888367,
613
+ 0.28117990493774414,
614
+ 0.40614867210388184,
615
+ 1.0
616
+ ],
617
+ "mean": [
618
+ -0.009958645328879356,
619
+ 0.0008958434336818755,
620
+ 0.00499522453173995,
621
+ 0.000297540333122015,
622
+ -0.008734511211514473,
623
+ -0.03068969026207924,
624
+ 0.8344562649726868
625
+ ],
626
+ "min": [
627
+ -0.1677047461271286,
628
+ -0.14630407094955444,
629
+ -0.10066790133714676,
630
+ -0.29421567916870117,
631
+ -0.32101404666900635,
632
+ -0.4635624885559082,
633
+ 0.0
634
+ ],
635
+ "q01": [
636
+ -0.09220654994249344,
637
+ -0.06456145539879798,
638
+ -0.049121275544166565,
639
+ -0.11594625547528267,
640
+ -0.14152548640966414,
641
+ -0.2251061636209488,
642
+ 0.0
643
+ ],
644
+ "q99": [
645
+ 0.07628866866230968,
646
+ 0.058019736707210584,
647
+ 0.052540797740221024,
648
+ 0.11740604028105736,
649
+ 0.11703975558280955,
650
+ 0.16729306846857078,
651
+ 1.0
652
+ ],
653
+ "std": [
654
+ 0.030533093959093094,
655
+ 0.0231416504830122,
656
+ 0.020642085000872612,
657
+ 0.04156165570020676,
658
+ 0.04643021523952484,
659
+ 0.07697845250368118,
660
+ 0.36111101508140564
661
+ ]
662
+ },
663
+ "num_trajectories": 43264,
664
+ "num_transitions": 6015535,
665
+ "proprio": {
666
+ "max": [
667
+ 0.0,
668
+ 0.0,
669
+ 0.0,
670
+ 0.0,
671
+ 0.0,
672
+ 0.0,
673
+ 0.0
674
+ ],
675
+ "mean": [
676
+ 0.0,
677
+ 0.0,
678
+ 0.0,
679
+ 0.0,
680
+ 0.0,
681
+ 0.0,
682
+ 0.0
683
+ ],
684
+ "min": [
685
+ 0.0,
686
+ 0.0,
687
+ 0.0,
688
+ 0.0,
689
+ 0.0,
690
+ 0.0,
691
+ 0.0
692
+ ],
693
+ "q01": [
694
+ 0.0,
695
+ 0.0,
696
+ 0.0,
697
+ 0.0,
698
+ 0.0,
699
+ 0.0,
700
+ 0.0
701
+ ],
702
+ "q99": [
703
+ 0.0,
704
+ 0.0,
705
+ 0.0,
706
+ 0.0,
707
+ 0.0,
708
+ 0.0,
709
+ 0.0
710
+ ],
711
+ "std": [
712
+ 0.0,
713
+ 0.0,
714
+ 0.0,
715
+ 0.0,
716
+ 0.0,
717
+ 0.0,
718
+ 0.0
719
+ ]
720
+ }
721
+ },
722
+ "berkeley_autolab_ur5/0.1.0": {
723
+ "action": {
724
+ "mask": [
725
+ true,
726
+ true,
727
+ true,
728
+ true,
729
+ true,
730
+ true,
731
+ false
732
+ ],
733
+ "max": [
734
+ 0.019999999552965164,
735
+ 0.019999999552965164,
736
+ 0.019999999552965164,
737
+ 0.06666667014360428,
738
+ 0.06666667014360428,
739
+ 0.06666667014360428,
740
+ 1.0
741
+ ],
742
+ "mean": [
743
+ 0.0005683613708242774,
744
+ 0.0012176961172372103,
745
+ -0.0005296385497786105,
746
+ 0.00021029777417425066,
747
+ 6.069485243642703e-05,
748
+ 0.0012049867073073983,
749
+ 0.6298308372497559
750
+ ],
751
+ "min": [
752
+ -0.019999999552965164,
753
+ -0.019999999552965164,
754
+ -0.019999999552965164,
755
+ -0.06666667014360428,
756
+ -0.06666667014360428,
757
+ -0.06666667014360428,
758
+ 0.0
759
+ ],
760
+ "q01": [
761
+ -0.019999999552965164,
762
+ -0.019999999552965164,
763
+ -0.019999999552965164,
764
+ -0.02628571353852749,
765
+ -0.06666667014360428,
766
+ -0.03847619146108627,
767
+ 0.0
768
+ ],
769
+ "q99": [
770
+ 0.019999999552965164,
771
+ 0.019999999552965164,
772
+ 0.019999999552965164,
773
+ 0.031809523701667786,
774
+ 0.06666667014360428,
775
+ 0.036571428179740906,
776
+ 1.0
777
+ ],
778
+ "std": [
779
+ 0.011533073149621487,
780
+ 0.007990497164428234,
781
+ 0.009577799588441849,
782
+ 0.009432999417185783,
783
+ 0.016427574679255486,
784
+ 0.011054049246013165,
785
+ 0.482679545879364
786
+ ]
787
+ },
788
+ "num_trajectories": 1000,
789
+ "num_transitions": 97939,
790
+ "proprio": {
791
+ "max": [
792
+ 0.0,
793
+ 0.0,
794
+ 0.0,
795
+ 0.0,
796
+ 0.0,
797
+ 0.0,
798
+ 0.0
799
+ ],
800
+ "mean": [
801
+ 0.0,
802
+ 0.0,
803
+ 0.0,
804
+ 0.0,
805
+ 0.0,
806
+ 0.0,
807
+ 0.0
808
+ ],
809
+ "min": [
810
+ 0.0,
811
+ 0.0,
812
+ 0.0,
813
+ 0.0,
814
+ 0.0,
815
+ 0.0,
816
+ 0.0
817
+ ],
818
+ "q01": [
819
+ 0.0,
820
+ 0.0,
821
+ 0.0,
822
+ 0.0,
823
+ 0.0,
824
+ 0.0,
825
+ 0.0
826
+ ],
827
+ "q99": [
828
+ 0.0,
829
+ 0.0,
830
+ 0.0,
831
+ 0.0,
832
+ 0.0,
833
+ 0.0,
834
+ 0.0
835
+ ],
836
+ "std": [
837
+ 0.0,
838
+ 0.0,
839
+ 0.0,
840
+ 0.0,
841
+ 0.0,
842
+ 0.0,
843
+ 0.0
844
+ ]
845
+ }
846
+ },
847
+ "berkeley_cable_routing/0.1.0": {
848
+ "action": {
849
+ "mask": [
850
+ true,
851
+ true,
852
+ true,
853
+ true,
854
+ true,
855
+ true,
856
+ false
857
+ ],
858
+ "max": [
859
+ 0.9633283019065857,
860
+ 1.0,
861
+ 1.0,
862
+ 0.0,
863
+ 0.0,
864
+ 1.0,
865
+ 0.0
866
+ ],
867
+ "mean": [
868
+ -0.07139858603477478,
869
+ 0.023608991876244545,
870
+ 0.10241956263780594,
871
+ 0.0,
872
+ 0.0,
873
+ 0.04967105761170387,
874
+ 0.0
875
+ ],
876
+ "min": [
877
+ -0.9809081554412842,
878
+ -0.9554349184036255,
879
+ -0.9994775056838989,
880
+ 0.0,
881
+ 0.0,
882
+ -1.0,
883
+ 0.0
884
+ ],
885
+ "q01": [
886
+ -0.5534318816661835,
887
+ -0.4797285574674606,
888
+ -0.5314934802055359,
889
+ 0.0,
890
+ 0.0,
891
+ -0.8855219376087189,
892
+ 0.0
893
+ ],
894
+ "q99": [
895
+ 0.42652835428714786,
896
+ 0.5000944086909298,
897
+ 0.639823433756829,
898
+ 0.0,
899
+ 0.0,
900
+ 0.984243879914284,
901
+ 0.0
902
+ ],
903
+ "std": [
904
+ 0.18155010044574738,
905
+ 0.18109896779060364,
906
+ 0.21220752596855164,
907
+ 0.0,
908
+ 0.0,
909
+ 0.3475516438484192,
910
+ 0.0
911
+ ]
912
+ },
913
+ "num_trajectories": 1647,
914
+ "num_transitions": 42328,
915
+ "proprio": {
916
+ "max": [
917
+ 0.0,
918
+ 0.0,
919
+ 0.0,
920
+ 0.0,
921
+ 0.0,
922
+ 0.0,
923
+ 0.0
924
+ ],
925
+ "mean": [
926
+ 0.0,
927
+ 0.0,
928
+ 0.0,
929
+ 0.0,
930
+ 0.0,
931
+ 0.0,
932
+ 0.0
933
+ ],
934
+ "min": [
935
+ 0.0,
936
+ 0.0,
937
+ 0.0,
938
+ 0.0,
939
+ 0.0,
940
+ 0.0,
941
+ 0.0
942
+ ],
943
+ "q01": [
944
+ 0.0,
945
+ 0.0,
946
+ 0.0,
947
+ 0.0,
948
+ 0.0,
949
+ 0.0,
950
+ 0.0
951
+ ],
952
+ "q99": [
953
+ 0.0,
954
+ 0.0,
955
+ 0.0,
956
+ 0.0,
957
+ 0.0,
958
+ 0.0,
959
+ 0.0
960
+ ],
961
+ "std": [
962
+ 0.0,
963
+ 0.0,
964
+ 0.0,
965
+ 0.0,
966
+ 0.0,
967
+ 0.0,
968
+ 0.0
969
+ ]
970
+ }
971
+ },
972
+ "berkeley_fanuc_manipulation/0.1.0": {
973
+ "action": {
974
+ "mask": [
975
+ true,
976
+ true,
977
+ true,
978
+ true,
979
+ true,
980
+ true,
981
+ false
982
+ ],
983
+ "max": [
984
+ 0.009999999776482582,
985
+ 0.009999999776482582,
986
+ 0.009999999776482582,
987
+ 0.03490658476948738,
988
+ 0.03490658476948738,
989
+ 0.03490658476948738,
990
+ 1.0
991
+ ],
992
+ "mean": [
993
+ 0.0007744057802483439,
994
+ -0.00031240080716088414,
995
+ -0.0015001941937953234,
996
+ -0.0007515158504247665,
997
+ -0.00015832878125365824,
998
+ 0.00014327642566058785,
999
+ 0.699295699596405
1000
+ ],
1001
+ "min": [
1002
+ -0.009999999776482582,
1003
+ -0.009999999776482582,
1004
+ -0.009999999776482582,
1005
+ -0.03490658476948738,
1006
+ -0.03490658476948738,
1007
+ -0.03490658476948738,
1008
+ 0.0
1009
+ ],
1010
+ "q01": [
1011
+ -0.009999999776482582,
1012
+ -0.009999999776482582,
1013
+ -0.009999999776482582,
1014
+ -0.03490658476948738,
1015
+ 0.0,
1016
+ -0.03490658476948738,
1017
+ 0.0
1018
+ ],
1019
+ "q99": [
1020
+ 0.009999999776482582,
1021
+ 0.009999999776482582,
1022
+ 0.009999999776482582,
1023
+ 0.03490658476948738,
1024
+ 0.0,
1025
+ 0.03490658476948738,
1026
+ 1.0
1027
+ ],
1028
+ "std": [
1029
+ 0.0034070133697241545,
1030
+ 0.00499219074845314,
1031
+ 0.005344326142221689,
1032
+ 0.007599010597914457,
1033
+ 0.004081932827830315,
1034
+ 0.008568963967263699,
1035
+ 0.45868709683418274
1036
+ ]
1037
+ },
1038
+ "num_trajectories": 415,
1039
+ "num_transitions": 62613,
1040
+ "proprio": {
1041
+ "max": [
1042
+ 0.0,
1043
+ 0.0,
1044
+ 0.0,
1045
+ 0.0,
1046
+ 0.0,
1047
+ 0.0,
1048
+ 0.0
1049
+ ],
1050
+ "mean": [
1051
+ 0.0,
1052
+ 0.0,
1053
+ 0.0,
1054
+ 0.0,
1055
+ 0.0,
1056
+ 0.0,
1057
+ 0.0
1058
+ ],
1059
+ "min": [
1060
+ 0.0,
1061
+ 0.0,
1062
+ 0.0,
1063
+ 0.0,
1064
+ 0.0,
1065
+ 0.0,
1066
+ 0.0
1067
+ ],
1068
+ "q01": [
1069
+ 0.0,
1070
+ 0.0,
1071
+ 0.0,
1072
+ 0.0,
1073
+ 0.0,
1074
+ 0.0,
1075
+ 0.0
1076
+ ],
1077
+ "q99": [
1078
+ 0.0,
1079
+ 0.0,
1080
+ 0.0,
1081
+ 0.0,
1082
+ 0.0,
1083
+ 0.0,
1084
+ 0.0
1085
+ ],
1086
+ "std": [
1087
+ 0.0,
1088
+ 0.0,
1089
+ 0.0,
1090
+ 0.0,
1091
+ 0.0,
1092
+ 0.0,
1093
+ 0.0
1094
+ ]
1095
+ }
1096
+ },
1097
+ "bridge_orig/1.0.0": {
1098
+ "action": {
1099
+ "mask": [
1100
+ true,
1101
+ true,
1102
+ true,
1103
+ true,
1104
+ true,
1105
+ true,
1106
+ false
1107
+ ],
1108
+ "max": [
1109
+ 0.41691166162490845,
1110
+ 0.25864794850349426,
1111
+ 0.21218234300613403,
1112
+ 3.122201919555664,
1113
+ 1.8618112802505493,
1114
+ 6.280478477478027,
1115
+ 1.0
1116
+ ],
1117
+ "mean": [
1118
+ 0.00023341714404523373,
1119
+ 0.00013004327774979174,
1120
+ -0.00012762591359205544,
1121
+ -0.0001556579809403047,
1122
+ -0.00040393328526988626,
1123
+ 0.00023558337124995887,
1124
+ 0.5764582753181458
1125
+ ],
1126
+ "min": [
1127
+ -0.4007510244846344,
1128
+ -0.13874775171279907,
1129
+ -0.22553899884223938,
1130
+ -3.2010786533355713,
1131
+ -1.8618112802505493,
1132
+ -6.279075622558594,
1133
+ 0.0
1134
+ ],
1135
+ "q01": [
1136
+ -0.02872725307941437,
1137
+ -0.04170349963009357,
1138
+ -0.026093858778476715,
1139
+ -0.08092105075716972,
1140
+ -0.09288699507713317,
1141
+ -0.20718276381492615,
1142
+ 0.0
1143
+ ],
1144
+ "q99": [
1145
+ 0.028309678435325586,
1146
+ 0.040855254605412394,
1147
+ 0.040161586627364146,
1148
+ 0.08192047759890528,
1149
+ 0.07792850524187081,
1150
+ 0.20382574498653397,
1151
+ 1.0
1152
+ ],
1153
+ "std": [
1154
+ 0.009765734896063805,
1155
+ 0.013689505867660046,
1156
+ 0.012667152099311352,
1157
+ 0.028534479439258575,
1158
+ 0.03063790127635002,
1159
+ 0.07691770792007446,
1160
+ 0.4973658621311188
1161
+ ]
1162
+ },
1163
+ "num_trajectories": 60064,
1164
+ "num_transitions": 2135463,
1165
+ "proprio": {
1166
+ "max": [
1167
+ 0.0,
1168
+ 0.0,
1169
+ 0.0,
1170
+ 0.0,
1171
+ 0.0,
1172
+ 0.0,
1173
+ 0.0
1174
+ ],
1175
+ "mean": [
1176
+ 0.0,
1177
+ 0.0,
1178
+ 0.0,
1179
+ 0.0,
1180
+ 0.0,
1181
+ 0.0,
1182
+ 0.0
1183
+ ],
1184
+ "min": [
1185
+ 0.0,
1186
+ 0.0,
1187
+ 0.0,
1188
+ 0.0,
1189
+ 0.0,
1190
+ 0.0,
1191
+ 0.0
1192
+ ],
1193
+ "q01": [
1194
+ 0.0,
1195
+ 0.0,
1196
+ 0.0,
1197
+ 0.0,
1198
+ 0.0,
1199
+ 0.0,
1200
+ 0.0
1201
+ ],
1202
+ "q99": [
1203
+ 0.0,
1204
+ 0.0,
1205
+ 0.0,
1206
+ 0.0,
1207
+ 0.0,
1208
+ 0.0,
1209
+ 0.0
1210
+ ],
1211
+ "std": [
1212
+ 0.0,
1213
+ 0.0,
1214
+ 0.0,
1215
+ 0.0,
1216
+ 0.0,
1217
+ 0.0,
1218
+ 0.0
1219
+ ]
1220
+ }
1221
+ },
1222
+ "cmu_stretch/0.1.0": {
1223
+ "action": {
1224
+ "mask": [
1225
+ true,
1226
+ true,
1227
+ true,
1228
+ true,
1229
+ true,
1230
+ true,
1231
+ false
1232
+ ],
1233
+ "max": [
1234
+ 0.02338407188653946,
1235
+ 0.0,
1236
+ 0.023404927924275398,
1237
+ 0.0,
1238
+ 0.0,
1239
+ 0.0,
1240
+ 1.0
1241
+ ],
1242
+ "mean": [
1243
+ 0.0003630445571616292,
1244
+ 0.0,
1245
+ 0.0016466928645968437,
1246
+ 0.0,
1247
+ 0.0,
1248
+ 0.0,
1249
+ 0.3987048268318176
1250
+ ],
1251
+ "min": [
1252
+ -0.019353797659277916,
1253
+ 0.0,
1254
+ -0.02019215188920498,
1255
+ 0.0,
1256
+ 0.0,
1257
+ 0.0,
1258
+ 0.0
1259
+ ],
1260
+ "q01": [
1261
+ -0.011175686959177256,
1262
+ 0.0,
1263
+ -0.0032206363626755773,
1264
+ 0.0,
1265
+ 0.0,
1266
+ 0.0,
1267
+ 0.0
1268
+ ],
1269
+ "q99": [
1270
+ 0.014501785952597848,
1271
+ 0.0,
1272
+ 0.015056106168776728,
1273
+ 0.0,
1274
+ 0.0,
1275
+ 0.0,
1276
+ 1.0
1277
+ ],
1278
+ "std": [
1279
+ 0.004081855062395334,
1280
+ 0.0,
1281
+ 0.003774340031668544,
1282
+ 0.0,
1283
+ 0.0,
1284
+ 0.0,
1285
+ 0.489638090133667
1286
+ ]
1287
+ },
1288
+ "num_trajectories": 135,
1289
+ "num_transitions": 25016,
1290
+ "proprio": {
1291
+ "max": [
1292
+ 0.0,
1293
+ 0.0,
1294
+ 0.0,
1295
+ 0.0,
1296
+ 0.0,
1297
+ 0.0,
1298
+ 0.0
1299
+ ],
1300
+ "mean": [
1301
+ 0.0,
1302
+ 0.0,
1303
+ 0.0,
1304
+ 0.0,
1305
+ 0.0,
1306
+ 0.0,
1307
+ 0.0
1308
+ ],
1309
+ "min": [
1310
+ 0.0,
1311
+ 0.0,
1312
+ 0.0,
1313
+ 0.0,
1314
+ 0.0,
1315
+ 0.0,
1316
+ 0.0
1317
+ ],
1318
+ "q01": [
1319
+ 0.0,
1320
+ 0.0,
1321
+ 0.0,
1322
+ 0.0,
1323
+ 0.0,
1324
+ 0.0,
1325
+ 0.0
1326
+ ],
1327
+ "q99": [
1328
+ 0.0,
1329
+ 0.0,
1330
+ 0.0,
1331
+ 0.0,
1332
+ 0.0,
1333
+ 0.0,
1334
+ 0.0
1335
+ ],
1336
+ "std": [
1337
+ 0.0,
1338
+ 0.0,
1339
+ 0.0,
1340
+ 0.0,
1341
+ 0.0,
1342
+ 0.0,
1343
+ 0.0
1344
+ ]
1345
+ }
1346
+ },
1347
+ "dlr_edan_shared_control_converted_externally_to_rlds/0.1.0": {
1348
+ "action": {
1349
+ "mask": [
1350
+ true,
1351
+ true,
1352
+ true,
1353
+ true,
1354
+ true,
1355
+ true,
1356
+ false
1357
+ ],
1358
+ "max": [
1359
+ 0.18991442024707794,
1360
+ 0.0739002525806427,
1361
+ 0.18064819276332855,
1362
+ 0.0866486132144928,
1363
+ 0.13464981317520142,
1364
+ 0.16910280287265778,
1365
+ 1.0
1366
+ ],
1367
+ "mean": [
1368
+ 0.0066478196531534195,
1369
+ -0.0007657355745323002,
1370
+ 0.006522845011204481,
1371
+ 0.0011679773451760411,
1372
+ -0.006395624950528145,
1373
+ -0.011903021484613419,
1374
+ 0.6985887289047241
1375
+ ],
1376
+ "min": [
1377
+ -0.10054297000169754,
1378
+ -0.08427435159683228,
1379
+ -0.13533438742160797,
1380
+ -0.17556548118591309,
1381
+ -0.18485672771930695,
1382
+ -0.2680685818195343,
1383
+ 0.0
1384
+ ],
1385
+ "q01": [
1386
+ -0.02987122368067503,
1387
+ -0.06013262912631035,
1388
+ -0.08286409199237824,
1389
+ -0.05924444157630205,
1390
+ -0.15986866518855095,
1391
+ -0.15636983573436739,
1392
+ 0.0
1393
+ ],
1394
+ "q99": [
1395
+ 0.08832092039287087,
1396
+ 0.042126184627413736,
1397
+ 0.11311905644834042,
1398
+ 0.0643695573508739,
1399
+ 0.03941855944693088,
1400
+ 0.156646853685379,
1401
+ 1.0
1402
+ ],
1403
+ "std": [
1404
+ 0.021393585950136185,
1405
+ 0.018142299726605415,
1406
+ 0.03374377265572548,
1407
+ 0.01743541844189167,
1408
+ 0.03394372761249542,
1409
+ 0.04641878604888916,
1410
+ 0.45885783433914185
1411
+ ]
1412
+ },
1413
+ "num_trajectories": 104,
1414
+ "num_transitions": 8928,
1415
+ "proprio": {
1416
+ "max": [
1417
+ 0.0,
1418
+ 0.0,
1419
+ 0.0,
1420
+ 0.0,
1421
+ 0.0,
1422
+ 0.0,
1423
+ 0.0
1424
+ ],
1425
+ "mean": [
1426
+ 0.0,
1427
+ 0.0,
1428
+ 0.0,
1429
+ 0.0,
1430
+ 0.0,
1431
+ 0.0,
1432
+ 0.0
1433
+ ],
1434
+ "min": [
1435
+ 0.0,
1436
+ 0.0,
1437
+ 0.0,
1438
+ 0.0,
1439
+ 0.0,
1440
+ 0.0,
1441
+ 0.0
1442
+ ],
1443
+ "q01": [
1444
+ 0.0,
1445
+ 0.0,
1446
+ 0.0,
1447
+ 0.0,
1448
+ 0.0,
1449
+ 0.0,
1450
+ 0.0
1451
+ ],
1452
+ "q99": [
1453
+ 0.0,
1454
+ 0.0,
1455
+ 0.0,
1456
+ 0.0,
1457
+ 0.0,
1458
+ 0.0,
1459
+ 0.0
1460
+ ],
1461
+ "std": [
1462
+ 0.0,
1463
+ 0.0,
1464
+ 0.0,
1465
+ 0.0,
1466
+ 0.0,
1467
+ 0.0,
1468
+ 0.0
1469
+ ]
1470
+ }
1471
+ },
1472
+ "dobbe/0.0.1": {
1473
+ "action": {
1474
+ "mask": [
1475
+ true,
1476
+ true,
1477
+ true,
1478
+ true,
1479
+ true,
1480
+ true,
1481
+ false
1482
+ ],
1483
+ "max": [
1484
+ 38.590423583984375,
1485
+ 17.932697296142578,
1486
+ 4.843764305114746,
1487
+ 1.4372116327285767,
1488
+ 0.4340403974056244,
1489
+ 1.2057193517684937,
1490
+ 0.9998947381973267
1491
+ ],
1492
+ "mean": [
1493
+ -0.00011206958151888102,
1494
+ 0.0011229681549593806,
1495
+ -0.00010193959315074608,
1496
+ -7.37128357286565e-05,
1497
+ -0.0006753374473191798,
1498
+ -5.664441778208129e-05,
1499
+ 0.6318688988685608
1500
+ ],
1501
+ "min": [
1502
+ -5.700923442840576,
1503
+ -21.605947494506836,
1504
+ -123.72489929199219,
1505
+ -1.7229845523834229,
1506
+ -0.4998578727245331,
1507
+ -0.8867913484573364,
1508
+ 1.4196479014572105e-06
1509
+ ],
1510
+ "q01": [
1511
+ -0.01119564864784479,
1512
+ -0.014266146533191203,
1513
+ -0.0071747214533388615,
1514
+ -0.009444301575422287,
1515
+ -0.03990109823644161,
1516
+ -0.017422311007976532,
1517
+ 4.003279136668425e-05
1518
+ ],
1519
+ "q99": [
1520
+ 0.01015154086053368,
1521
+ 0.017181577533483497,
1522
+ 0.007216989761218411,
1523
+ 0.010380979906767595,
1524
+ 0.03556173853576176,
1525
+ 0.018032474815845446,
1526
+ 0.9982578039169312
1527
+ ],
1528
+ "std": [
1529
+ 0.042660679668188095,
1530
+ 0.04428431764245033,
1531
+ 0.12224890291690826,
1532
+ 0.005388470832258463,
1533
+ 0.011246936395764351,
1534
+ 0.006288259290158749,
1535
+ 0.3973240256309509
1536
+ ]
1537
+ },
1538
+ "num_trajectories": 5208,
1539
+ "num_transitions": 1139911,
1540
+ "proprio": {
1541
+ "max": [
1542
+ 0.0,
1543
+ 0.0,
1544
+ 0.0,
1545
+ 0.0,
1546
+ 0.0,
1547
+ 0.0,
1548
+ 0.0
1549
+ ],
1550
+ "mean": [
1551
+ 0.0,
1552
+ 0.0,
1553
+ 0.0,
1554
+ 0.0,
1555
+ 0.0,
1556
+ 0.0,
1557
+ 0.0
1558
+ ],
1559
+ "min": [
1560
+ 0.0,
1561
+ 0.0,
1562
+ 0.0,
1563
+ 0.0,
1564
+ 0.0,
1565
+ 0.0,
1566
+ 0.0
1567
+ ],
1568
+ "q01": [
1569
+ 0.0,
1570
+ 0.0,
1571
+ 0.0,
1572
+ 0.0,
1573
+ 0.0,
1574
+ 0.0,
1575
+ 0.0
1576
+ ],
1577
+ "q99": [
1578
+ 0.0,
1579
+ 0.0,
1580
+ 0.0,
1581
+ 0.0,
1582
+ 0.0,
1583
+ 0.0,
1584
+ 0.0
1585
+ ],
1586
+ "std": [
1587
+ 0.0,
1588
+ 0.0,
1589
+ 0.0,
1590
+ 0.0,
1591
+ 0.0,
1592
+ 0.0,
1593
+ 0.0
1594
+ ]
1595
+ }
1596
+ },
1597
+ "droid/1.0.0": {
1598
+ "action": {
1599
+ "mask": [
1600
+ true,
1601
+ true,
1602
+ true,
1603
+ true,
1604
+ true,
1605
+ true,
1606
+ false
1607
+ ],
1608
+ "max": [
1609
+ 0.9999998211860657,
1610
+ 0.999991774559021,
1611
+ 0.9999973177909851,
1612
+ 0.9999874830245972,
1613
+ 0.9999954104423523,
1614
+ 0.9999998807907104,
1615
+ 1.0
1616
+ ],
1617
+ "mean": [
1618
+ 0.027425529435276985,
1619
+ -0.0026820411439985037,
1620
+ 0.01595238223671913,
1621
+ 0.0035501928068697453,
1622
+ -0.030532635748386383,
1623
+ -0.006685464642941952,
1624
+ 0.5860344171524048
1625
+ ],
1626
+ "min": [
1627
+ -0.9999999403953552,
1628
+ -0.9999951124191284,
1629
+ -0.9999960660934448,
1630
+ -0.9999980330467224,
1631
+ -0.9999982118606567,
1632
+ -0.9999998807907104,
1633
+ 0.0
1634
+ ],
1635
+ "q01": [
1636
+ -0.7776297926902771,
1637
+ -0.5803514122962952,
1638
+ -0.5795090794563293,
1639
+ -0.6464047729969025,
1640
+ -0.7041108310222626,
1641
+ -0.8895104378461838,
1642
+ 0.0
1643
+ ],
1644
+ "q99": [
1645
+ 0.7597932070493698,
1646
+ 0.5726242214441299,
1647
+ 0.7351000607013702,
1648
+ 0.6705610305070877,
1649
+ 0.6464948207139969,
1650
+ 0.8897542208433151,
1651
+ 1.0
1652
+ ],
1653
+ "std": [
1654
+ 0.25387412309646606,
1655
+ 0.18426834046840668,
1656
+ 0.22532416880130768,
1657
+ 0.21757009625434875,
1658
+ 0.22572560608386993,
1659
+ 0.2867794930934906,
1660
+ 0.4287726879119873
1661
+ ]
1662
+ },
1663
+ "num_trajectories": 92233,
1664
+ "num_transitions": 27044326,
1665
+ "proprio": {
1666
+ "max": [
1667
+ 0.0,
1668
+ 0.0,
1669
+ 0.0,
1670
+ 0.0,
1671
+ 0.0,
1672
+ 0.0,
1673
+ 0.0
1674
+ ],
1675
+ "mean": [
1676
+ 0.0,
1677
+ 0.0,
1678
+ 0.0,
1679
+ 0.0,
1680
+ 0.0,
1681
+ 0.0,
1682
+ 0.0
1683
+ ],
1684
+ "min": [
1685
+ 0.0,
1686
+ 0.0,
1687
+ 0.0,
1688
+ 0.0,
1689
+ 0.0,
1690
+ 0.0,
1691
+ 0.0
1692
+ ],
1693
+ "q01": [
1694
+ 0.0,
1695
+ 0.0,
1696
+ 0.0,
1697
+ 0.0,
1698
+ 0.0,
1699
+ 0.0,
1700
+ 0.0
1701
+ ],
1702
+ "q99": [
1703
+ 0.0,
1704
+ 0.0,
1705
+ 0.0,
1706
+ 0.0,
1707
+ 0.0,
1708
+ 0.0,
1709
+ 0.0
1710
+ ],
1711
+ "std": [
1712
+ 0.0,
1713
+ 0.0,
1714
+ 0.0,
1715
+ 0.0,
1716
+ 0.0,
1717
+ 0.0,
1718
+ 0.0
1719
+ ]
1720
+ }
1721
+ },
1722
+ "fmb_dataset/1.0.0": {
1723
+ "action": {
1724
+ "mask": [
1725
+ true,
1726
+ true,
1727
+ true,
1728
+ true,
1729
+ true,
1730
+ true,
1731
+ false
1732
+ ],
1733
+ "max": [
1734
+ 1.399999976158142,
1735
+ 1.0,
1736
+ 1.399999976158142,
1737
+ 1.0,
1738
+ 1.0,
1739
+ 1.0,
1740
+ 1.0
1741
+ ],
1742
+ "mean": [
1743
+ 0.05902976542711258,
1744
+ -0.06476633995771408,
1745
+ -0.09787469357252121,
1746
+ 0.004325387068092823,
1747
+ 0.00028963759541511536,
1748
+ -0.04457257315516472,
1749
+ 0.7336440086364746
1750
+ ],
1751
+ "min": [
1752
+ -1.399999976158142,
1753
+ -1.399999976158142,
1754
+ -1.0,
1755
+ -1.0,
1756
+ -1.0,
1757
+ -1.0,
1758
+ 0.0
1759
+ ],
1760
+ "q01": [
1761
+ -0.8257142901420593,
1762
+ -1.399999976158142,
1763
+ -1.0,
1764
+ -1.0,
1765
+ -0.3028571307659149,
1766
+ -1.0,
1767
+ 0.0
1768
+ ],
1769
+ "q99": [
1770
+ 1.0,
1771
+ 0.5257142782211304,
1772
+ 1.0,
1773
+ 1.0,
1774
+ 0.3400000035762787,
1775
+ 1.0,
1776
+ 1.0
1777
+ ],
1778
+ "std": [
1779
+ 0.28809186816215515,
1780
+ 0.2820416986942291,
1781
+ 0.4626740515232086,
1782
+ 0.3266514539718628,
1783
+ 0.10842999070882797,
1784
+ 0.34400978684425354,
1785
+ 0.4435289800167084
1786
+ ]
1787
+ },
1788
+ "num_trajectories": 8612,
1789
+ "num_transitions": 1137459,
1790
+ "proprio": {
1791
+ "max": [
1792
+ 0.0,
1793
+ 0.0,
1794
+ 0.0,
1795
+ 0.0,
1796
+ 0.0,
1797
+ 0.0,
1798
+ 0.0
1799
+ ],
1800
+ "mean": [
1801
+ 0.0,
1802
+ 0.0,
1803
+ 0.0,
1804
+ 0.0,
1805
+ 0.0,
1806
+ 0.0,
1807
+ 0.0
1808
+ ],
1809
+ "min": [
1810
+ 0.0,
1811
+ 0.0,
1812
+ 0.0,
1813
+ 0.0,
1814
+ 0.0,
1815
+ 0.0,
1816
+ 0.0
1817
+ ],
1818
+ "q01": [
1819
+ 0.0,
1820
+ 0.0,
1821
+ 0.0,
1822
+ 0.0,
1823
+ 0.0,
1824
+ 0.0,
1825
+ 0.0
1826
+ ],
1827
+ "q99": [
1828
+ 0.0,
1829
+ 0.0,
1830
+ 0.0,
1831
+ 0.0,
1832
+ 0.0,
1833
+ 0.0,
1834
+ 0.0
1835
+ ],
1836
+ "std": [
1837
+ 0.0,
1838
+ 0.0,
1839
+ 0.0,
1840
+ 0.0,
1841
+ 0.0,
1842
+ 0.0,
1843
+ 0.0
1844
+ ]
1845
+ }
1846
+ },
1847
+ "fractal20220817_data/0.1.0": {
1848
+ "action": {
1849
+ "mask": [
1850
+ true,
1851
+ true,
1852
+ true,
1853
+ true,
1854
+ true,
1855
+ true,
1856
+ false
1857
+ ],
1858
+ "max": [
1859
+ 2.9984593391418457,
1860
+ 22.09052848815918,
1861
+ 2.7507524490356445,
1862
+ 1.570636510848999,
1863
+ 1.5321086645126343,
1864
+ 1.5691522359848022,
1865
+ 1.0
1866
+ ],
1867
+ "mean": [
1868
+ 0.006987507455050945,
1869
+ 0.006265853065997362,
1870
+ -0.012625162489712238,
1871
+ 0.04333285242319107,
1872
+ -0.005756276659667492,
1873
+ 0.0009130403632298112,
1874
+ 0.5354204773902893
1875
+ ],
1876
+ "min": [
1877
+ -2.0204520225524902,
1878
+ -5.497899532318115,
1879
+ -2.031663417816162,
1880
+ -1.569917917251587,
1881
+ -1.569892168045044,
1882
+ -1.570419430732727,
1883
+ 0.0
1884
+ ],
1885
+ "q01": [
1886
+ -0.22453527510166169,
1887
+ -0.14820013284683228,
1888
+ -0.231589707583189,
1889
+ -0.3517994859814644,
1890
+ -0.4193011274933815,
1891
+ -0.43643461108207704,
1892
+ 0.0
1893
+ ],
1894
+ "q99": [
1895
+ 0.17824687153100965,
1896
+ 0.14938379630446405,
1897
+ 0.21842354819178575,
1898
+ 0.5892666035890578,
1899
+ 0.35272657424211445,
1900
+ 0.44796681255102094,
1901
+ 1.0
1902
+ ],
1903
+ "std": [
1904
+ 0.06921109557151794,
1905
+ 0.05970889702439308,
1906
+ 0.0735311210155487,
1907
+ 0.1561058759689331,
1908
+ 0.1316441297531128,
1909
+ 0.14593777060508728,
1910
+ 0.49711623787879944
1911
+ ]
1912
+ },
1913
+ "num_trajectories": 87212,
1914
+ "num_transitions": 3786400,
1915
+ "proprio": {
1916
+ "max": [
1917
+ 0.0,
1918
+ 0.0,
1919
+ 0.0,
1920
+ 0.0,
1921
+ 0.0,
1922
+ 0.0,
1923
+ 0.0
1924
+ ],
1925
+ "mean": [
1926
+ 0.0,
1927
+ 0.0,
1928
+ 0.0,
1929
+ 0.0,
1930
+ 0.0,
1931
+ 0.0,
1932
+ 0.0
1933
+ ],
1934
+ "min": [
1935
+ 0.0,
1936
+ 0.0,
1937
+ 0.0,
1938
+ 0.0,
1939
+ 0.0,
1940
+ 0.0,
1941
+ 0.0
1942
+ ],
1943
+ "q01": [
1944
+ 0.0,
1945
+ 0.0,
1946
+ 0.0,
1947
+ 0.0,
1948
+ 0.0,
1949
+ 0.0,
1950
+ 0.0
1951
+ ],
1952
+ "q99": [
1953
+ 0.0,
1954
+ 0.0,
1955
+ 0.0,
1956
+ 0.0,
1957
+ 0.0,
1958
+ 0.0,
1959
+ 0.0
1960
+ ],
1961
+ "std": [
1962
+ 0.0,
1963
+ 0.0,
1964
+ 0.0,
1965
+ 0.0,
1966
+ 0.0,
1967
+ 0.0,
1968
+ 0.0
1969
+ ]
1970
+ }
1971
+ },
1972
+ "furniture_bench_dataset_converted_externally_to_rlds/0.1.0": {
1973
+ "action": {
1974
+ "mask": [
1975
+ true,
1976
+ true,
1977
+ true,
1978
+ true,
1979
+ true,
1980
+ true,
1981
+ false
1982
+ ],
1983
+ "max": [
1984
+ 0.10000000149011612,
1985
+ 0.10000000149011612,
1986
+ 0.10000000149011612,
1987
+ 0.8651833534240723,
1988
+ 1.0909736156463623,
1989
+ 2.863185405731201,
1990
+ 1.0
1991
+ ],
1992
+ "mean": [
1993
+ 0.0001461071806261316,
1994
+ 0.0010830992832779884,
1995
+ 0.0006224963581189513,
1996
+ -0.0033032014034688473,
1997
+ -0.002688060747459531,
1998
+ 0.018242614343762398,
1999
+ 0.48854944109916687
2000
+ ],
2001
+ "min": [
2002
+ -0.10495579987764359,
2003
+ -0.10939455777406693,
2004
+ -0.10000000149011612,
2005
+ -0.971906840801239,
2006
+ -1.0475432872772217,
2007
+ -3.06000018119812,
2008
+ 0.0
2009
+ ],
2010
+ "q01": [
2011
+ -0.053988199681043625,
2012
+ -0.05049169331789017,
2013
+ -0.032499241530895236,
2014
+ -0.1953887003660202,
2015
+ -0.41674559473991396,
2016
+ -0.8886768388748169,
2017
+ 0.0
2018
+ ],
2019
+ "q99": [
2020
+ 0.05414841488003723,
2021
+ 0.04965164884924884,
2022
+ 0.060055799782276154,
2023
+ 0.18231668293476103,
2024
+ 0.39867786407470646,
2025
+ 0.8772023963928218,
2026
+ 1.0
2027
+ ],
2028
+ "std": [
2029
+ 0.016107233241200447,
2030
+ 0.014891570433974266,
2031
+ 0.014014236629009247,
2032
+ 0.05827433615922928,
2033
+ 0.11417083442211151,
2034
+ 0.33479660749435425,
2035
+ 0.4999157190322876
2036
+ ]
2037
+ },
2038
+ "num_trajectories": 5100,
2039
+ "num_transitions": 3948057,
2040
+ "proprio": {
2041
+ "max": [
2042
+ 0.0,
2043
+ 0.0,
2044
+ 0.0,
2045
+ 0.0,
2046
+ 0.0,
2047
+ 0.0,
2048
+ 0.0
2049
+ ],
2050
+ "mean": [
2051
+ 0.0,
2052
+ 0.0,
2053
+ 0.0,
2054
+ 0.0,
2055
+ 0.0,
2056
+ 0.0,
2057
+ 0.0
2058
+ ],
2059
+ "min": [
2060
+ 0.0,
2061
+ 0.0,
2062
+ 0.0,
2063
+ 0.0,
2064
+ 0.0,
2065
+ 0.0,
2066
+ 0.0
2067
+ ],
2068
+ "q01": [
2069
+ 0.0,
2070
+ 0.0,
2071
+ 0.0,
2072
+ 0.0,
2073
+ 0.0,
2074
+ 0.0,
2075
+ 0.0
2076
+ ],
2077
+ "q99": [
2078
+ 0.0,
2079
+ 0.0,
2080
+ 0.0,
2081
+ 0.0,
2082
+ 0.0,
2083
+ 0.0,
2084
+ 0.0
2085
+ ],
2086
+ "std": [
2087
+ 0.0,
2088
+ 0.0,
2089
+ 0.0,
2090
+ 0.0,
2091
+ 0.0,
2092
+ 0.0,
2093
+ 0.0
2094
+ ]
2095
+ }
2096
+ },
2097
+ "iamlab_cmu_pickup_insert_converted_externally_to_rlds/0.1.0": {
2098
+ "action": {
2099
+ "mask": [
2100
+ true,
2101
+ true,
2102
+ true,
2103
+ true,
2104
+ true,
2105
+ true,
2106
+ false
2107
+ ],
2108
+ "max": [
2109
+ 0.6634981632232666,
2110
+ 0.23428471386432648,
2111
+ 0.4308285415172577,
2112
+ 3.1415927410125732,
2113
+ 0.13647015392780304,
2114
+ 3.141592502593994,
2115
+ 1.0
2116
+ ],
2117
+ "mean": [
2118
+ 0.5274373292922974,
2119
+ 0.028582017868757248,
2120
+ 0.18712472915649414,
2121
+ 1.2339569330215454,
2122
+ 0.03226622939109802,
2123
+ -1.4199472665786743,
2124
+ 0.5550631880760193
2125
+ ],
2126
+ "min": [
2127
+ 0.3071657121181488,
2128
+ -0.29754969477653503,
2129
+ 0.06578229367733002,
2130
+ -3.1415927410125732,
2131
+ -0.04584203287959099,
2132
+ -3.141592502593994,
2133
+ 0.0
2134
+ ],
2135
+ "q01": [
2136
+ 0.3148897051811218,
2137
+ -0.20317550599575043,
2138
+ 0.06785467118024827,
2139
+ -3.140952730178833,
2140
+ -0.029743434861302376,
2141
+ -3.141091251373291,
2142
+ 0.0
2143
+ ],
2144
+ "q99": [
2145
+ 0.6472805738449097,
2146
+ 0.20846802592277527,
2147
+ 0.36855655312538155,
2148
+ 3.1409926891326903,
2149
+ 0.11424950212240226,
2150
+ 3.1410969257354737,
2151
+ 1.0
2152
+ ],
2153
+ "std": [
2154
+ 0.08108346909284592,
2155
+ 0.1116756722331047,
2156
+ 0.07747555524110794,
2157
+ 2.8737244606018066,
2158
+ 0.02774704433977604,
2159
+ 2.7678685188293457,
2160
+ 0.4969509243965149
2161
+ ]
2162
+ },
2163
+ "num_trajectories": 631,
2164
+ "num_transitions": 146241,
2165
+ "proprio": {
2166
+ "max": [
2167
+ 0.0,
2168
+ 0.0,
2169
+ 0.0,
2170
+ 0.0,
2171
+ 0.0,
2172
+ 0.0,
2173
+ 0.0
2174
+ ],
2175
+ "mean": [
2176
+ 0.0,
2177
+ 0.0,
2178
+ 0.0,
2179
+ 0.0,
2180
+ 0.0,
2181
+ 0.0,
2182
+ 0.0
2183
+ ],
2184
+ "min": [
2185
+ 0.0,
2186
+ 0.0,
2187
+ 0.0,
2188
+ 0.0,
2189
+ 0.0,
2190
+ 0.0,
2191
+ 0.0
2192
+ ],
2193
+ "q01": [
2194
+ 0.0,
2195
+ 0.0,
2196
+ 0.0,
2197
+ 0.0,
2198
+ 0.0,
2199
+ 0.0,
2200
+ 0.0
2201
+ ],
2202
+ "q99": [
2203
+ 0.0,
2204
+ 0.0,
2205
+ 0.0,
2206
+ 0.0,
2207
+ 0.0,
2208
+ 0.0,
2209
+ 0.0
2210
+ ],
2211
+ "std": [
2212
+ 0.0,
2213
+ 0.0,
2214
+ 0.0,
2215
+ 0.0,
2216
+ 0.0,
2217
+ 0.0,
2218
+ 0.0
2219
+ ]
2220
+ }
2221
+ },
2222
+ "jaco_play/0.1.0": {
2223
+ "action": {
2224
+ "mask": [
2225
+ true,
2226
+ true,
2227
+ true,
2228
+ true,
2229
+ true,
2230
+ true,
2231
+ false
2232
+ ],
2233
+ "max": [
2234
+ 0.20000000298023224,
2235
+ 0.20000000298023224,
2236
+ 0.20000000298023224,
2237
+ 0.0,
2238
+ 0.0,
2239
+ 0.0,
2240
+ 1.0
2241
+ ],
2242
+ "mean": [
2243
+ 0.0009658387862145901,
2244
+ -0.005800850689411163,
2245
+ -0.003950685728341341,
2246
+ 0.0,
2247
+ 0.0,
2248
+ 0.0,
2249
+ 0.34934908151626587
2250
+ ],
2251
+ "min": [
2252
+ -0.20000000298023224,
2253
+ -0.20000000298023224,
2254
+ -0.20000000298023224,
2255
+ 0.0,
2256
+ 0.0,
2257
+ 0.0,
2258
+ 0.0
2259
+ ],
2260
+ "q01": [
2261
+ -0.20000000298023224,
2262
+ -0.20000000298023224,
2263
+ -0.20000000298023224,
2264
+ 0.0,
2265
+ 0.0,
2266
+ 0.0,
2267
+ 0.0
2268
+ ],
2269
+ "q99": [
2270
+ 0.20000000298023224,
2271
+ 0.20000000298023224,
2272
+ 0.20000000298023224,
2273
+ 0.0,
2274
+ 0.0,
2275
+ 0.0,
2276
+ 1.0
2277
+ ],
2278
+ "std": [
2279
+ 0.12234985828399658,
2280
+ 0.09678783267736435,
2281
+ 0.1115543395280838,
2282
+ 0.0,
2283
+ 0.0,
2284
+ 0.0,
2285
+ 0.47682321071624756
2286
+ ]
2287
+ },
2288
+ "num_trajectories": 1085,
2289
+ "num_transitions": 77965,
2290
+ "proprio": {
2291
+ "max": [
2292
+ 0.0,
2293
+ 0.0,
2294
+ 0.0,
2295
+ 0.0,
2296
+ 0.0,
2297
+ 0.0,
2298
+ 0.0
2299
+ ],
2300
+ "mean": [
2301
+ 0.0,
2302
+ 0.0,
2303
+ 0.0,
2304
+ 0.0,
2305
+ 0.0,
2306
+ 0.0,
2307
+ 0.0
2308
+ ],
2309
+ "min": [
2310
+ 0.0,
2311
+ 0.0,
2312
+ 0.0,
2313
+ 0.0,
2314
+ 0.0,
2315
+ 0.0,
2316
+ 0.0
2317
+ ],
2318
+ "q01": [
2319
+ 0.0,
2320
+ 0.0,
2321
+ 0.0,
2322
+ 0.0,
2323
+ 0.0,
2324
+ 0.0,
2325
+ 0.0
2326
+ ],
2327
+ "q99": [
2328
+ 0.0,
2329
+ 0.0,
2330
+ 0.0,
2331
+ 0.0,
2332
+ 0.0,
2333
+ 0.0,
2334
+ 0.0
2335
+ ],
2336
+ "std": [
2337
+ 0.0,
2338
+ 0.0,
2339
+ 0.0,
2340
+ 0.0,
2341
+ 0.0,
2342
+ 0.0,
2343
+ 0.0
2344
+ ]
2345
+ }
2346
+ },
2347
+ "kuka/0.1.0": {
2348
+ "action": {
2349
+ "mask": [
2350
+ true,
2351
+ true,
2352
+ true,
2353
+ true,
2354
+ true,
2355
+ true,
2356
+ false
2357
+ ],
2358
+ "max": [
2359
+ 0.1697135865688324,
2360
+ 0.2777623236179352,
2361
+ 0.43710532784461975,
2362
+ 0.0,
2363
+ 0.0,
2364
+ 1.9684287309646606,
2365
+ 1.0
2366
+ ],
2367
+ "mean": [
2368
+ -0.00046687963185831904,
2369
+ 0.00040137648466043174,
2370
+ -0.0012807906605303288,
2371
+ 0.0,
2372
+ 0.0,
2373
+ -0.037225183099508286,
2374
+ 0.4131543040275574
2375
+ ],
2376
+ "min": [
2377
+ -0.159867063164711,
2378
+ -0.2892282009124756,
2379
+ -0.2795473635196686,
2380
+ 0.0,
2381
+ 0.0,
2382
+ -1.9875637292861938,
2383
+ 0.0
2384
+ ],
2385
+ "q01": [
2386
+ -0.06619441494345665,
2387
+ -0.08713878810405731,
2388
+ -0.15083016991615295,
2389
+ 0.0,
2390
+ 0.0,
2391
+ -0.5415697038173676,
2392
+ 0.0
2393
+ ],
2394
+ "q99": [
2395
+ 0.06601839080452929,
2396
+ 0.08732476785779003,
2397
+ 0.18168179214000715,
2398
+ 0.0,
2399
+ 0.0,
2400
+ 0.2923380345106127,
2401
+ 1.0
2402
+ ],
2403
+ "std": [
2404
+ 0.020832739770412445,
2405
+ 0.029158642515540123,
2406
+ 0.0642285868525505,
2407
+ 0.0,
2408
+ 0.0,
2409
+ 0.14224639534950256,
2410
+ 0.4908643662929535
2411
+ ]
2412
+ },
2413
+ "num_trajectories": 209880,
2414
+ "num_transitions": 2455879,
2415
+ "proprio": {
2416
+ "max": [
2417
+ 0.0,
2418
+ 0.0,
2419
+ 0.0,
2420
+ 0.0,
2421
+ 0.0,
2422
+ 0.0,
2423
+ 0.0
2424
+ ],
2425
+ "mean": [
2426
+ 0.0,
2427
+ 0.0,
2428
+ 0.0,
2429
+ 0.0,
2430
+ 0.0,
2431
+ 0.0,
2432
+ 0.0
2433
+ ],
2434
+ "min": [
2435
+ 0.0,
2436
+ 0.0,
2437
+ 0.0,
2438
+ 0.0,
2439
+ 0.0,
2440
+ 0.0,
2441
+ 0.0
2442
+ ],
2443
+ "q01": [
2444
+ 0.0,
2445
+ 0.0,
2446
+ 0.0,
2447
+ 0.0,
2448
+ 0.0,
2449
+ 0.0,
2450
+ 0.0
2451
+ ],
2452
+ "q99": [
2453
+ 0.0,
2454
+ 0.0,
2455
+ 0.0,
2456
+ 0.0,
2457
+ 0.0,
2458
+ 0.0,
2459
+ 0.0
2460
+ ],
2461
+ "std": [
2462
+ 0.0,
2463
+ 0.0,
2464
+ 0.0,
2465
+ 0.0,
2466
+ 0.0,
2467
+ 0.0,
2468
+ 0.0
2469
+ ]
2470
+ }
2471
+ },
2472
+ "language_table/0.1.0": {
2473
+ "action": {
2474
+ "mask": [
2475
+ true,
2476
+ true,
2477
+ true,
2478
+ true,
2479
+ true,
2480
+ true,
2481
+ false
2482
+ ],
2483
+ "max": [
2484
+ 0.23357294499874115,
2485
+ 0.24496802687644958,
2486
+ 0.0,
2487
+ 0.0,
2488
+ 0.0,
2489
+ 0.0,
2490
+ 1.0
2491
+ ],
2492
+ "mean": [
2493
+ 0.00014891766477376223,
2494
+ -0.0005636657006107271,
2495
+ 0.0,
2496
+ 0.0,
2497
+ 0.0,
2498
+ 0.0,
2499
+ 1.0
2500
+ ],
2501
+ "min": [
2502
+ -0.21989956498146057,
2503
+ -0.23736150562763214,
2504
+ 0.0,
2505
+ 0.0,
2506
+ 0.0,
2507
+ 0.0,
2508
+ 1.0
2509
+ ],
2510
+ "q01": [
2511
+ -0.08179590478539467,
2512
+ -0.11795833334326744,
2513
+ 0.0,
2514
+ 0.0,
2515
+ 0.0,
2516
+ 0.0,
2517
+ 1.0
2518
+ ],
2519
+ "q99": [
2520
+ 0.08822273463010788,
2521
+ 0.1191693339496851,
2522
+ 0.0,
2523
+ 0.0,
2524
+ 0.0,
2525
+ 0.0,
2526
+ 1.0
2527
+ ],
2528
+ "std": [
2529
+ 0.030162859708070755,
2530
+ 0.04230763390660286,
2531
+ 0.0,
2532
+ 0.0,
2533
+ 0.0,
2534
+ 0.0,
2535
+ 0.0
2536
+ ]
2537
+ },
2538
+ "num_trajectories": 442226,
2539
+ "num_transitions": 7045476,
2540
+ "proprio": {
2541
+ "max": [
2542
+ 0.0,
2543
+ 0.0,
2544
+ 0.0,
2545
+ 0.0,
2546
+ 0.0,
2547
+ 0.0,
2548
+ 0.0
2549
+ ],
2550
+ "mean": [
2551
+ 0.0,
2552
+ 0.0,
2553
+ 0.0,
2554
+ 0.0,
2555
+ 0.0,
2556
+ 0.0,
2557
+ 0.0
2558
+ ],
2559
+ "min": [
2560
+ 0.0,
2561
+ 0.0,
2562
+ 0.0,
2563
+ 0.0,
2564
+ 0.0,
2565
+ 0.0,
2566
+ 0.0
2567
+ ],
2568
+ "q01": [
2569
+ 0.0,
2570
+ 0.0,
2571
+ 0.0,
2572
+ 0.0,
2573
+ 0.0,
2574
+ 0.0,
2575
+ 0.0
2576
+ ],
2577
+ "q99": [
2578
+ 0.0,
2579
+ 0.0,
2580
+ 0.0,
2581
+ 0.0,
2582
+ 0.0,
2583
+ 0.0,
2584
+ 0.0
2585
+ ],
2586
+ "std": [
2587
+ 0.0,
2588
+ 0.0,
2589
+ 0.0,
2590
+ 0.0,
2591
+ 0.0,
2592
+ 0.0,
2593
+ 0.0
2594
+ ]
2595
+ }
2596
+ },
2597
+ "nyu_franka_play_dataset_converted_externally_to_rlds/0.1.0": {
2598
+ "action": {
2599
+ "mask": [
2600
+ true,
2601
+ true,
2602
+ true,
2603
+ true,
2604
+ true,
2605
+ true,
2606
+ false
2607
+ ],
2608
+ "max": [
2609
+ 0.06424188613891602,
2610
+ 0.07027634978294373,
2611
+ 0.06129661202430725,
2612
+ 6.281067848205566,
2613
+ 0.1967729926109314,
2614
+ 0.26377415657043457,
2615
+ 1.0
2616
+ ],
2617
+ "mean": [
2618
+ 0.0010219910182058811,
2619
+ -0.00012002632865915075,
2620
+ 0.00032894135802052915,
2621
+ 0.0015034276293590665,
2622
+ -0.002198528265580535,
2623
+ -0.0016632305923849344,
2624
+ 0.7230083346366882
2625
+ ],
2626
+ "min": [
2627
+ -0.05952230095863342,
2628
+ -0.07232445478439331,
2629
+ -0.06730806827545166,
2630
+ -6.278434753417969,
2631
+ -0.21479034423828125,
2632
+ -0.3627619743347168,
2633
+ 0.0
2634
+ ],
2635
+ "q01": [
2636
+ -0.03199600875377655,
2637
+ -0.032861671447753905,
2638
+ -0.03368805110454559,
2639
+ -0.12080862045288086,
2640
+ -0.12175218224525451,
2641
+ -0.11370223641395569,
2642
+ 0.0
2643
+ ],
2644
+ "q99": [
2645
+ 0.03101520001888276,
2646
+ 0.0373908892273903,
2647
+ 0.03646374464035038,
2648
+ 0.11764093399047852,
2649
+ 0.1258920183777809,
2650
+ 0.09366151213645942,
2651
+ 1.0
2652
+ ],
2653
+ "std": [
2654
+ 0.013274150900542736,
2655
+ 0.013215919025242329,
2656
+ 0.01282210648059845,
2657
+ 0.27324533462524414,
2658
+ 0.05702253058552742,
2659
+ 0.03917279839515686,
2660
+ 0.44753193855285645
2661
+ ]
2662
+ },
2663
+ "num_trajectories": 456,
2664
+ "num_transitions": 44875,
2665
+ "proprio": {
2666
+ "max": [
2667
+ 0.0,
2668
+ 0.0,
2669
+ 0.0,
2670
+ 0.0,
2671
+ 0.0,
2672
+ 0.0,
2673
+ 0.0
2674
+ ],
2675
+ "mean": [
2676
+ 0.0,
2677
+ 0.0,
2678
+ 0.0,
2679
+ 0.0,
2680
+ 0.0,
2681
+ 0.0,
2682
+ 0.0
2683
+ ],
2684
+ "min": [
2685
+ 0.0,
2686
+ 0.0,
2687
+ 0.0,
2688
+ 0.0,
2689
+ 0.0,
2690
+ 0.0,
2691
+ 0.0
2692
+ ],
2693
+ "q01": [
2694
+ 0.0,
2695
+ 0.0,
2696
+ 0.0,
2697
+ 0.0,
2698
+ 0.0,
2699
+ 0.0,
2700
+ 0.0
2701
+ ],
2702
+ "q99": [
2703
+ 0.0,
2704
+ 0.0,
2705
+ 0.0,
2706
+ 0.0,
2707
+ 0.0,
2708
+ 0.0,
2709
+ 0.0
2710
+ ],
2711
+ "std": [
2712
+ 0.0,
2713
+ 0.0,
2714
+ 0.0,
2715
+ 0.0,
2716
+ 0.0,
2717
+ 0.0,
2718
+ 0.0
2719
+ ]
2720
+ }
2721
+ },
2722
+ "rh20t_rlds/1.0.0": {
2723
+ "action": {
2724
+ "mask": [
2725
+ true,
2726
+ true,
2727
+ true,
2728
+ true,
2729
+ true,
2730
+ true,
2731
+ false
2732
+ ],
2733
+ "max": [
2734
+ 7.582831568163597e+35,
2735
+ 7.557172735451728e+35,
2736
+ 2.2717764477020827e+27,
2737
+ 3.1415927410125732,
2738
+ 1.5116956233978271,
2739
+ 3.1415927410125732,
2740
+ 1.0
2741
+ ],
2742
+ "mean": [
2743
+ -5.332157638779582e+28,
2744
+ -1.5128827327837974e+29,
2745
+ -1.832736619079747e+28,
2746
+ 0.5735913515090942,
2747
+ -0.00847744569182396,
2748
+ -0.5566052198410034,
2749
+ 0.3186892569065094
2750
+ ],
2751
+ "min": [
2752
+ -3.5543094244408723e+36,
2753
+ -8.723098019507117e+36,
2754
+ -9.648338287048974e+35,
2755
+ -3.1415927410125732,
2756
+ -1.5062522888183594,
2757
+ -3.1415927410125732,
2758
+ 0.0
2759
+ ],
2760
+ "q01": [
2761
+ 0.36028257966041566,
2762
+ -0.272584410905838,
2763
+ 0.005985925104469062,
2764
+ -3.1411514282226562,
2765
+ -0.5925320792198181,
2766
+ -3.1415159702301025,
2767
+ 0.0
2768
+ ],
2769
+ "q99": [
2770
+ 0.7534684538841248,
2771
+ 0.31738221645355225,
2772
+ 0.33061375379562374,
2773
+ 3.141425132751465,
2774
+ 0.47507260441780086,
2775
+ 3.141479730606079,
2776
+ 1.0
2777
+ ],
2778
+ "std": [
2779
+ Infinity,
2780
+ Infinity,
2781
+ Infinity,
2782
+ 2.2581026554107666,
2783
+ 0.1548534482717514,
2784
+ 2.2581026554107666,
2785
+ 0.39917993545532227
2786
+ ]
2787
+ },
2788
+ "num_trajectories": 104392,
2789
+ "num_transitions": 52644433,
2790
+ "proprio": {
2791
+ "max": [
2792
+ 0.0,
2793
+ 0.0,
2794
+ 0.0,
2795
+ 0.0,
2796
+ 0.0,
2797
+ 0.0,
2798
+ 0.0
2799
+ ],
2800
+ "mean": [
2801
+ 0.0,
2802
+ 0.0,
2803
+ 0.0,
2804
+ 0.0,
2805
+ 0.0,
2806
+ 0.0,
2807
+ 0.0
2808
+ ],
2809
+ "min": [
2810
+ 0.0,
2811
+ 0.0,
2812
+ 0.0,
2813
+ 0.0,
2814
+ 0.0,
2815
+ 0.0,
2816
+ 0.0
2817
+ ],
2818
+ "q01": [
2819
+ 0.0,
2820
+ 0.0,
2821
+ 0.0,
2822
+ 0.0,
2823
+ 0.0,
2824
+ 0.0,
2825
+ 0.0
2826
+ ],
2827
+ "q99": [
2828
+ 0.0,
2829
+ 0.0,
2830
+ 0.0,
2831
+ 0.0,
2832
+ 0.0,
2833
+ 0.0,
2834
+ 0.0
2835
+ ],
2836
+ "std": [
2837
+ 0.0,
2838
+ 0.0,
2839
+ 0.0,
2840
+ 0.0,
2841
+ 0.0,
2842
+ 0.0,
2843
+ 0.0
2844
+ ]
2845
+ }
2846
+ },
2847
+ "roboturk/0.1.0": {
2848
+ "action": {
2849
+ "mask": [
2850
+ true,
2851
+ true,
2852
+ true,
2853
+ true,
2854
+ true,
2855
+ true,
2856
+ false
2857
+ ],
2858
+ "max": [
2859
+ 0.39124172925949097,
2860
+ 0.4601028263568878,
2861
+ 0.4870833456516266,
2862
+ 1.816888689994812,
2863
+ 1.8240282535552979,
2864
+ 1.4824820756912231,
2865
+ 1.0
2866
+ ],
2867
+ "mean": [
2868
+ 0.001444889116100967,
2869
+ -0.0015945355407893658,
2870
+ -0.0011753803119063377,
2871
+ 0.002301239175722003,
2872
+ -0.0009382442804053426,
2873
+ -0.00011485860886750743,
2874
+ 0.5746025443077087
2875
+ ],
2876
+ "min": [
2877
+ -0.6546999216079712,
2878
+ -0.6365841031074524,
2879
+ -0.4217723608016968,
2880
+ -1.6695482730865479,
2881
+ -1.8023357391357422,
2882
+ -1.4630827903747559,
2883
+ 0.0
2884
+ ],
2885
+ "q01": [
2886
+ -0.1342635464668274,
2887
+ -0.19996687173843383,
2888
+ -0.1482972100377083,
2889
+ -0.20720748245716095,
2890
+ -0.09676413893699647,
2891
+ -0.18075634717941286,
2892
+ 0.0
2893
+ ],
2894
+ "q99": [
2895
+ 0.14956976801157001,
2896
+ 0.1805950567126275,
2897
+ 0.18841815620660796,
2898
+ 0.21615413755178453,
2899
+ 0.09457383215427405,
2900
+ 0.18543301910162005,
2901
+ 1.0
2902
+ ],
2903
+ "std": [
2904
+ 0.0493537075817585,
2905
+ 0.06354564428329468,
2906
+ 0.06116492301225662,
2907
+ 0.0955340564250946,
2908
+ 0.08420011401176453,
2909
+ 0.06517910957336426,
2910
+ 0.4945177137851715
2911
+ ]
2912
+ },
2913
+ "num_trajectories": 1995,
2914
+ "num_transitions": 187507,
2915
+ "proprio": {
2916
+ "max": [
2917
+ 0.0,
2918
+ 0.0,
2919
+ 0.0,
2920
+ 0.0,
2921
+ 0.0,
2922
+ 0.0,
2923
+ 0.0
2924
+ ],
2925
+ "mean": [
2926
+ 0.0,
2927
+ 0.0,
2928
+ 0.0,
2929
+ 0.0,
2930
+ 0.0,
2931
+ 0.0,
2932
+ 0.0
2933
+ ],
2934
+ "min": [
2935
+ 0.0,
2936
+ 0.0,
2937
+ 0.0,
2938
+ 0.0,
2939
+ 0.0,
2940
+ 0.0,
2941
+ 0.0
2942
+ ],
2943
+ "q01": [
2944
+ 0.0,
2945
+ 0.0,
2946
+ 0.0,
2947
+ 0.0,
2948
+ 0.0,
2949
+ 0.0,
2950
+ 0.0
2951
+ ],
2952
+ "q99": [
2953
+ 0.0,
2954
+ 0.0,
2955
+ 0.0,
2956
+ 0.0,
2957
+ 0.0,
2958
+ 0.0,
2959
+ 0.0
2960
+ ],
2961
+ "std": [
2962
+ 0.0,
2963
+ 0.0,
2964
+ 0.0,
2965
+ 0.0,
2966
+ 0.0,
2967
+ 0.0,
2968
+ 0.0
2969
+ ]
2970
+ }
2971
+ },
2972
+ "roboverse/1.0.0": {
2973
+ "action": {
2974
+ "mask": [
2975
+ true,
2976
+ true,
2977
+ true,
2978
+ true,
2979
+ true,
2980
+ true,
2981
+ false
2982
+ ],
2983
+ "max": [
2984
+ 0.007525584660470486,
2985
+ 0.014820478856563568,
2986
+ 0.01637113094329834,
2987
+ 0.00491830101236701,
2988
+ 0.01663605310022831,
2989
+ 0.040509484708309174,
2990
+ 1.0
2991
+ ],
2992
+ "mean": [
2993
+ -5.878923911950551e-05,
2994
+ -9.44029579841299e-06,
2995
+ 0.0011712851701304317,
2996
+ -2.3708812477707397e-06,
2997
+ -5.450185199151747e-05,
2998
+ 0.00013692767242901027,
2999
+ 0.47847071290016174
3000
+ ],
3001
+ "min": [
3002
+ -0.00769459642469883,
3003
+ -0.013704304583370686,
3004
+ -0.01531568169593811,
3005
+ -0.008521303534507751,
3006
+ -0.021993383765220642,
3007
+ -0.03924804925918579,
3008
+ 0.0
3009
+ ],
3010
+ "q01": [
3011
+ -0.004905223846435547,
3012
+ -0.005961279459297657,
3013
+ -0.011088475584983826,
3014
+ -0.0016063672956079245,
3015
+ -0.008130673859268427,
3016
+ -0.026399901136755943,
3017
+ 0.0
3018
+ ],
3019
+ "q99": [
3020
+ 0.004783453419804573,
3021
+ 0.006270606070756912,
3022
+ 0.014064635932445509,
3023
+ 0.0015379462402779571,
3024
+ 0.008272283710539341,
3025
+ 0.02577526867389679,
3026
+ 1.0
3027
+ ],
3028
+ "std": [
3029
+ 0.0019041603663936257,
3030
+ 0.0021605603396892548,
3031
+ 0.006206119898706675,
3032
+ 0.000532826641574502,
3033
+ 0.0030592260882258415,
3034
+ 0.008562421426177025,
3035
+ 0.5001339912414551
3036
+ ]
3037
+ },
3038
+ "num_trajectories": 2936,
3039
+ "num_transitions": 269354,
3040
+ "proprio": {
3041
+ "max": [
3042
+ 0.0,
3043
+ 0.0,
3044
+ 0.0,
3045
+ 0.0,
3046
+ 0.0,
3047
+ 0.0,
3048
+ 0.0
3049
+ ],
3050
+ "mean": [
3051
+ 0.0,
3052
+ 0.0,
3053
+ 0.0,
3054
+ 0.0,
3055
+ 0.0,
3056
+ 0.0,
3057
+ 0.0
3058
+ ],
3059
+ "min": [
3060
+ 0.0,
3061
+ 0.0,
3062
+ 0.0,
3063
+ 0.0,
3064
+ 0.0,
3065
+ 0.0,
3066
+ 0.0
3067
+ ],
3068
+ "q01": [
3069
+ 0.0,
3070
+ 0.0,
3071
+ 0.0,
3072
+ 0.0,
3073
+ 0.0,
3074
+ 0.0,
3075
+ 0.0
3076
+ ],
3077
+ "q99": [
3078
+ 0.0,
3079
+ 0.0,
3080
+ 0.0,
3081
+ 0.0,
3082
+ 0.0,
3083
+ 0.0,
3084
+ 0.0
3085
+ ],
3086
+ "std": [
3087
+ 0.0,
3088
+ 0.0,
3089
+ 0.0,
3090
+ 0.0,
3091
+ 0.0,
3092
+ 0.0,
3093
+ 0.0
3094
+ ]
3095
+ }
3096
+ },
3097
+ "stanford_hydra_dataset_converted_externally_to_rlds/0.1.0": {
3098
+ "action": {
3099
+ "mask": [
3100
+ true,
3101
+ true,
3102
+ true,
3103
+ true,
3104
+ true,
3105
+ true,
3106
+ false
3107
+ ],
3108
+ "max": [
3109
+ 0.02499854564666748,
3110
+ 0.02499903365969658,
3111
+ 0.024999922141432762,
3112
+ 0.24974457919597626,
3113
+ 0.24997030198574066,
3114
+ 0.24999946355819702,
3115
+ 1.0
3116
+ ],
3117
+ "mean": [
3118
+ 0.0007790043600834906,
3119
+ 0.00013707877951674163,
3120
+ -0.000254859565757215,
3121
+ 0.0012903243768960238,
3122
+ -0.004751724191009998,
3123
+ 0.002692892448976636,
3124
+ 0.48855218291282654
3125
+ ],
3126
+ "min": [
3127
+ -0.024999044835567474,
3128
+ -0.024999700486660004,
3129
+ -0.02499929815530777,
3130
+ -0.24993225932121277,
3131
+ -0.2499666064977646,
3132
+ -0.2499932497739792,
3133
+ 0.0
3134
+ ],
3135
+ "q01": [
3136
+ -0.019992006458342076,
3137
+ -0.02415412735193968,
3138
+ -0.022941758055239916,
3139
+ -0.11085530579090118,
3140
+ -0.12024572037160397,
3141
+ -0.13314770206809043,
3142
+ 0.0
3143
+ ],
3144
+ "q99": [
3145
+ 0.022886231057345868,
3146
+ 0.022358838934451335,
3147
+ 0.02410089675337076,
3148
+ 0.12370114490389822,
3149
+ 0.11323311634361738,
3150
+ 0.18474749639630164,
3151
+ 1.0
3152
+ ],
3153
+ "std": [
3154
+ 0.008022183552384377,
3155
+ 0.009131456725299358,
3156
+ 0.00957438349723816,
3157
+ 0.04122224077582359,
3158
+ 0.03843001648783684,
3159
+ 0.046067025512456894,
3160
+ 0.49978113174438477
3161
+ ]
3162
+ },
3163
+ "num_trajectories": 570,
3164
+ "num_transitions": 358234,
3165
+ "proprio": {
3166
+ "max": [
3167
+ 0.0,
3168
+ 0.0,
3169
+ 0.0,
3170
+ 0.0,
3171
+ 0.0,
3172
+ 0.0,
3173
+ 0.0
3174
+ ],
3175
+ "mean": [
3176
+ 0.0,
3177
+ 0.0,
3178
+ 0.0,
3179
+ 0.0,
3180
+ 0.0,
3181
+ 0.0,
3182
+ 0.0
3183
+ ],
3184
+ "min": [
3185
+ 0.0,
3186
+ 0.0,
3187
+ 0.0,
3188
+ 0.0,
3189
+ 0.0,
3190
+ 0.0,
3191
+ 0.0
3192
+ ],
3193
+ "q01": [
3194
+ 0.0,
3195
+ 0.0,
3196
+ 0.0,
3197
+ 0.0,
3198
+ 0.0,
3199
+ 0.0,
3200
+ 0.0
3201
+ ],
3202
+ "q99": [
3203
+ 0.0,
3204
+ 0.0,
3205
+ 0.0,
3206
+ 0.0,
3207
+ 0.0,
3208
+ 0.0,
3209
+ 0.0
3210
+ ],
3211
+ "std": [
3212
+ 0.0,
3213
+ 0.0,
3214
+ 0.0,
3215
+ 0.0,
3216
+ 0.0,
3217
+ 0.0,
3218
+ 0.0
3219
+ ]
3220
+ }
3221
+ },
3222
+ "taco_play/0.1.0": {
3223
+ "action": {
3224
+ "mask": [
3225
+ true,
3226
+ true,
3227
+ true,
3228
+ true,
3229
+ true,
3230
+ true,
3231
+ false
3232
+ ],
3233
+ "max": [
3234
+ 1.4915844202041626,
3235
+ 2.1842432022094727,
3236
+ 2.6836395263671875,
3237
+ 5.035226821899414,
3238
+ 2.665864944458008,
3239
+ 4.250768661499023,
3240
+ 1.0
3241
+ ],
3242
+ "mean": [
3243
+ -0.0038459226489067078,
3244
+ 0.009671436622738838,
3245
+ 0.01278059184551239,
3246
+ -0.0054037850350141525,
3247
+ -0.009606562554836273,
3248
+ -0.0024807206355035305,
3249
+ 0.4263913035392761
3250
+ ],
3251
+ "min": [
3252
+ -4.242457866668701,
3253
+ -3.192805051803589,
3254
+ -1.3371467590332031,
3255
+ -4.202683448791504,
3256
+ -2.6722638607025146,
3257
+ -3.3467135429382324,
3258
+ 0.0
3259
+ ],
3260
+ "q01": [
3261
+ -0.7106140398979186,
3262
+ -1.056944659948349,
3263
+ -0.5878450274467468,
3264
+ -0.7682853937149048,
3265
+ -0.7180147767066956,
3266
+ -1.5527938604354858,
3267
+ 0.0
3268
+ ],
3269
+ "q99": [
3270
+ 0.6482916426658629,
3271
+ 1.0051310062408447,
3272
+ 0.9480248689651489,
3273
+ 0.6926478147506714,
3274
+ 0.6351067513227462,
3275
+ 1.628010264635086,
3276
+ 1.0
3277
+ ],
3278
+ "std": [
3279
+ 0.23254045844078064,
3280
+ 0.3629826307296753,
3281
+ 0.2869291603565216,
3282
+ 0.261770635843277,
3283
+ 0.24388927221298218,
3284
+ 0.5216501355171204,
3285
+ 0.49469029903411865
3286
+ ]
3287
+ },
3288
+ "num_trajectories": 3603,
3289
+ "num_transitions": 237798,
3290
+ "proprio": {
3291
+ "max": [
3292
+ 0.0,
3293
+ 0.0,
3294
+ 0.0,
3295
+ 0.0,
3296
+ 0.0,
3297
+ 0.0,
3298
+ 0.0
3299
+ ],
3300
+ "mean": [
3301
+ 0.0,
3302
+ 0.0,
3303
+ 0.0,
3304
+ 0.0,
3305
+ 0.0,
3306
+ 0.0,
3307
+ 0.0
3308
+ ],
3309
+ "min": [
3310
+ 0.0,
3311
+ 0.0,
3312
+ 0.0,
3313
+ 0.0,
3314
+ 0.0,
3315
+ 0.0,
3316
+ 0.0
3317
+ ],
3318
+ "q01": [
3319
+ 0.0,
3320
+ 0.0,
3321
+ 0.0,
3322
+ 0.0,
3323
+ 0.0,
3324
+ 0.0,
3325
+ 0.0
3326
+ ],
3327
+ "q99": [
3328
+ 0.0,
3329
+ 0.0,
3330
+ 0.0,
3331
+ 0.0,
3332
+ 0.0,
3333
+ 0.0,
3334
+ 0.0
3335
+ ],
3336
+ "std": [
3337
+ 0.0,
3338
+ 0.0,
3339
+ 0.0,
3340
+ 0.0,
3341
+ 0.0,
3342
+ 0.0,
3343
+ 0.0
3344
+ ]
3345
+ }
3346
+ },
3347
+ "toto/0.1.0": {
3348
+ "action": {
3349
+ "mask": [
3350
+ true,
3351
+ true,
3352
+ true,
3353
+ true,
3354
+ true,
3355
+ true,
3356
+ false
3357
+ ],
3358
+ "max": [
3359
+ 0.6839867234230042,
3360
+ 0.4454185664653778,
3361
+ 0.7984078526496887,
3362
+ 2.120781660079956,
3363
+ 1.371164321899414,
3364
+ 1.4118704795837402,
3365
+ 0.0
3366
+ ],
3367
+ "mean": [
3368
+ 0.3854214549064636,
3369
+ 0.007769507821649313,
3370
+ 0.3632742166519165,
3371
+ -0.665202796459198,
3372
+ 0.1890396624803543,
3373
+ 0.0329875648021698,
3374
+ 0.0
3375
+ ],
3376
+ "min": [
3377
+ 0.09922284632921219,
3378
+ -0.5180193781852722,
3379
+ 0.13791072368621826,
3380
+ -2.635117530822754,
3381
+ -1.0734480619430542,
3382
+ -1.9282547235488892,
3383
+ 0.0
3384
+ ],
3385
+ "q01": [
3386
+ 0.1756722891330719,
3387
+ -0.3077590811252594,
3388
+ 0.235383919775486,
3389
+ -2.0908505964279174,
3390
+ -0.6191593289375306,
3391
+ -0.7488683319091797,
3392
+ 0.0
3393
+ ],
3394
+ "q99": [
3395
+ 0.6136963081359863,
3396
+ 0.33704194784164443,
3397
+ 0.6681221985816956,
3398
+ 0.7422861719131538,
3399
+ 0.7955395007133507,
3400
+ 0.740464625358582,
3401
+ 0.0
3402
+ ],
3403
+ "std": [
3404
+ 0.12211630493402481,
3405
+ 0.19378569722175598,
3406
+ 0.10178232192993164,
3407
+ 0.5725256204605103,
3408
+ 0.298846036195755,
3409
+ 0.32599160075187683,
3410
+ 0.0
3411
+ ]
3412
+ },
3413
+ "num_trajectories": 1003,
3414
+ "num_transitions": 325699,
3415
+ "proprio": {
3416
+ "max": [
3417
+ 0.0,
3418
+ 0.0,
3419
+ 0.0,
3420
+ 0.0,
3421
+ 0.0,
3422
+ 0.0,
3423
+ 0.0
3424
+ ],
3425
+ "mean": [
3426
+ 0.0,
3427
+ 0.0,
3428
+ 0.0,
3429
+ 0.0,
3430
+ 0.0,
3431
+ 0.0,
3432
+ 0.0
3433
+ ],
3434
+ "min": [
3435
+ 0.0,
3436
+ 0.0,
3437
+ 0.0,
3438
+ 0.0,
3439
+ 0.0,
3440
+ 0.0,
3441
+ 0.0
3442
+ ],
3443
+ "q01": [
3444
+ 0.0,
3445
+ 0.0,
3446
+ 0.0,
3447
+ 0.0,
3448
+ 0.0,
3449
+ 0.0,
3450
+ 0.0
3451
+ ],
3452
+ "q99": [
3453
+ 0.0,
3454
+ 0.0,
3455
+ 0.0,
3456
+ 0.0,
3457
+ 0.0,
3458
+ 0.0,
3459
+ 0.0
3460
+ ],
3461
+ "std": [
3462
+ 0.0,
3463
+ 0.0,
3464
+ 0.0,
3465
+ 0.0,
3466
+ 0.0,
3467
+ 0.0,
3468
+ 0.0
3469
+ ]
3470
+ }
3471
+ },
3472
+ "ucsd_kitchen_dataset_converted_externally_to_rlds/0.1.0": {
3473
+ "action": {
3474
+ "mask": [
3475
+ true,
3476
+ true,
3477
+ true,
3478
+ true,
3479
+ true,
3480
+ true,
3481
+ false
3482
+ ],
3483
+ "max": [
3484
+ 678.0,
3485
+ 400.0,
3486
+ 507.0,
3487
+ 180.00001525878906,
3488
+ 6.000013828277588,
3489
+ 116.99998474121094,
3490
+ 1.0
3491
+ ],
3492
+ "mean": [
3493
+ 410.375732421875,
3494
+ 116.9518814086914,
3495
+ 192.35031127929688,
3496
+ -121.22441864013672,
3497
+ -33.84892654418945,
3498
+ 50.016136169433594,
3499
+ 0.741813600063324
3500
+ ],
3501
+ "min": [
3502
+ 172.0,
3503
+ -166.0,
3504
+ -99.99999237060547,
3505
+ -180.00001525878906,
3506
+ -89.0,
3507
+ -96.00010681152344,
3508
+ 0.0
3509
+ ],
3510
+ "q01": [
3511
+ 200.00001052856445,
3512
+ -102.31004211425781,
3513
+ -94.99993370056153,
3514
+ -180.00001525878906,
3515
+ -88.00001525878906,
3516
+ -38.999977111816406,
3517
+ 0.0
3518
+ ],
3519
+ "q99": [
3520
+ 637.0,
3521
+ 368.30999999999995,
3522
+ 493.0,
3523
+ 180.00001525878906,
3524
+ 0.999983012676239,
3525
+ 105.00001525878906,
3526
+ 1.0
3527
+ ],
3528
+ "std": [
3529
+ 122.81488037109375,
3530
+ 108.80094909667969,
3531
+ 130.30345153808594,
3532
+ 116.2820053100586,
3533
+ 27.62191390991211,
3534
+ 41.02091979980469,
3535
+ 0.4376337230205536
3536
+ ]
3537
+ },
3538
+ "num_trajectories": 150,
3539
+ "num_transitions": 3970,
3540
+ "proprio": {
3541
+ "max": [
3542
+ 0.0,
3543
+ 0.0,
3544
+ 0.0,
3545
+ 0.0,
3546
+ 0.0,
3547
+ 0.0,
3548
+ 0.0
3549
+ ],
3550
+ "mean": [
3551
+ 0.0,
3552
+ 0.0,
3553
+ 0.0,
3554
+ 0.0,
3555
+ 0.0,
3556
+ 0.0,
3557
+ 0.0
3558
+ ],
3559
+ "min": [
3560
+ 0.0,
3561
+ 0.0,
3562
+ 0.0,
3563
+ 0.0,
3564
+ 0.0,
3565
+ 0.0,
3566
+ 0.0
3567
+ ],
3568
+ "q01": [
3569
+ 0.0,
3570
+ 0.0,
3571
+ 0.0,
3572
+ 0.0,
3573
+ 0.0,
3574
+ 0.0,
3575
+ 0.0
3576
+ ],
3577
+ "q99": [
3578
+ 0.0,
3579
+ 0.0,
3580
+ 0.0,
3581
+ 0.0,
3582
+ 0.0,
3583
+ 0.0,
3584
+ 0.0
3585
+ ],
3586
+ "std": [
3587
+ 0.0,
3588
+ 0.0,
3589
+ 0.0,
3590
+ 0.0,
3591
+ 0.0,
3592
+ 0.0,
3593
+ 0.0
3594
+ ]
3595
+ }
3596
+ },
3597
+ "utaustin_mutex/0.1.0": {
3598
+ "action": {
3599
+ "mask": [
3600
+ true,
3601
+ true,
3602
+ true,
3603
+ true,
3604
+ true,
3605
+ true,
3606
+ false
3607
+ ],
3608
+ "max": [
3609
+ 1.0,
3610
+ 1.0,
3611
+ 1.0,
3612
+ 0.375,
3613
+ 0.375,
3614
+ 0.375,
3615
+ 1.0
3616
+ ],
3617
+ "mean": [
3618
+ 0.06176406517624855,
3619
+ -0.005005490034818649,
3620
+ 0.10216782987117767,
3621
+ -0.03314131125807762,
3622
+ 0.013895022682845592,
3623
+ -0.011317633092403412,
3624
+ 0.5038976669311523
3625
+ ],
3626
+ "min": [
3627
+ -1.0,
3628
+ -1.0,
3629
+ -1.0,
3630
+ -0.375,
3631
+ -0.375,
3632
+ -0.375,
3633
+ 0.0
3634
+ ],
3635
+ "q01": [
3636
+ -0.4285714328289032,
3637
+ -0.9800000190734863,
3638
+ -0.5571428537368774,
3639
+ -0.375,
3640
+ -0.15642857551574707,
3641
+ -0.335357129573822,
3642
+ 0.0
3643
+ ],
3644
+ "q99": [
3645
+ 0.5914285778999329,
3646
+ 0.9714285731315613,
3647
+ 1.0,
3648
+ 0.3278571367263794,
3649
+ 0.207857146859169,
3650
+ 0.25607141852378845,
3651
+ 1.0
3652
+ ],
3653
+ "std": [
3654
+ 0.187501460313797,
3655
+ 0.4468473196029663,
3656
+ 0.3792876601219177,
3657
+ 0.14097853004932404,
3658
+ 0.06453699618577957,
3659
+ 0.11765265464782715,
3660
+ 0.501045286655426
3661
+ ]
3662
+ },
3663
+ "num_trajectories": 1500,
3664
+ "num_transitions": 361883,
3665
+ "proprio": {
3666
+ "max": [
3667
+ 0.0,
3668
+ 0.0,
3669
+ 0.0,
3670
+ 0.0,
3671
+ 0.0,
3672
+ 0.0,
3673
+ 0.0
3674
+ ],
3675
+ "mean": [
3676
+ 0.0,
3677
+ 0.0,
3678
+ 0.0,
3679
+ 0.0,
3680
+ 0.0,
3681
+ 0.0,
3682
+ 0.0
3683
+ ],
3684
+ "min": [
3685
+ 0.0,
3686
+ 0.0,
3687
+ 0.0,
3688
+ 0.0,
3689
+ 0.0,
3690
+ 0.0,
3691
+ 0.0
3692
+ ],
3693
+ "q01": [
3694
+ 0.0,
3695
+ 0.0,
3696
+ 0.0,
3697
+ 0.0,
3698
+ 0.0,
3699
+ 0.0,
3700
+ 0.0
3701
+ ],
3702
+ "q99": [
3703
+ 0.0,
3704
+ 0.0,
3705
+ 0.0,
3706
+ 0.0,
3707
+ 0.0,
3708
+ 0.0,
3709
+ 0.0
3710
+ ],
3711
+ "std": [
3712
+ 0.0,
3713
+ 0.0,
3714
+ 0.0,
3715
+ 0.0,
3716
+ 0.0,
3717
+ 0.0,
3718
+ 0.0
3719
+ ]
3720
+ }
3721
+ },
3722
+ "viola/0.1.0": {
3723
+ "action": {
3724
+ "mask": [
3725
+ true,
3726
+ true,
3727
+ true,
3728
+ true,
3729
+ true,
3730
+ true,
3731
+ false
3732
+ ],
3733
+ "max": [
3734
+ 1.0,
3735
+ 1.0,
3736
+ 1.0,
3737
+ 0.375,
3738
+ 0.36321428418159485,
3739
+ 0.375,
3740
+ 1.0
3741
+ ],
3742
+ "mean": [
3743
+ 0.04761853069067001,
3744
+ -0.029204534366726875,
3745
+ 0.055867329239845276,
3746
+ -0.0026185200549662113,
3747
+ 0.006867341697216034,
3748
+ -0.016821356490254402,
3749
+ 0.7323777675628662
3750
+ ],
3751
+ "min": [
3752
+ -1.0,
3753
+ -1.0,
3754
+ -1.0,
3755
+ -0.375,
3756
+ -0.375,
3757
+ -0.375,
3758
+ 0.0
3759
+ ],
3760
+ "q01": [
3761
+ -0.9628571271896362,
3762
+ -1.0,
3763
+ -1.0,
3764
+ -0.26249998807907104,
3765
+ -0.21321429312229156,
3766
+ -0.3385714292526245,
3767
+ 0.0
3768
+ ],
3769
+ "q99": [
3770
+ 0.9114285707473755,
3771
+ 0.868571400642395,
3772
+ 1.0,
3773
+ 0.2817857265472412,
3774
+ 0.2239285707473755,
3775
+ 0.3557142913341522,
3776
+ 1.0
3777
+ ],
3778
+ "std": [
3779
+ 0.39157867431640625,
3780
+ 0.40765219926834106,
3781
+ 0.40077903866767883,
3782
+ 0.10023998469114304,
3783
+ 0.08443189412355423,
3784
+ 0.10375089943408966,
3785
+ 0.442600816488266
3786
+ ]
3787
+ },
3788
+ "num_trajectories": 150,
3789
+ "num_transitions": 76324,
3790
+ "proprio": {
3791
+ "max": [
3792
+ 0.0,
3793
+ 0.0,
3794
+ 0.0,
3795
+ 0.0,
3796
+ 0.0,
3797
+ 0.0,
3798
+ 0.0
3799
+ ],
3800
+ "mean": [
3801
+ 0.0,
3802
+ 0.0,
3803
+ 0.0,
3804
+ 0.0,
3805
+ 0.0,
3806
+ 0.0,
3807
+ 0.0
3808
+ ],
3809
+ "min": [
3810
+ 0.0,
3811
+ 0.0,
3812
+ 0.0,
3813
+ 0.0,
3814
+ 0.0,
3815
+ 0.0,
3816
+ 0.0
3817
+ ],
3818
+ "q01": [
3819
+ 0.0,
3820
+ 0.0,
3821
+ 0.0,
3822
+ 0.0,
3823
+ 0.0,
3824
+ 0.0,
3825
+ 0.0
3826
+ ],
3827
+ "q99": [
3828
+ 0.0,
3829
+ 0.0,
3830
+ 0.0,
3831
+ 0.0,
3832
+ 0.0,
3833
+ 0.0,
3834
+ 0.0
3835
+ ],
3836
+ "std": [
3837
+ 0.0,
3838
+ 0.0,
3839
+ 0.0,
3840
+ 0.0,
3841
+ 0.0,
3842
+ 0.0,
3843
+ 0.0
3844
+ ]
3845
+ }
3846
+ }
3847
+ }
3848
+ }
rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f53daabe594c8b32637070472cd1c25820ccde6527abe961448850eebac6137
3
+ size 15984
rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2df1c88932d17c7a1aa846ee90a7eba5ecd5c61717310ec4ff7d4d63d39755a9
3
+ size 15984
rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6d56d63613d02d9abc855988cac3009ddba2d488f312885fdcdac70798145e4
3
+ size 15984
rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25a53d531491a2d7bd9f21491b781454462391cec88b48c156683c9854a01eff
3
+ size 15984
rng_state_4.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9eaa5b76e4ba5e23b79468dbbd7ea5cdad23037532b651f51ccd4a4b5a96fc9f
3
+ size 15984
rng_state_5.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d2c95071adce2d21e49f781fe594986c0f9cd732f90345b72bc280cd22bd651
3
+ size 15984
rng_state_6.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be4c045403f43fce73abae229b7b9ca51e4953c5c028684c7a1445e99294532f
3
+ size 15984
rng_state_7.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e746515df1af11066084c97a0b2d90c0978b135c67129f890fb8f9062eb02089
3
+ size 15984
special_tokens_map.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<image>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ }
10
+ ],
11
+ "bos_token": {
12
+ "content": "<bos>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "eos_token": {
19
+ "content": "<eos>",
20
+ "lstrip": false,
21
+ "normalized": false,
22
+ "rstrip": false,
23
+ "single_word": false
24
+ },
25
+ "pad_token": {
26
+ "content": "<pad>",
27
+ "lstrip": false,
28
+ "normalized": false,
29
+ "rstrip": false,
30
+ "single_word": false
31
+ },
32
+ "unk_token": {
33
+ "content": "<unk>",
34
+ "lstrip": false,
35
+ "normalized": false,
36
+ "rstrip": false,
37
+ "single_word": false
38
+ }
39
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2523a63c898ebf0a32c7282a2e459ef2c950a846c5f3172305089e4149b6b6c3
3
+ size 36157680
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff
 
trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35012f067ff71727beaf7acafc3fd20a1696ffc176b4ae4d484dea60668c5017
3
+ size 7416
zero_to_fp32.py ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import json
25
+ from tqdm import tqdm
26
+ from collections import OrderedDict
27
+ from dataclasses import dataclass
28
+
29
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
30
+ # DeepSpeed data structures it has to be available in the current python environment.
31
+ from deepspeed.utils import logger
32
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
33
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
34
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
35
+
36
+
37
+ @dataclass
38
+ class zero_model_state:
39
+ buffers: dict()
40
+ param_shapes: dict()
41
+ shared_params: list
42
+ ds_version: int
43
+ frozen_param_shapes: dict()
44
+ frozen_param_fragments: dict()
45
+
46
+
47
+ debug = 0
48
+
49
+ # load to cpu
50
+ device = torch.device('cpu')
51
+
52
+
53
+ def atoi(text):
54
+ return int(text) if text.isdigit() else text
55
+
56
+
57
+ def natural_keys(text):
58
+ '''
59
+ alist.sort(key=natural_keys) sorts in human order
60
+ http://nedbatchelder.com/blog/200712/human_sorting.html
61
+ (See Toothy's implementation in the comments)
62
+ '''
63
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
64
+
65
+
66
+ def get_model_state_file(checkpoint_dir, zero_stage):
67
+ if not os.path.isdir(checkpoint_dir):
68
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
69
+
70
+ # there should be only one file
71
+ if zero_stage <= 2:
72
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
73
+ elif zero_stage == 3:
74
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
75
+
76
+ if not os.path.exists(file):
77
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
78
+
79
+ return file
80
+
81
+
82
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
83
+ # XXX: need to test that this simple glob rule works for multi-node setup too
84
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
85
+
86
+ if len(ckpt_files) == 0:
87
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
88
+
89
+ return ckpt_files
90
+
91
+
92
+ def get_optim_files(checkpoint_dir):
93
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
94
+
95
+
96
+ def get_model_state_files(checkpoint_dir):
97
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
98
+
99
+
100
+ def parse_model_states(files):
101
+ zero_model_states = []
102
+ for file in files:
103
+ state_dict = torch.load(file, map_location=device)
104
+
105
+ if BUFFER_NAMES not in state_dict:
106
+ raise ValueError(f"{file} is not a model state checkpoint")
107
+ buffer_names = state_dict[BUFFER_NAMES]
108
+ if debug:
109
+ print("Found buffers:", buffer_names)
110
+
111
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
112
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
113
+ param_shapes = state_dict[PARAM_SHAPES]
114
+
115
+ # collect parameters that are included in param_shapes
116
+ param_names = []
117
+ for s in param_shapes:
118
+ for name in s.keys():
119
+ param_names.append(name)
120
+
121
+ # update with frozen parameters
122
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
123
+ if frozen_param_shapes is not None:
124
+ if debug:
125
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
126
+ param_names += list(frozen_param_shapes.keys())
127
+
128
+ # handle shared params
129
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
130
+
131
+ ds_version = state_dict.get(DS_VERSION, None)
132
+
133
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
134
+
135
+ z_model_state = zero_model_state(buffers=buffers,
136
+ param_shapes=param_shapes,
137
+ shared_params=shared_params,
138
+ ds_version=ds_version,
139
+ frozen_param_shapes=frozen_param_shapes,
140
+ frozen_param_fragments=frozen_param_fragments)
141
+ zero_model_states.append(z_model_state)
142
+
143
+ return zero_model_states
144
+
145
+
146
+ def parse_optim_states(files, ds_checkpoint_dir):
147
+ total_files = len(files)
148
+ state_dicts = []
149
+ for f in files:
150
+ state_dict = torch.load(f, map_location=device)
151
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
152
+ # and also handle the case where it was already removed by another helper script
153
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
154
+ state_dicts.append(state_dict)
155
+
156
+ if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
157
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
158
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
159
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
160
+
161
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
162
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
163
+ # use the max of the partition_count to get the dp world_size.
164
+
165
+ if type(world_size) is list:
166
+ world_size = max(world_size)
167
+
168
+ if world_size != total_files:
169
+ raise ValueError(
170
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
171
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
172
+ )
173
+
174
+ # the groups are named differently in each stage
175
+ if zero_stage <= 2:
176
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
177
+ elif zero_stage == 3:
178
+ fp32_groups_key = FP32_FLAT_GROUPS
179
+ else:
180
+ raise ValueError(f"unknown zero stage {zero_stage}")
181
+
182
+ if zero_stage <= 2:
183
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
184
+ elif zero_stage == 3:
185
+ # if there is more than one param group, there will be multiple flattened tensors - one
186
+ # flattened tensor per group - for simplicity merge them into a single tensor
187
+ #
188
+ # XXX: could make the script more memory efficient for when there are multiple groups - it
189
+ # will require matching the sub-lists of param_shapes for each param group flattened tensor
190
+
191
+ fp32_flat_groups = [
192
+ torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
193
+ ]
194
+
195
+ return zero_stage, world_size, fp32_flat_groups
196
+
197
+
198
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
199
+ """
200
+ Returns fp32 state_dict reconstructed from ds checkpoint
201
+
202
+ Args:
203
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
204
+
205
+ """
206
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
207
+
208
+ optim_files = get_optim_files(ds_checkpoint_dir)
209
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
210
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
211
+
212
+ model_files = get_model_state_files(ds_checkpoint_dir)
213
+
214
+ zero_model_states = parse_model_states(model_files)
215
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
216
+
217
+ if zero_stage <= 2:
218
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
219
+ exclude_frozen_parameters)
220
+ elif zero_stage == 3:
221
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
222
+ exclude_frozen_parameters)
223
+
224
+
225
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
226
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
227
+ return
228
+
229
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
230
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
231
+
232
+ if debug:
233
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
234
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
235
+
236
+ wanted_params = len(frozen_param_shapes)
237
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
238
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
239
+ print(f'Frozen params: Have {avail_numel} numels to process.')
240
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
241
+
242
+ total_params = 0
243
+ total_numel = 0
244
+ for name, shape in frozen_param_shapes.items():
245
+ total_params += 1
246
+ unpartitioned_numel = shape.numel()
247
+ total_numel += unpartitioned_numel
248
+
249
+ state_dict[name] = frozen_param_fragments[name]
250
+
251
+ if debug:
252
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
253
+
254
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
255
+
256
+
257
+ def _has_callable(obj, fn):
258
+ attr = getattr(obj, fn, None)
259
+ return callable(attr)
260
+
261
+
262
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
263
+ param_shapes = zero_model_states[0].param_shapes
264
+
265
+ # Reconstruction protocol:
266
+ #
267
+ # XXX: document this
268
+
269
+ if debug:
270
+ for i in range(world_size):
271
+ for j in range(len(fp32_flat_groups[0])):
272
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
273
+
274
+ # XXX: memory usage doubles here (zero2)
275
+ num_param_groups = len(fp32_flat_groups[0])
276
+ merged_single_partition_of_fp32_groups = []
277
+ for i in range(num_param_groups):
278
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
279
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
280
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
281
+ avail_numel = sum(
282
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
283
+
284
+ if debug:
285
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
286
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
287
+ # not asserting if there is a mismatch due to possible padding
288
+ print(f"Have {avail_numel} numels to process.")
289
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
290
+
291
+ # params
292
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
293
+ # out-of-core computing solution
294
+ total_numel = 0
295
+ total_params = 0
296
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
297
+ offset = 0
298
+ avail_numel = full_single_fp32_vector.numel()
299
+ for name, shape in shapes.items():
300
+
301
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
302
+ total_numel += unpartitioned_numel
303
+ total_params += 1
304
+
305
+ if debug:
306
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
307
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
308
+ offset += unpartitioned_numel
309
+
310
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
311
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
312
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
313
+ # live optimizer object, so we are checking that the numbers are within the right range
314
+ align_to = 2 * world_size
315
+
316
+ def zero2_align(x):
317
+ return align_to * math.ceil(x / align_to)
318
+
319
+ if debug:
320
+ print(f"original offset={offset}, avail_numel={avail_numel}")
321
+
322
+ offset = zero2_align(offset)
323
+ avail_numel = zero2_align(avail_numel)
324
+
325
+ if debug:
326
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
327
+
328
+ # Sanity check
329
+ if offset != avail_numel:
330
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
331
+
332
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
333
+
334
+
335
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
336
+ exclude_frozen_parameters):
337
+ state_dict = OrderedDict()
338
+
339
+ # buffers
340
+ buffers = zero_model_states[0].buffers
341
+ state_dict.update(buffers)
342
+ if debug:
343
+ print(f"added {len(buffers)} buffers")
344
+
345
+ if not exclude_frozen_parameters:
346
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
347
+
348
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
349
+
350
+ # recover shared parameters
351
+ for pair in zero_model_states[0].shared_params:
352
+ if pair[1] in state_dict:
353
+ state_dict[pair[0]] = state_dict[pair[1]]
354
+
355
+ return state_dict
356
+
357
+
358
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
359
+ remainder = unpartitioned_numel % world_size
360
+ padding_numel = (world_size - remainder) if remainder else 0
361
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
362
+ return partitioned_numel, padding_numel
363
+
364
+
365
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
366
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
367
+ return
368
+
369
+ if debug:
370
+ for i in range(world_size):
371
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
372
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
373
+
374
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
375
+ wanted_params = len(frozen_param_shapes)
376
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
377
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
378
+ print(f'Frozen params: Have {avail_numel} numels to process.')
379
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
380
+
381
+ total_params = 0
382
+ total_numel = 0
383
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
384
+ total_params += 1
385
+ unpartitioned_numel = shape.numel()
386
+ total_numel += unpartitioned_numel
387
+
388
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
389
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
390
+
391
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
392
+
393
+ if debug:
394
+ print(
395
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
396
+ )
397
+
398
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
399
+
400
+
401
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
402
+ param_shapes = zero_model_states[0].param_shapes
403
+ avail_numel = fp32_flat_groups[0].numel() * world_size
404
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
405
+ # param, re-consolidating each param, while dealing with padding if any
406
+
407
+ # merge list of dicts, preserving order
408
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
409
+
410
+ if debug:
411
+ for i in range(world_size):
412
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
413
+
414
+ wanted_params = len(param_shapes)
415
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
416
+ # not asserting if there is a mismatch due to possible padding
417
+ avail_numel = fp32_flat_groups[0].numel() * world_size
418
+ print(f"Trainable params: Have {avail_numel} numels to process.")
419
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
420
+
421
+ # params
422
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
423
+ # out-of-core computing solution
424
+ offset = 0
425
+ total_numel = 0
426
+ total_params = 0
427
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering Sharded Weights'):
428
+ unpartitioned_numel = shape.numel()
429
+ total_numel += unpartitioned_numel
430
+ total_params += 1
431
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
432
+
433
+ if debug:
434
+ print(
435
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
436
+ )
437
+
438
+ # XXX: memory usage doubles here
439
+ state_dict[name] = torch.cat(
440
+ tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
441
+ 0).narrow(0, 0, unpartitioned_numel).view(shape)
442
+ offset += partitioned_numel
443
+
444
+ offset *= world_size
445
+
446
+ # Sanity check
447
+ if offset != avail_numel:
448
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
449
+
450
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
451
+
452
+
453
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
454
+ exclude_frozen_parameters):
455
+ state_dict = OrderedDict()
456
+
457
+ # buffers
458
+ buffers = zero_model_states[0].buffers
459
+ state_dict.update(buffers)
460
+ if debug:
461
+ print(f"added {len(buffers)} buffers")
462
+
463
+ if not exclude_frozen_parameters:
464
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
465
+
466
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
467
+
468
+ # recover shared parameters
469
+ for pair in zero_model_states[0].shared_params:
470
+ if pair[1] in state_dict:
471
+ state_dict[pair[0]] = state_dict[pair[1]]
472
+
473
+ return state_dict
474
+
475
+
476
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None, exclude_frozen_parameters=False):
477
+ """
478
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
479
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
480
+ via a model hub.
481
+
482
+ Args:
483
+ - ``checkpoint_dir``: path to the desired checkpoint folder
484
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
485
+ - ``exclude_frozen_parameters``: exclude frozen parameters
486
+
487
+ Returns:
488
+ - pytorch ``state_dict``
489
+
490
+ Note: this approach may not work if your application doesn't have sufficient free CPU memory and
491
+ you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
492
+ the checkpoint.
493
+
494
+ A typical usage might be ::
495
+
496
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
497
+ # do the training and checkpoint saving
498
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
499
+ model = model.cpu() # move to cpu
500
+ model.load_state_dict(state_dict)
501
+ # submit to model hub or save the model to share with others
502
+
503
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
504
+ application. i.e. you will need to re-initialize the deepspeed engine, since
505
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
506
+
507
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
508
+
509
+ """
510
+ if tag is None:
511
+ latest_path = os.path.join(checkpoint_dir, 'latest')
512
+ if os.path.isfile(latest_path):
513
+ with open(latest_path, 'r') as fd:
514
+ tag = fd.read().strip()
515
+ else:
516
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
517
+
518
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
519
+
520
+ if not os.path.isdir(ds_checkpoint_dir):
521
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
522
+
523
+ return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
524
+
525
+
526
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
527
+ output_dir,
528
+ max_shard_size="5GB",
529
+ safe_serialization=False,
530
+ tag=None,
531
+ exclude_frozen_parameters=False):
532
+ """
533
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
534
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
535
+
536
+ Args:
537
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
538
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
539
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
540
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
541
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
542
+ - ``exclude_frozen_parameters``: exclude frozen parameters
543
+ """
544
+ # Dependency pre-check
545
+ if safe_serialization:
546
+ try:
547
+ from safetensors.torch import save_file
548
+ except ImportError:
549
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
550
+ raise
551
+ if max_shard_size is not None:
552
+ try:
553
+ from huggingface_hub import split_torch_state_dict_into_shards
554
+ except ImportError:
555
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
556
+ raise
557
+
558
+ # Convert zero checkpoint to state_dict
559
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag, exclude_frozen_parameters)
560
+
561
+ # Shard the model if it is too big.
562
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
563
+ if max_shard_size is not None:
564
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
565
+ state_dict_split = split_torch_state_dict_into_shards(state_dict,
566
+ filename_pattern=filename_pattern,
567
+ max_shard_size=max_shard_size)
568
+ else:
569
+ from collections import namedtuple
570
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
571
+ state_dict_split = StateDictSplit(is_sharded=False,
572
+ filename_to_tensors={weights_name: list(state_dict.keys())})
573
+
574
+ # Save the model
575
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
576
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
577
+ shard = {tensor: state_dict[tensor].contiguous() for tensor in tensors}
578
+ output_path = os.path.join(output_dir, shard_file)
579
+ if safe_serialization:
580
+ save_file(shard, output_path, metadata={"format": "pt"})
581
+ else:
582
+ torch.save(shard, output_path)
583
+
584
+ # Save index if sharded
585
+ if state_dict_split.is_sharded:
586
+ index = {
587
+ "metadata": state_dict_split.metadata,
588
+ "weight_map": state_dict_split.tensor_to_filename,
589
+ }
590
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
591
+ save_index_file = os.path.join(output_dir, save_index_file)
592
+ with open(save_index_file, "w", encoding="utf-8") as f:
593
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
594
+ f.write(content)
595
+
596
+
597
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
598
+ """
599
+ 1. Put the provided model to cpu
600
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
601
+ 3. Load it into the provided model
602
+
603
+ Args:
604
+ - ``model``: the model object to update
605
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
606
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
607
+
608
+ Returns:
609
+ - ``model`: modified model
610
+
611
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
612
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
613
+ conveniently placed for you in the checkpoint folder.
614
+
615
+ A typical usage might be ::
616
+
617
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
618
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
619
+ # submit to model hub or save the model to share with others
620
+
621
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
622
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
623
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
624
+
625
+ """
626
+ logger.info(f"Extracting fp32 weights")
627
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
628
+
629
+ logger.info(f"Overwriting model with fp32 weights")
630
+ model = model.cpu()
631
+ model.load_state_dict(state_dict, strict=False)
632
+
633
+ return model
634
+
635
+
636
+ if __name__ == "__main__":
637
+ parser = argparse.ArgumentParser()
638
+ parser.add_argument("checkpoint_dir",
639
+ type=str,
640
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
641
+ parser.add_argument("output_dir",
642
+ type=str,
643
+ help="directory to the pytorch fp32 state_dict output files"
644
+ "(e.g. path/checkpoint-12-output/)")
645
+ parser.add_argument(
646
+ "--max_shard_size",
647
+ type=str,
648
+ default="5GB",
649
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
650
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
651
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
652
+ "without CPU OOM issues.")
653
+ parser.add_argument(
654
+ "--safe_serialization",
655
+ default=False,
656
+ action='store_true',
657
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
658
+ parser.add_argument("-t",
659
+ "--tag",
660
+ type=str,
661
+ default=None,
662
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
663
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
664
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
665
+ args = parser.parse_args()
666
+
667
+ debug = args.debug
668
+
669
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
670
+ args.output_dir,
671
+ max_shard_size=args.max_shard_size,
672
+ safe_serialization=args.safe_serialization,
673
+ tag=args.tag,
674
+ exclude_frozen_parameters=args.exclude_frozen_parameters)