code-loader 1.0.208.dev3__py3-none-any.whl → 1.0.208.dev4__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/inner_leap_binder/leapbinder_decorators.py +3 -0
- code_loader/leaploader.py +14 -0
- {code_loader-1.0.208.dev3.dist-info → code_loader-1.0.208.dev4.dist-info}/METADATA +1 -1
- {code_loader-1.0.208.dev3.dist-info → code_loader-1.0.208.dev4.dist-info}/RECORD +6 -6
- {code_loader-1.0.208.dev3.dist-info → code_loader-1.0.208.dev4.dist-info}/LICENSE +0 -0
- {code_loader-1.0.208.dev3.dist-info → code_loader-1.0.208.dev4.dist-info}/WHEEL +0 -0
|
@@ -1937,6 +1937,9 @@ def _decorate_model_latent_space(user_function, ls_name, use_ls_for_analysis, re
|
|
|
1937
1937
|
arg_names = _model_latent_space_arg_names(user_function)
|
|
1938
1938
|
|
|
1939
1939
|
def _validate_input_args(*args, **kwargs):
|
|
1940
|
+
# Every bound argument must be an array: a ground truth is never passed as None, so a
|
|
1941
|
+
# model-computed LS cannot fall back from ground truth to predictions on unlabeled rows.
|
|
1942
|
+
# The engine skips the LS for those rows instead (see leaploader._check_model_latent_spaces).
|
|
1940
1943
|
assert len(args) + len(kwargs) > 0, (
|
|
1941
1944
|
f"tensorleap_custom_latent_space validation failed: '{user_function.__name__}' is "
|
|
1942
1945
|
f"model-computed and expects at least one np.ndarray argument, but received none.")
|
code_loader/leaploader.py
CHANGED
|
@@ -18,6 +18,7 @@ from code_loader.contract.datasetclasses import DatasetSample, DatasetBaseHandle
|
|
|
18
18
|
MetricCallableReturnType, CustomLossHandlerData, CustomLossHandler, RawInputsForHeatmap, SamplePreprocessResponse, \
|
|
19
19
|
ElementInstance, custom_latent_space_attribute, DatasetIntegrationSetup, InstanceMetricHandler, _simulation_context
|
|
20
20
|
from code_loader.contract.enums import DataStateEnum, TestingSectionEnum, DataStateType, DatasetMetadataType
|
|
21
|
+
from code_loader.contract.mapping import NodeMappingType
|
|
21
22
|
from code_loader.contract.exceptions import DatasetScriptException
|
|
22
23
|
from code_loader.contract.responsedataclasses import DatasetIntegParseResult, DatasetTestResultPayload, \
|
|
23
24
|
DatasetPreprocess, DatasetSetup, DatasetInputInstance, DatasetOutputInstance, DatasetMetadataInstance, \
|
|
@@ -450,6 +451,19 @@ class LeapLoader(LeapLoaderBase):
|
|
|
450
451
|
f"grouped preprocess response (grouped: {grouped_states}). Use the "
|
|
451
452
|
f"(sample_id, preprocess: PreprocessResponse) form instead."
|
|
452
453
|
)
|
|
454
|
+
if global_leap_binder.setup_container.unlabeled_data_preprocess is not None:
|
|
455
|
+
gt_bound_names = [
|
|
456
|
+
connection.node.name for connection in global_leap_binder.latent_space_connections
|
|
457
|
+
if any(node_input.type == NodeMappingType.GroundTruth
|
|
458
|
+
for node_input in (connection.node_inputs or {}).values())
|
|
459
|
+
]
|
|
460
|
+
if gt_bound_names:
|
|
461
|
+
test_result.display[TestingSectionEnum.Warnings.name] = (
|
|
462
|
+
f"Model-computed custom latent space(s) {gt_bound_names} read a ground truth, so "
|
|
463
|
+
f"they are skipped for unlabeled samples, which will have no vector in them. A "
|
|
464
|
+
f"latent space cannot fall back from ground truth to predictions; to cover "
|
|
465
|
+
f"unlabeled samples, add one bound only to model predictions."
|
|
466
|
+
)
|
|
453
467
|
return test_result
|
|
454
468
|
|
|
455
469
|
def _check_instance_custom_latent_spaces(self) -> Optional[DatasetTestResultPayload]:
|
|
@@ -22,8 +22,8 @@ code_loader/experiment_api/utils.py,sha256=XZHtxge12TS4H4-8PjV3sKuhp8Ud6ojAiIzTZ
|
|
|
22
22
|
code_loader/experiment_api/workingspace_config_utils.py,sha256=DLzXQCg4dgTV_YgaSbeTVzq-2ja_SQw4zi7LXwKL9cY,990
|
|
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=j6oa6oyM04scUCmyFKB80E0MTYDBDUcF9cwiyJTj5oQ,63134
|
|
25
|
-
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=
|
|
26
|
-
code_loader/leaploader.py,sha256=
|
|
25
|
+
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=F3O6OhbMQmoa_xqNq1kjhDgKiztMr7qoclbS0jzCWp8,206886
|
|
26
|
+
code_loader/leaploader.py,sha256=TiO5SrRtO6SevydmYlEZFHnU-88GDSG9m7TJyeIIXjI,97060
|
|
27
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
|
|
@@ -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.dev4.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
|
36
|
+
code_loader-1.0.208.dev4.dist-info/METADATA,sha256=_-4N2MXSRMXO72SbEk1kwM9UvIgKurn6cnweyPrKmCU,1095
|
|
37
|
+
code_loader-1.0.208.dev4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
38
|
+
code_loader-1.0.208.dev4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|