imt-ring 1.3.11__py3-none-any.whl → 1.3.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {imt_ring-1.3.11.dist-info → imt_ring-1.3.13.dist-info}/METADATA +1 -1
- {imt_ring-1.3.11.dist-info → imt_ring-1.3.13.dist-info}/RECORD +5 -5
- ring/algorithms/generator/batch.py +14 -12
- {imt_ring-1.3.11.dist-info → imt_ring-1.3.13.dist-info}/WHEEL +0 -0
- {imt_ring-1.3.11.dist-info → imt_ring-1.3.13.dist-info}/top_level.txt +0 -0
@@ -15,7 +15,7 @@ ring/algorithms/custom_joints/rr_joint.py,sha256=jnRtjtOCALMaq2_0bcu2d7qgfQ6etXp
|
|
15
15
|
ring/algorithms/custom_joints/suntay.py,sha256=7-kym1kMDwqYD_2um1roGcBeB8BlTCPe1wljuNGNARA,16676
|
16
16
|
ring/algorithms/generator/__init__.py,sha256=p4ucl0zQtp5NwNoXIRjmTzGGRu2WOAWFfNmYRPwQles,912
|
17
17
|
ring/algorithms/generator/base.py,sha256=sr-YZkjd8pZJAI5vFG_IqOO4AEeiEYtXr8uUsPMS6Q4,14779
|
18
|
-
ring/algorithms/generator/batch.py,sha256=
|
18
|
+
ring/algorithms/generator/batch.py,sha256=MmnvAeMaHowGZjla7djQeER6YwXvFesLdP__FMosUqo,9385
|
19
19
|
ring/algorithms/generator/motion_artifacts.py,sha256=_kiAl1VHoX1fW5AUlXOtPBWyHIIFof_M78AP-m9f1ME,8790
|
20
20
|
ring/algorithms/generator/pd_control.py,sha256=XJ_Gd5AkIRh-jBrMfQyMXjVwhx2gCNHznjzFbmAwhZs,5767
|
21
21
|
ring/algorithms/generator/randomize.py,sha256=G_vBIo0OwQkXL2u0djwbaoaeb02C4LQCTNNloOYIU2M,3699
|
@@ -79,7 +79,7 @@ ring/utils/hdf5.py,sha256=BzXwVypZmEZeHVgeGZ78YYdi10NEQtnPhdrb8dQAXo0,5856
|
|
79
79
|
ring/utils/normalizer.py,sha256=67L2BU1MRsMT4pD41ta3JJMppLN0ozFmnwrmXDtnqrQ,1698
|
80
80
|
ring/utils/path.py,sha256=hAfSlqRi-ew536RnjDDM7IKapdMJc-EvhrR0Y-BCFWc,1265
|
81
81
|
ring/utils/utils.py,sha256=mIcKNv5v2de8HrG7bAhl2bNfmwkMZyIIwFkJq2XWMOI,5357
|
82
|
-
imt_ring-1.3.
|
83
|
-
imt_ring-1.3.
|
84
|
-
imt_ring-1.3.
|
85
|
-
imt_ring-1.3.
|
82
|
+
imt_ring-1.3.13.dist-info/METADATA,sha256=29lL2WaS8JaByX0qyjVm-OMC916Xs8U1A7pRyybHSrA,3105
|
83
|
+
imt_ring-1.3.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
84
|
+
imt_ring-1.3.13.dist-info/top_level.txt,sha256=EiT790-lAyi8iwTzJArH3f2k77rwhDn00q-4PlmvDQo,5
|
85
|
+
imt_ring-1.3.13.dist-info/RECORD,,
|
@@ -98,7 +98,12 @@ def batch_generators_eager_to_list(
|
|
98
98
|
jit = True if n_calls > 1 else False
|
99
99
|
gen_jit = batch_generators_lazy(gen, size, jit=jit)
|
100
100
|
|
101
|
-
for _ in
|
101
|
+
for _ in tqdm(
|
102
|
+
range(n_calls),
|
103
|
+
desc="number of calls for each generator",
|
104
|
+
total=n_calls,
|
105
|
+
leave=False,
|
106
|
+
):
|
102
107
|
key, consume = jax.random.split(key)
|
103
108
|
sample = gen_jit(consume)
|
104
109
|
# converts also to numpy; but with np.array.flags.writeable = False
|
@@ -149,25 +154,20 @@ def _data_fn_from_paths(
|
|
149
154
|
|
150
155
|
# expanduser
|
151
156
|
paths = [utils.parse_path(p, mkdir=False) for p in paths]
|
152
|
-
|
153
157
|
extensions = list(set([Path(p).suffix for p in paths]))
|
154
158
|
assert len(extensions) == 1, f"{extensions}"
|
159
|
+
h5 = extensions[0] == ".h5"
|
155
160
|
|
156
|
-
if
|
157
|
-
N = sum([utils.hdf5_load_length(p) for p in paths])
|
158
|
-
|
159
|
-
if extensions[0] == ".h5" and not load_all_into_memory:
|
161
|
+
if h5 and not load_all_into_memory:
|
160
162
|
|
161
163
|
def data_fn(indices: list[int]):
|
162
164
|
tree = utils.hdf5_load_from_multiple(paths, indices)
|
163
165
|
return tree if tree_transform is None else tree_transform(tree)
|
164
166
|
|
167
|
+
N = sum([utils.hdf5_load_length(p) for p in paths])
|
165
168
|
else:
|
166
169
|
|
167
|
-
if
|
168
|
-
load_from_path = utils.hdf5_load
|
169
|
-
else:
|
170
|
-
load_from_path = utils.pickle_load
|
170
|
+
load_from_path = utils.hdf5_load if h5 else utils.pickle_load
|
171
171
|
|
172
172
|
def load_fn(path):
|
173
173
|
tree = load_from_path(path)
|
@@ -185,8 +185,10 @@ def _data_fn_from_paths(
|
|
185
185
|
_list_of_data += load_fn(p)
|
186
186
|
|
187
187
|
N = len(_list_of_data)
|
188
|
-
|
189
|
-
|
188
|
+
list_of_data = _replace_elements_w_nans(
|
189
|
+
_list_of_data,
|
190
|
+
include_samples if include_samples is not None else list(range(N)),
|
191
|
+
)
|
190
192
|
|
191
193
|
if include_samples is not None:
|
192
194
|
list_of_data = [
|
File without changes
|
File without changes
|