code-loader 1.0.22__py3-none-any.whl → 1.0.23__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/contract/datasetclasses.py +1 -0
- code_loader/contract/responsedataclasses.py +1 -0
- code_loader/inner_leap_binder/leapbinder.py +7 -3
- code_loader/leaploader.py +2 -1
- {code_loader-1.0.22.dist-info → code_loader-1.0.23.dist-info}/METADATA +1 -1
- {code_loader-1.0.22.dist-info → code_loader-1.0.23.dist-info}/RECORD +8 -8
- {code_loader-1.0.22.dist-info → code_loader-1.0.23.dist-info}/LICENSE +0 -0
- {code_loader-1.0.22.dist-info → code_loader-1.0.23.dist-info}/WHEEL +0 -0
@@ -107,8 +107,8 @@ class LeapBinder:
|
|
107
107
|
arg_names = inspect.getfullargspec(function)[0]
|
108
108
|
self.setup_container.metrics.append(MetricHandler(name, function, arg_names))
|
109
109
|
|
110
|
-
def add_prediction(self, name: str, labels: List[str]) -> None:
|
111
|
-
self.setup_container.prediction_types.append(PredictionTypeHandler(name, labels))
|
110
|
+
def add_prediction(self, name: str, labels: List[str], channel_dim=-1) -> None:
|
111
|
+
self.setup_container.prediction_types.append(PredictionTypeHandler(name, labels, channel_dim))
|
112
112
|
|
113
113
|
def set_ground_truth(self, function: SectionCallableInterface, name: str) -> None:
|
114
114
|
function = to_numpy_return_wrapper(function)
|
@@ -119,7 +119,11 @@ class LeapBinder:
|
|
119
119
|
def set_metadata(self, function: MetadataSectionCallableInterface, name: str) -> None:
|
120
120
|
self.setup_container.metadata.append(MetadataHandler(name, function))
|
121
121
|
|
122
|
-
def set_custom_layer(self, custom_layer: Type[Any], name: str
|
122
|
+
def set_custom_layer(self, custom_layer: Type[Any], name: str, inspect_layer: bool = False,
|
123
|
+
kernel_index: Optional[int] = None) -> None:
|
124
|
+
if inspect_layer and kernel_index is not None:
|
125
|
+
custom_layer.kernel_index = kernel_index
|
126
|
+
|
123
127
|
init_args = inspect.getfullargspec(custom_layer.__init__)[0][1:]
|
124
128
|
call_args = inspect.getfullargspec(custom_layer.call)[0][1:]
|
125
129
|
self.setup_container.custom_layers[name] = CustomLayerHandler(name, custom_layer, init_args, call_args)
|
code_loader/leaploader.py
CHANGED
@@ -256,7 +256,8 @@ class LeapLoader:
|
|
256
256
|
|
257
257
|
prediction_types = []
|
258
258
|
for prediction_type in setup.prediction_types:
|
259
|
-
pred_type_inst = PredictionTypeInstance(prediction_type.name, prediction_type.labels
|
259
|
+
pred_type_inst = PredictionTypeInstance(prediction_type.name, prediction_type.labels,
|
260
|
+
prediction_type.channel_dim)
|
260
261
|
prediction_types.append(pred_type_inst)
|
261
262
|
|
262
263
|
metrics = []
|
@@ -1,18 +1,18 @@
|
|
1
1
|
LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
2
2
|
code_loader/__init__.py,sha256=V3DEXSN6Ie6PlGeSAbzjp9ufRj0XPJLpD7pDLLYxk6M,122
|
3
3
|
code_loader/contract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
code_loader/contract/datasetclasses.py,sha256=
|
4
|
+
code_loader/contract/datasetclasses.py,sha256=xuPrL3cKZ-tNBMQ5FsSh7oI8U6ITA_QPI57LN2T8aF8,4454
|
5
5
|
code_loader/contract/enums.py,sha256=KDIeNl79e8rCp4ybJat7U03j50McrcBTWUxko5SXrug,1481
|
6
6
|
code_loader/contract/exceptions.py,sha256=jWqu5i7t-0IG0jGRsKF4DjJdrsdpJjIYpUkN1F4RiyQ,51
|
7
|
-
code_loader/contract/responsedataclasses.py,sha256=
|
7
|
+
code_loader/contract/responsedataclasses.py,sha256=0bo4iLbfu6-3tpgzeKakIH2i_1jtR8BiLdupa1TVT0o,2679
|
8
8
|
code_loader/contract/visualizer_classes.py,sha256=1FjVO744J_EMuJfHWXGdvSz6vl3Vu7iS3CDfs8MzEEQ,5138
|
9
9
|
code_loader/inner_leap_binder/__init__.py,sha256=koOlJyMNYzGbEsoIbXathSmQ-L38N_pEXH_HvL7beXU,99
|
10
|
-
code_loader/inner_leap_binder/leapbinder.py,sha256=
|
11
|
-
code_loader/leaploader.py,sha256=
|
10
|
+
code_loader/inner_leap_binder/leapbinder.py,sha256=C3276VCZaeOQ4WZnSB0aB9N3o_HqZgq-NXjViieJR10,12533
|
11
|
+
code_loader/leaploader.py,sha256=XUziFXq89AFbqUoWnlh5sYkoGA8jqUziORcOQA6W0GQ,15403
|
12
12
|
code_loader/utils.py,sha256=lluWgGpG7sYB-o9Wk9vZlm4uQqb7qbPZBa_qnSe0BkU,1933
|
13
13
|
code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
14
|
code_loader/visualizers/default_visualizers.py,sha256=HqWx2qfTrroGl2n8Fpmr_4X-rk7tE2oGapjO3gzz4WY,2226
|
15
|
-
code_loader-1.0.
|
16
|
-
code_loader-1.0.
|
17
|
-
code_loader-1.0.
|
18
|
-
code_loader-1.0.
|
15
|
+
code_loader-1.0.23.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
16
|
+
code_loader-1.0.23.dist-info/METADATA,sha256=wMwTiGzMTNC6jcLy2AKsv4etK70592Uhscajkr2zGic,768
|
17
|
+
code_loader-1.0.23.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
18
|
+
code_loader-1.0.23.dist-info/RECORD,,
|
File without changes
|
File without changes
|