code-loader 1.0.112.dev3__py3-none-any.whl → 1.0.112.dev5__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.
Potentially problematic release.
This version of code-loader might be problematic. Click here for more details.
- code_loader/inner_leap_binder/leapbinder_decorators.py +9 -2
- code_loader/utils.py +3 -1
- {code_loader-1.0.112.dev3.dist-info → code_loader-1.0.112.dev5.dist-info}/METADATA +1 -1
- {code_loader-1.0.112.dev3.dist-info → code_loader-1.0.112.dev5.dist-info}/RECORD +6 -6
- {code_loader-1.0.112.dev3.dist-info → code_loader-1.0.112.dev5.dist-info}/LICENSE +0 -0
- {code_loader-1.0.112.dev3.dist-info → code_loader-1.0.112.dev5.dist-info}/WHEEL +0 -0
|
@@ -578,11 +578,18 @@ def tensorleap_instances_masks_encoder(name: str):
|
|
|
578
578
|
(f'tensorleap_instances_masks_encoder validation failed: '
|
|
579
579
|
f'Argument sample_id should be as the same type as defined in the preprocess response '
|
|
580
580
|
f'{preprocess_response.sample_id_type}. Got {type(sample_id)}.')
|
|
581
|
+
assert isinstance(instance_id, str), \
|
|
582
|
+
(f'tensorleap_instances_masks_encoder validation failed: '
|
|
583
|
+
f'Argument instance_id should be str. Got {type(sample_id)}.')
|
|
584
|
+
assert type(instance_id) == preprocess_response.sample_id_type, \
|
|
585
|
+
(f'tensorleap_instances_masks_encoder validation failed: '
|
|
586
|
+
f'Argument instance_id should be as the same type as defined in the preprocess response '
|
|
587
|
+
f'{preprocess_response.sample_id_type}. Got {type(instance_id)}.')
|
|
581
588
|
|
|
582
589
|
def _validate_result(result):
|
|
583
|
-
assert isinstance(result, ElementInstance), \
|
|
590
|
+
assert isinstance(result, ElementInstance) or (result is None), \
|
|
584
591
|
(f'tensorleap_instances_masks_encoder validation failed: '
|
|
585
|
-
f'Unsupported return type. Should be a ElementInstance. Got {type(result)}.')
|
|
592
|
+
f'Unsupported return type. Should be a ElementInstance or None. Got {type(result)}.')
|
|
586
593
|
|
|
587
594
|
def inner_without_validate(sample_id, preprocess_response, instance_id):
|
|
588
595
|
global _called_from_inside_tl_decorator
|
code_loader/utils.py
CHANGED
|
@@ -19,8 +19,10 @@ def to_numpy_return_wrapper(encoder_function: SectionCallableInterface) -> Secti
|
|
|
19
19
|
return numpy_encoder_function
|
|
20
20
|
|
|
21
21
|
def to_numpy_return_masks_wrapper(encoder_function: InstanceCallableInterface) -> InstanceCallableInterface:
|
|
22
|
-
def numpy_encoder_function(idx: Union[int, str], samples: PreprocessResponse, element_idx: Union[int, str]) -> ElementInstance:
|
|
22
|
+
def numpy_encoder_function(idx: Union[int, str], samples: PreprocessResponse, element_idx: Union[int, str]) -> Union[ElementInstance, None]:
|
|
23
23
|
result = encoder_function(idx, samples, element_idx)
|
|
24
|
+
if result is None:
|
|
25
|
+
return None
|
|
24
26
|
result.mask = np.array(result.mask)
|
|
25
27
|
return result
|
|
26
28
|
return numpy_encoder_function
|
|
@@ -21,16 +21,16 @@ code_loader/experiment_api/utils.py,sha256=XZHtxge12TS4H4-8PjV3sKuhp8Ud6ojAiIzTZ
|
|
|
21
21
|
code_loader/experiment_api/workingspace_config_utils.py,sha256=DLzXQCg4dgTV_YgaSbeTVzq-2ja_SQw4zi7LXwKL9cY,990
|
|
22
22
|
code_loader/inner_leap_binder/__init__.py,sha256=koOlJyMNYzGbEsoIbXathSmQ-L38N_pEXH_HvL7beXU,99
|
|
23
23
|
code_loader/inner_leap_binder/leapbinder.py,sha256=0iHVHxC2NjfH7F0vQFVGy1e0llgKEyUHUHh3DdtqL70,32602
|
|
24
|
-
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=
|
|
24
|
+
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=0-K898pyrt7B9ziHV5npL6vcyydVoC-lSRnnczn6UMw,43460
|
|
25
25
|
code_loader/leaploader.py,sha256=nIrUtK7n8is1MiaHS5T6io3P64brc1we5IxI4EPRqSs,29387
|
|
26
26
|
code_loader/leaploaderbase.py,sha256=gvNP_MPjG3Ey8TB-efQI2s_gcGRXKlP1-qFDwOT80Mc,4510
|
|
27
27
|
code_loader/plot_functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
code_loader/plot_functions/plot_functions.py,sha256=xg6Gi4myTN9crq6JtyrhYI38HLXjPVJcbnI7CIy8f7w,14625
|
|
29
29
|
code_loader/plot_functions/visualize.py,sha256=gsBAYYkwMh7jIpJeDMPS8G4CW-pxwx6LznoQIvi4vpo,657
|
|
30
|
-
code_loader/utils.py,sha256=
|
|
30
|
+
code_loader/utils.py,sha256=i1KOchLkieHfaVz6YskSIfKA45HcqAmGAK1F2Kcg38c,2724
|
|
31
31
|
code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
code_loader/visualizers/default_visualizers.py,sha256=onRnLE_TXfgLN4o52hQIOOhUcFexGlqJ3xSpQDVLuZM,2604
|
|
33
|
-
code_loader-1.0.112.
|
|
34
|
-
code_loader-1.0.112.
|
|
35
|
-
code_loader-1.0.112.
|
|
36
|
-
code_loader-1.0.112.
|
|
33
|
+
code_loader-1.0.112.dev5.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
|
34
|
+
code_loader-1.0.112.dev5.dist-info/METADATA,sha256=TLGeV1X6meziLDhwMSTZqXxzb_QsiotZQAlEefCxf90,906
|
|
35
|
+
code_loader-1.0.112.dev5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
36
|
+
code_loader-1.0.112.dev5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|