code-loader 1.0.75__py3-none-any.whl → 1.0.76__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 +14 -10
- {code_loader-1.0.75.dist-info → code_loader-1.0.76.dist-info}/METADATA +1 -1
- {code_loader-1.0.75.dist-info → code_loader-1.0.76.dist-info}/RECORD +5 -5
- {code_loader-1.0.75.dist-info → code_loader-1.0.76.dist-info}/LICENSE +0 -0
- {code_loader-1.0.75.dist-info → code_loader-1.0.76.dist-info}/WHEEL +0 -0
@@ -30,8 +30,9 @@ def tensorleap_custom_metric(name: str,
|
|
30
30
|
|
31
31
|
def _validate_input_args(*args, **kwargs) -> None:
|
32
32
|
for i, arg in enumerate(args):
|
33
|
-
assert isinstance(arg, (np.ndarray, SamplePreprocessResponse)), (
|
34
|
-
|
33
|
+
assert isinstance(arg, (np.ndarray, SamplePreprocessResponse)), (
|
34
|
+
f'tensorleap_custom_metric validation failed: '
|
35
|
+
f'Argument #{i} should be a numpy array. Got {type(arg)}.')
|
35
36
|
if leap_binder.batch_size_to_validate and isinstance(arg, np.ndarray):
|
36
37
|
assert arg.shape[0] == leap_binder.batch_size_to_validate, \
|
37
38
|
(f'tensorleap_custom_metric validation failed: Argument #{i} '
|
@@ -39,8 +40,9 @@ def tensorleap_custom_metric(name: str,
|
|
39
40
|
f'instead of {leap_binder.batch_size_to_validate}')
|
40
41
|
|
41
42
|
for _arg_name, arg in kwargs.items():
|
42
|
-
assert isinstance(arg, (np.ndarray, SamplePreprocessResponse)), (
|
43
|
-
|
43
|
+
assert isinstance(arg, (np.ndarray, SamplePreprocessResponse)), (
|
44
|
+
f'tensorleap_custom_metric validation failed: '
|
45
|
+
f'Argument {_arg_name} should be a numpy array. Got {type(arg)}.')
|
44
46
|
if leap_binder.batch_size_to_validate and isinstance(arg, np.ndarray):
|
45
47
|
assert arg.shape[0] == leap_binder.batch_size_to_validate, \
|
46
48
|
(f'tensorleap_custom_metric validation failed: Argument {_arg_name} '
|
@@ -58,8 +60,8 @@ def tensorleap_custom_metric(name: str,
|
|
58
60
|
assert isinstance(single_metric_result[0][0], ConfusionMatrixElement), \
|
59
61
|
f'{supported_types_message}Got List[List[{type(single_metric_result[0][0])}]].'
|
60
62
|
else:
|
61
|
-
assert isinstance(single_metric_result[0],
|
62
|
-
|
63
|
+
assert isinstance(single_metric_result[0], (
|
64
|
+
float, int, type(None))), f'{supported_types_message}Got List[{type(single_metric_result[0])}].'
|
63
65
|
else:
|
64
66
|
assert isinstance(single_metric_result,
|
65
67
|
np.ndarray), f'{supported_types_message}Got {type(single_metric_result)}.'
|
@@ -115,16 +117,18 @@ def tensorleap_custom_visualizer(name: str, visualizer_type: LeapDataType,
|
|
115
117
|
|
116
118
|
def _validate_input_args(*args, **kwargs):
|
117
119
|
for i, arg in enumerate(args):
|
118
|
-
assert isinstance(arg, (np.ndarray, SamplePreprocessResponse)), (
|
119
|
-
|
120
|
+
assert isinstance(arg, (np.ndarray, SamplePreprocessResponse)), (
|
121
|
+
f'tensorleap_custom_visualizer validation failed: '
|
122
|
+
f'Argument #{i} should be a numpy array. Got {type(arg)}.')
|
120
123
|
if leap_binder.batch_size_to_validate and isinstance(arg, np.ndarray):
|
121
124
|
assert arg.shape[0] != leap_binder.batch_size_to_validate, \
|
122
125
|
(f'tensorleap_custom_visualizer validation failed: '
|
123
126
|
f'Argument #{i} should be without batch dimension. ')
|
124
127
|
|
125
128
|
for _arg_name, arg in kwargs.items():
|
126
|
-
assert isinstance(arg, (np.ndarray, SamplePreprocessResponse)), (
|
127
|
-
|
129
|
+
assert isinstance(arg, (np.ndarray, SamplePreprocessResponse)), (
|
130
|
+
f'tensorleap_custom_visualizer validation failed: '
|
131
|
+
f'Argument {_arg_name} should be a numpy array. Got {type(arg)}.')
|
128
132
|
if leap_binder.batch_size_to_validate and isinstance(arg, np.ndarray):
|
129
133
|
assert arg.shape[0] != leap_binder.batch_size_to_validate, \
|
130
134
|
(f'tensorleap_custom_visualizer validation failed: Argument {_arg_name} '
|
@@ -20,13 +20,13 @@ code_loader/experiment_api/utils.py,sha256=XZHtxge12TS4H4-8PjV3sKuhp8Ud6ojAiIzTZ
|
|
20
20
|
code_loader/experiment_api/workingspace_config_utils.py,sha256=DLzXQCg4dgTV_YgaSbeTVzq-2ja_SQw4zi7LXwKL9cY,990
|
21
21
|
code_loader/inner_leap_binder/__init__.py,sha256=koOlJyMNYzGbEsoIbXathSmQ-L38N_pEXH_HvL7beXU,99
|
22
22
|
code_loader/inner_leap_binder/leapbinder.py,sha256=0l9zjlF27tZwg6SnpyqVoAAgf9QHQcKpR9lg7vho2Xw,27065
|
23
|
-
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=
|
23
|
+
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=mkgQF5YBMlw5_1JXj7LnhDQpRqlq-8kvP7uFvB3DTRo,21904
|
24
24
|
code_loader/leaploader.py,sha256=Gggk5vzomqVqlYo14sQTlc7RIzhONYR-11hTLDKhwsA,24972
|
25
25
|
code_loader/leaploaderbase.py,sha256=VH0vddRmkqLtcDlYPCO7hfz1_VbKo43lUdHDAbd4iJc,4198
|
26
26
|
code_loader/utils.py,sha256=aw2i_fqW_ADjLB66FWZd9DfpCQ7mPdMyauROC5Nd51I,2197
|
27
27
|
code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
28
|
code_loader/visualizers/default_visualizers.py,sha256=Ffx5VHVOe5ujBOsjBSxN_aIEVwFSQ6gbhTMG5aUS-po,2305
|
29
|
-
code_loader-1.0.
|
30
|
-
code_loader-1.0.
|
31
|
-
code_loader-1.0.
|
32
|
-
code_loader-1.0.
|
29
|
+
code_loader-1.0.76.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
30
|
+
code_loader-1.0.76.dist-info/METADATA,sha256=K7X-k9l0QHb4wRIc7lYXhEmXUmnudjmYbftLQIXPUwU,849
|
31
|
+
code_loader-1.0.76.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
32
|
+
code_loader-1.0.76.dist-info/RECORD,,
|
File without changes
|
File without changes
|