code-loader 1.0.93.dev2__py3-none-any.whl → 1.0.93.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.
Potentially problematic release.
This version of code-loader might be problematic. Click here for more details.
- code_loader/contract/datasetclasses.py +1 -1
- code_loader/inner_leap_binder/leapbinder_decorators.py +6 -3
- code_loader/leaploader.py +7 -0
- {code_loader-1.0.93.dev2.dist-info → code_loader-1.0.93.dev4.dist-info}/METADATA +1 -1
- {code_loader-1.0.93.dev2.dist-info → code_loader-1.0.93.dev4.dist-info}/RECORD +7 -7
- {code_loader-1.0.93.dev2.dist-info → code_loader-1.0.93.dev4.dist-info}/LICENSE +0 -0
- {code_loader-1.0.93.dev2.dist-info → code_loader-1.0.93.dev4.dist-info}/WHEEL +0 -0
|
@@ -8,7 +8,7 @@ import numpy.typing as npt
|
|
|
8
8
|
from code_loader.contract.datasetclasses import CustomCallableInterfaceMultiArgs, \
|
|
9
9
|
CustomMultipleReturnCallableInterfaceMultiArgs, ConfusionMatrixCallableInterfaceMultiArgs, CustomCallableInterface, \
|
|
10
10
|
VisualizerCallableInterface, MetadataSectionCallableInterface, PreprocessResponse, SectionCallableInterface, \
|
|
11
|
-
ConfusionMatrixElement, SamplePreprocessResponse
|
|
11
|
+
ConfusionMatrixElement, SamplePreprocessResponse, PredictionTypeHandler
|
|
12
12
|
from code_loader.contract.enums import MetricDirection, LeapDataType, DatasetMetadataType
|
|
13
13
|
from code_loader import leap_binder
|
|
14
14
|
from code_loader.contract.mapping import NodeMapping, NodeMappingType, NodeConnection
|
|
@@ -16,7 +16,7 @@ from code_loader.contract.visualizer_classes import LeapImage, LeapImageMask, Le
|
|
|
16
16
|
LeapHorizontalBar, LeapImageWithBBox, LeapImageWithHeatmap
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
mapping_runtime_mode_env_var_mame = '
|
|
19
|
+
mapping_runtime_mode_env_var_mame = '__MAPPING_RUNTIME_MODE__'
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def _add_mapping_connection(user_unique_name, connection_destinations, arg_names, name, node_mapping_type):
|
|
@@ -35,7 +35,10 @@ def _add_mapping_connections(connects_to, arg_names, node_mapping_type, name):
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
def tensorleap_load_model():
|
|
38
|
+
def tensorleap_load_model(prediction_types: Optional[List[PredictionTypeHandler]] = None):
|
|
39
|
+
for i, prediction_type in enumerate(prediction_types):
|
|
40
|
+
leap_binder.add_prediction(prediction_type.name, prediction_type.labels, prediction_type.channel_dim, i)
|
|
41
|
+
|
|
39
42
|
def decorating_function(load_model_func):
|
|
40
43
|
class TempMapping:
|
|
41
44
|
pass
|
code_loader/leaploader.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import importlib.util
|
|
3
3
|
import inspect
|
|
4
4
|
import io
|
|
5
|
+
import os
|
|
5
6
|
import sys
|
|
6
7
|
from contextlib import redirect_stdout
|
|
7
8
|
from functools import lru_cache
|
|
@@ -22,6 +23,7 @@ from code_loader.contract.responsedataclasses import DatasetIntegParseResult, Da
|
|
|
22
23
|
VisualizerInstance, PredictionTypeInstance, ModelSetup, CustomLayerInstance, MetricInstance, CustomLossInstance, \
|
|
23
24
|
EngineFileContract
|
|
24
25
|
from code_loader.inner_leap_binder import global_leap_binder
|
|
26
|
+
from code_loader.inner_leap_binder.leapbinder_decorators import mapping_runtime_mode_env_var_mame
|
|
25
27
|
from code_loader.leaploaderbase import LeapLoaderBase
|
|
26
28
|
from code_loader.utils import get_root_exception_file_and_line_number
|
|
27
29
|
|
|
@@ -157,6 +159,7 @@ class LeapLoader(LeapLoaderBase):
|
|
|
157
159
|
stdout_steam = io.StringIO()
|
|
158
160
|
with redirect_stdout(stdout_steam):
|
|
159
161
|
try:
|
|
162
|
+
os.environ[mapping_runtime_mode_env_var_mame] = 'TRUE'
|
|
160
163
|
self.exec_script()
|
|
161
164
|
preprocess_test_payload = self._check_preprocess()
|
|
162
165
|
test_payloads.append(preprocess_test_payload)
|
|
@@ -173,6 +176,10 @@ class LeapLoader(LeapLoaderBase):
|
|
|
173
176
|
general_error = f"Something went wrong. {repr(e.__cause__)} in file {file_name}, line_number: {line_number}\nStacktrace:\n{stacktrace}"
|
|
174
177
|
is_valid = False
|
|
175
178
|
|
|
179
|
+
del os.environ[mapping_runtime_mode_env_var_mame]
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
176
183
|
print_log = stdout_steam.getvalue()
|
|
177
184
|
is_valid_for_model = bool(global_leap_binder.setup_container.custom_layers)
|
|
178
185
|
model_setup = self.get_model_setup_response()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
|
2
2
|
code_loader/__init__.py,sha256=6MMWr0ObOU7hkqQKgOqp4Zp3I28L7joGC9iCbQYtAJg,241
|
|
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=sNBHyfdg2uS3rL65kJVZjjNVbSXy0dTQMganldQjGNw,7969
|
|
5
5
|
code_loader/contract/enums.py,sha256=GEFkvUMXnCNt-GOoz7NJ9ecQZ2PPDettJNOsxsiM0wk,1622
|
|
6
6
|
code_loader/contract/exceptions.py,sha256=jWqu5i7t-0IG0jGRsKF4DjJdrsdpJjIYpUkN1F4RiyQ,51
|
|
7
7
|
code_loader/contract/mapping.py,sha256=e11h_sprwOyE32PcqgRq9JvyahQrPzwqgkhmbQLKLQY,1165
|
|
@@ -21,13 +21,13 @@ 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=mRg5ofWNbUkRsIafaz7i7NKi-1USgeAuNTIBxASSMcw,31713
|
|
24
|
-
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=
|
|
25
|
-
code_loader/leaploader.py,sha256=
|
|
24
|
+
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=5QU-_bltYimlvtfESIZRM3pSI18EgEA3nYHlhDDwLgU,30022
|
|
25
|
+
code_loader/leaploader.py,sha256=o8e9p08a6NpN8NNCbMvnnKim5bP53u0JSPyluGdyceU,26725
|
|
26
26
|
code_loader/leaploaderbase.py,sha256=VH0vddRmkqLtcDlYPCO7hfz1_VbKo43lUdHDAbd4iJc,4198
|
|
27
27
|
code_loader/utils.py,sha256=aw2i_fqW_ADjLB66FWZd9DfpCQ7mPdMyauROC5Nd51I,2197
|
|
28
28
|
code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
code_loader/visualizers/default_visualizers.py,sha256=669lBpLISLO6my5Qcgn1FLDDeZgHumPf252m4KHY4YM,2555
|
|
30
|
-
code_loader-1.0.93.
|
|
31
|
-
code_loader-1.0.93.
|
|
32
|
-
code_loader-1.0.93.
|
|
33
|
-
code_loader-1.0.93.
|
|
30
|
+
code_loader-1.0.93.dev4.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
|
31
|
+
code_loader-1.0.93.dev4.dist-info/METADATA,sha256=aYA3pjXg-fUZ_H_RFbDXp-uVrmz6zOWwTCMh0kSUD1Q,854
|
|
32
|
+
code_loader-1.0.93.dev4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
33
|
+
code_loader-1.0.93.dev4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|