code-loader 1.0.208.dev1__py3-none-any.whl → 1.0.208.dev2__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.
- code_loader/leaploader.py +7 -2
- code_loader/leaploaderbase.py +5 -0
- {code_loader-1.0.208.dev1.dist-info → code_loader-1.0.208.dev2.dist-info}/METADATA +1 -1
- {code_loader-1.0.208.dev1.dist-info → code_loader-1.0.208.dev2.dist-info}/RECORD +6 -6
- {code_loader-1.0.208.dev1.dist-info → code_loader-1.0.208.dev2.dist-info}/LICENSE +0 -0
- {code_loader-1.0.208.dev1.dist-info → code_loader-1.0.208.dev2.dist-info}/WHEEL +0 -0
code_loader/leaploader.py
CHANGED
|
@@ -1470,19 +1470,24 @@ class LeapLoader(LeapLoaderBase):
|
|
|
1470
1470
|
if handler.computed_at == 'model')
|
|
1471
1471
|
|
|
1472
1472
|
@lru_cache()
|
|
1473
|
-
def
|
|
1473
|
+
def get_custom_latent_space_specs(self) -> Dict[str, Dict[str, Any]]:
|
|
1474
1474
|
self.exec_script()
|
|
1475
1475
|
return {
|
|
1476
1476
|
name: {
|
|
1477
|
+
'computed_at': handler.computed_at,
|
|
1477
1478
|
'arg_names': list(handler.arg_names or []),
|
|
1478
1479
|
'reduce': handler.reduce.value if handler.reduce is not None else None,
|
|
1479
1480
|
'n_components': handler.n_components,
|
|
1480
1481
|
'channel_axis': handler.channel_axis,
|
|
1481
1482
|
}
|
|
1482
1483
|
for name, handler in global_leap_binder.setup_container.custom_latent_spaces.items()
|
|
1483
|
-
if handler.computed_at == 'model'
|
|
1484
1484
|
}
|
|
1485
1485
|
|
|
1486
|
+
@lru_cache()
|
|
1487
|
+
def get_model_latent_space_specs(self) -> Dict[str, Dict[str, Any]]:
|
|
1488
|
+
return {name: spec for name, spec in self.get_custom_latent_space_specs().items()
|
|
1489
|
+
if spec['computed_at'] == 'model'}
|
|
1490
|
+
|
|
1486
1491
|
def run_model_latent_space(self, ls_name: str, sample_ids: np.array, state: DataStateEnum,
|
|
1487
1492
|
input_tensors_by_arg_name: Dict[str, npt.NDArray[np.float32]]
|
|
1488
1493
|
) -> npt.NDArray[np.float32]:
|
code_loader/leaploaderbase.py
CHANGED
|
@@ -239,6 +239,11 @@ class LeapLoaderBase:
|
|
|
239
239
|
raise NotImplementedError(f'{type(self).__name__} does not implement '
|
|
240
240
|
'get_model_custom_latent_space_names.')
|
|
241
241
|
|
|
242
|
+
@abstractmethod
|
|
243
|
+
def get_custom_latent_space_specs(self) -> Dict[str, Dict[str, Any]]:
|
|
244
|
+
raise NotImplementedError(f'{type(self).__name__} does not implement '
|
|
245
|
+
'get_custom_latent_space_specs.')
|
|
246
|
+
|
|
242
247
|
@abstractmethod
|
|
243
248
|
def get_model_latent_space_specs(self) -> Dict[str, Dict[str, Any]]:
|
|
244
249
|
raise NotImplementedError(f'{type(self).__name__} does not implement '
|
|
@@ -23,8 +23,8 @@ code_loader/experiment_api/workingspace_config_utils.py,sha256=DLzXQCg4dgTV_YgaS
|
|
|
23
23
|
code_loader/inner_leap_binder/__init__.py,sha256=koOlJyMNYzGbEsoIbXathSmQ-L38N_pEXH_HvL7beXU,99
|
|
24
24
|
code_loader/inner_leap_binder/leapbinder.py,sha256=J5rWu8caFNkH3I4J9jkIoWimV188jhI1XBV6-b1thmc,63883
|
|
25
25
|
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=fAoXt1N9zUI6wqCk5NyuPQJBhO0ZtOFIyM36OiA5XJ8,206593
|
|
26
|
-
code_loader/leaploader.py,sha256=
|
|
27
|
-
code_loader/leaploaderbase.py,sha256=
|
|
26
|
+
code_loader/leaploader.py,sha256=xC7oT_2VV2VhhCzBb1J27nQrRAGcJwq04eypatENOz8,96115
|
|
27
|
+
code_loader/leaploaderbase.py,sha256=cQwlJdx_tLJXMxTq8AURsFpyF0s3jpqkWaF5i1r8hSE,12601
|
|
28
28
|
code_loader/mixpanel_tracker.py,sha256=rNwRmFifNbdUoqLQvvhhgpKczWpWiEmd8MfyJe27sxw,9131
|
|
29
29
|
code_loader/plot_functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
30
|
code_loader/plot_functions/plot_functions.py,sha256=2DC-zlVaN13P4VNx5d8csgs80C6SisaeP1-Kq2LW7iM,16075
|
|
@@ -32,7 +32,7 @@ code_loader/plot_functions/visualize.py,sha256=gsBAYYkwMh7jIpJeDMPS8G4CW-pxwx6Lz
|
|
|
32
32
|
code_loader/utils.py,sha256=Auw39lKpEQ7Ld2q1nj6S18GIDKWcjCxU0TDrur2UEko,11968
|
|
33
33
|
code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
code_loader/visualizers/default_visualizers.py,sha256=grTPin_lCE9aci8i8CqA7DqQwAyXRB7_EamA3na_pls,5438
|
|
35
|
-
code_loader-1.0.208.
|
|
36
|
-
code_loader-1.0.208.
|
|
37
|
-
code_loader-1.0.208.
|
|
38
|
-
code_loader-1.0.208.
|
|
35
|
+
code_loader-1.0.208.dev2.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
|
36
|
+
code_loader-1.0.208.dev2.dist-info/METADATA,sha256=ulblLxbtI_9XysKt7SoceD1jVjbigogLaz6bwsOXE88,1095
|
|
37
|
+
code_loader-1.0.208.dev2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
38
|
+
code_loader-1.0.208.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|