code-loader 1.0.49.dev5__py3-none-any.whl → 1.0.49.dev7__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 +14 -10
- code_loader/inner_leap_binder/leapbinder.py +1 -1
- code_loader/leaploader.py +1 -1
- {code_loader-1.0.49.dev5.dist-info → code_loader-1.0.49.dev7.dist-info}/METADATA +1 -1
- {code_loader-1.0.49.dev5.dist-info → code_loader-1.0.49.dev7.dist-info}/RECORD +7 -7
- {code_loader-1.0.49.dev5.dist-info → code_loader-1.0.49.dev7.dist-info}/LICENSE +0 -0
- {code_loader-1.0.49.dev5.dist-info → code_loader-1.0.49.dev7.dist-info}/WHEEL +0 -0
@@ -49,18 +49,21 @@ class PreprocessResponse:
|
|
49
49
|
else:
|
50
50
|
raise Exception("length is deprecated. Please use sample_ids instead.")
|
51
51
|
|
52
|
+
def __len__(self):
|
53
|
+
return len(self.sample_ids)
|
52
54
|
|
53
|
-
|
55
|
+
|
56
|
+
SectionCallableInterface = Callable[[Union[int, str], PreprocessResponse], npt.NDArray[np.float32]]
|
54
57
|
|
55
58
|
MetadataSectionCallableInterface = Union[
|
56
|
-
Callable[[int, PreprocessResponse], int],
|
57
|
-
Callable[[int, PreprocessResponse], Dict[str, int]],
|
58
|
-
Callable[[int, PreprocessResponse], str],
|
59
|
-
Callable[[int, PreprocessResponse], Dict[str, str]],
|
60
|
-
Callable[[int, PreprocessResponse], bool],
|
61
|
-
Callable[[int, PreprocessResponse], Dict[str, bool]],
|
62
|
-
Callable[[int, PreprocessResponse], float],
|
63
|
-
Callable[[int, PreprocessResponse], Dict[str, float]]
|
59
|
+
Callable[[Union[int, str], PreprocessResponse], int],
|
60
|
+
Callable[[Union[int, str], PreprocessResponse], Dict[str, int]],
|
61
|
+
Callable[[Union[int, str], PreprocessResponse], str],
|
62
|
+
Callable[[Union[int, str], PreprocessResponse], Dict[str, str]],
|
63
|
+
Callable[[Union[int, str], PreprocessResponse], bool],
|
64
|
+
Callable[[Union[int, str], PreprocessResponse], Dict[str, bool]],
|
65
|
+
Callable[[Union[int, str], PreprocessResponse], float],
|
66
|
+
Callable[[Union[int, str], PreprocessResponse], Dict[str, float]]
|
64
67
|
]
|
65
68
|
|
66
69
|
|
@@ -123,6 +126,7 @@ class MetricHandler:
|
|
123
126
|
arg_names: List[str]
|
124
127
|
direction: Optional[MetricDirection] = MetricDirection.Downward
|
125
128
|
|
129
|
+
|
126
130
|
@dataclass
|
127
131
|
class RawInputsForHeatmap:
|
128
132
|
raw_input_by_vizualizer_arg_name: Dict[str, npt.NDArray[np.float32]]
|
@@ -194,5 +198,5 @@ class DatasetSample:
|
|
194
198
|
inputs: Dict[str, npt.NDArray[np.float32]]
|
195
199
|
gt: Optional[Dict[str, npt.NDArray[np.float32]]]
|
196
200
|
metadata: Dict[str, Union[str, int, bool, float]]
|
197
|
-
index: int
|
201
|
+
index: Union[int, str]
|
198
202
|
state: DataStateEnum
|
@@ -430,7 +430,7 @@ class LeapBinder:
|
|
430
430
|
def check_handler(
|
431
431
|
preprocess_response: PreprocessResponse, test_result: List[DatasetTestResultPayload],
|
432
432
|
dataset_base_handler: Union[DatasetBaseHandler, MetadataHandler]) -> List[DatasetTestResultPayload]:
|
433
|
-
raw_result = dataset_base_handler.function(0, preprocess_response)
|
433
|
+
raw_result = dataset_base_handler.function(preprocess_response.sample_ids[0], preprocess_response)
|
434
434
|
handler_type = 'metadata' if isinstance(dataset_base_handler, MetadataHandler) else None
|
435
435
|
if isinstance(dataset_base_handler, MetadataHandler) and isinstance(raw_result, dict):
|
436
436
|
metadata_test_result_payloads = [
|
code_loader/leaploader.py
CHANGED
@@ -106,7 +106,7 @@ class LeapLoader:
|
|
106
106
|
for prediction_type in setup.prediction_types
|
107
107
|
}
|
108
108
|
|
109
|
-
def get_sample(self, state: DataStateEnum, idx: int) -> DatasetSample:
|
109
|
+
def get_sample(self, state: DataStateEnum, idx: Union[int, str]) -> DatasetSample:
|
110
110
|
self.exec_script()
|
111
111
|
preprocess_result = self._preprocess_result()
|
112
112
|
if state == DataStateEnum.unlabeled and idx not in preprocess_result[state].sample_ids:
|
@@ -2,7 +2,7 @@ LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
|
2
2
|
code_loader/__init__.py,sha256=6MMWr0ObOU7hkqQKgOqp4Zp3I28L7joGC9iCbQYtAJg,241
|
3
3
|
code_loader/code_inegration_processes_manager.py,sha256=XslWOPeNQk4RAFJ_f3tP5Oe3EgcIR7BE7Y8r9Ty73-o,3261
|
4
4
|
code_loader/contract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
-
code_loader/contract/datasetclasses.py,sha256=
|
5
|
+
code_loader/contract/datasetclasses.py,sha256=U-9bKvVkojKTqBLFBVUxKzhPu-pvP5eYXP8IM509-Zw,6584
|
6
6
|
code_loader/contract/enums.py,sha256=6Lo7p5CUog68Fd31bCozIuOgIp_IhSiPqWWph2k3OGU,1602
|
7
7
|
code_loader/contract/exceptions.py,sha256=jWqu5i7t-0IG0jGRsKF4DjJdrsdpJjIYpUkN1F4RiyQ,51
|
8
8
|
code_loader/contract/responsedataclasses.py,sha256=w7xVOv2S8Hyb5lqyomMGiKAWXDTSOG-FX1YW39bXD3A,3969
|
@@ -18,12 +18,12 @@ code_loader/experiment_api/types.py,sha256=MY8xFARHwdVA7p4dxyhD60ShmttgTvb4qdp1o
|
|
18
18
|
code_loader/experiment_api/utils.py,sha256=XZHtxge12TS4H4-8PjV3sKuhp8Ud6ojAiIzTZJEqBqc,3304
|
19
19
|
code_loader/experiment_api/workingspace_config_utils.py,sha256=DLzXQCg4dgTV_YgaSbeTVzq-2ja_SQw4zi7LXwKL9cY,990
|
20
20
|
code_loader/inner_leap_binder/__init__.py,sha256=koOlJyMNYzGbEsoIbXathSmQ-L38N_pEXH_HvL7beXU,99
|
21
|
-
code_loader/inner_leap_binder/leapbinder.py,sha256=
|
22
|
-
code_loader/leaploader.py,sha256=
|
21
|
+
code_loader/inner_leap_binder/leapbinder.py,sha256=URm7W1W0KnmDqFMp1yPQrZQwm2B9DQ9oHVvAwRFkJuc,24934
|
22
|
+
code_loader/leaploader.py,sha256=NaruooApK6vcBb_hiPKlwWJ97EiaW33SOq6hMWNeJ_Y,18939
|
23
23
|
code_loader/utils.py,sha256=TZAoUbA2pE8eK3Le3s5Xr4eRaYdeDMQtxotx6rh-5oE,2185
|
24
24
|
code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
25
|
code_loader/visualizers/default_visualizers.py,sha256=VoqO9FN84yXyMjRjHjUTOt2GdTkJRMbHbXJ1cJkREkk,2230
|
26
|
-
code_loader-1.0.49.
|
27
|
-
code_loader-1.0.49.
|
28
|
-
code_loader-1.0.49.
|
29
|
-
code_loader-1.0.49.
|
26
|
+
code_loader-1.0.49.dev7.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
27
|
+
code_loader-1.0.49.dev7.dist-info/METADATA,sha256=b0BD34L5HLvvJYQB-ij634IkXtYmPSK7gUUvviR5DZM,893
|
28
|
+
code_loader-1.0.49.dev7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
29
|
+
code_loader-1.0.49.dev7.dist-info/RECORD,,
|
File without changes
|
File without changes
|