code-loader 1.0.139.dev3__py3-none-any.whl → 1.0.139.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 +26 -18
- {code_loader-1.0.139.dev3.dist-info → code_loader-1.0.139.dev5.dist-info}/METADATA +1 -1
- {code_loader-1.0.139.dev3.dist-info → code_loader-1.0.139.dev5.dist-info}/RECORD +5 -5
- {code_loader-1.0.139.dev3.dist-info → code_loader-1.0.139.dev5.dist-info}/LICENSE +0 -0
- {code_loader-1.0.139.dev3.dist-info → code_loader-1.0.139.dev5.dist-info}/WHEEL +0 -0
|
@@ -229,6 +229,10 @@ def tensorleap_load_model(prediction_types: Optional[List[PredictionTypeHandler]
|
|
|
229
229
|
import keras
|
|
230
230
|
except ImportError:
|
|
231
231
|
keras = None
|
|
232
|
+
try:
|
|
233
|
+
import tensorflow as tf
|
|
234
|
+
except ImportError:
|
|
235
|
+
tf = None
|
|
232
236
|
try:
|
|
233
237
|
import onnxruntime
|
|
234
238
|
except ImportError:
|
|
@@ -237,7 +241,10 @@ def tensorleap_load_model(prediction_types: Optional[List[PredictionTypeHandler]
|
|
|
237
241
|
if not keras and not onnxruntime:
|
|
238
242
|
raise AssertionError(err_message)
|
|
239
243
|
|
|
240
|
-
is_keras_model =
|
|
244
|
+
is_keras_model = (
|
|
245
|
+
bool(keras and isinstance(result, getattr(keras, "Model", tuple())))
|
|
246
|
+
or bool(tf and isinstance(result, getattr(tf.keras, "Model", tuple())))
|
|
247
|
+
)
|
|
241
248
|
is_onnx_model = bool(onnxruntime and isinstance(result, onnxruntime.InferenceSession))
|
|
242
249
|
|
|
243
250
|
if not any([is_keras_model, is_onnx_model]):
|
|
@@ -1413,18 +1420,19 @@ def tensorleap_status_table():
|
|
|
1413
1420
|
import atexit
|
|
1414
1421
|
import sys
|
|
1415
1422
|
import traceback
|
|
1416
|
-
|
|
1423
|
+
CHECK = "✅"
|
|
1424
|
+
CROSS = "❌"
|
|
1417
1425
|
|
|
1418
1426
|
table = [
|
|
1419
|
-
{"name": "tensorleap_preprocess", "
|
|
1420
|
-
{"name": "tensorleap_integration_test", "
|
|
1421
|
-
{"name": "tensorleap_input_encoder", "
|
|
1422
|
-
{"name": "tensorleap_gt_encoder", "
|
|
1423
|
-
{"name": "tensorleap_load_model", "
|
|
1424
|
-
{"name": "tensorleap_custom_loss", "
|
|
1425
|
-
{"name": "tensorleap_custom_metric (optional)", "
|
|
1426
|
-
{"name": "tensorleap_metadata (optional)", "
|
|
1427
|
-
{"name": "tensorleap_custom_visualizer (optional)", "
|
|
1427
|
+
{"name": "tensorleap_preprocess", "Added to integration": CROSS},
|
|
1428
|
+
{"name": "tensorleap_integration_test", "Added to integration": CROSS},
|
|
1429
|
+
{"name": "tensorleap_input_encoder", "Added to integration": CROSS},
|
|
1430
|
+
{"name": "tensorleap_gt_encoder", "Added to integration": CROSS},
|
|
1431
|
+
{"name": "tensorleap_load_model", "Added to integration": CROSS},
|
|
1432
|
+
{"name": "tensorleap_custom_loss", "Added to integration": CROSS},
|
|
1433
|
+
{"name": "tensorleap_custom_metric (optional)", "Added to integration": CROSS},
|
|
1434
|
+
{"name": "tensorleap_metadata (optional)", "Added to integration": CROSS},
|
|
1435
|
+
{"name": "tensorleap_custom_visualizer (optional)", "Added to integration": CROSS},
|
|
1428
1436
|
|
|
1429
1437
|
]
|
|
1430
1438
|
|
|
@@ -1432,19 +1440,19 @@ def tensorleap_status_table():
|
|
|
1432
1440
|
|
|
1433
1441
|
def _print_table():
|
|
1434
1442
|
ready_mess = "\nAll parts have been successfully set. If no errors accured, you can now push the project to the Tensorleap system."
|
|
1435
|
-
not_ready_mess = "\nSome mandatory components have not been
|
|
1436
|
-
mandatory_ready_mess = "\nAll mandatory parts have been successfully set. If no errors accured, you can now push the project to the Tensorleap system or continue to the next optional
|
|
1443
|
+
not_ready_mess = "\nSome mandatory components have not yet been added to the Integration test. Recommended next interface to add is: "
|
|
1444
|
+
mandatory_ready_mess = "\nAll mandatory parts have been successfully set. If no errors accured, you can now push the project to the Tensorleap system or continue to the next optional reccomeded interface,adding: "
|
|
1437
1445
|
|
|
1438
1446
|
name_width = max(len(row["name"]) for row in table)
|
|
1439
|
-
status_width = max(len(row["
|
|
1440
|
-
header = f"{'
|
|
1447
|
+
status_width = max(len(row["Added to integration"]) for row in table)
|
|
1448
|
+
header = f"{'Decorator Name'.ljust(name_width)} | {'Added to integration'.ljust(status_width)}"
|
|
1441
1449
|
sep = "-" * len(header)
|
|
1442
1450
|
print("\n" + header)
|
|
1443
1451
|
print(sep)
|
|
1444
1452
|
ready=True
|
|
1445
1453
|
for row in table:
|
|
1446
|
-
print(f"{row['name'].ljust(name_width)} | {row['
|
|
1447
|
-
if row['
|
|
1454
|
+
print(f"{row['name'].ljust(name_width)} | {row['Added to integration'].ljust(status_width)}")
|
|
1455
|
+
if row['Added to integration']==CROSS and ready:
|
|
1448
1456
|
ready=False
|
|
1449
1457
|
next_step=row['name']
|
|
1450
1458
|
|
|
@@ -1453,7 +1461,7 @@ def tensorleap_status_table():
|
|
|
1453
1461
|
def update_env_params(name: str, status: str = "✓"):
|
|
1454
1462
|
for row in table:
|
|
1455
1463
|
if row["name"].removesuffix(" (optional)") == name:
|
|
1456
|
-
row["
|
|
1464
|
+
row["Added to integration"] = CHECK if status=="v" else CROSS
|
|
1457
1465
|
break
|
|
1458
1466
|
def run_on_exit():
|
|
1459
1467
|
if _finalizer_called["done"]:
|
|
@@ -21,7 +21,7 @@ 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=Q3D9yVM-GNEJfYRFvMV__BoZbcWOgnWKhrZXAv6Tu7o,33232
|
|
24
|
-
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=
|
|
24
|
+
code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=I6V-Q9qRqhmBJSr_TvrGTcs2RZgi8y9nbLWtL93UH4I,70581
|
|
25
25
|
code_loader/leaploader.py,sha256=6D6xZzMI6qSNIb3tuKLB3BbK5H8QS1_r7iQjIXO3OkM,29795
|
|
26
26
|
code_loader/leaploaderbase.py,sha256=LIFcC6xo6V_iiGN3BjibXETu_l84EWM_WIOKAvkfTiM,4458
|
|
27
27
|
code_loader/mixpanel_tracker.py,sha256=l9z_szKKQ7apEbdNZpGH1TKAiT_TsBHb9AQnePaWTyo,4942
|
|
@@ -31,7 +31,7 @@ code_loader/plot_functions/visualize.py,sha256=gsBAYYkwMh7jIpJeDMPS8G4CW-pxwx6Lz
|
|
|
31
31
|
code_loader/utils.py,sha256=gXENTYpjdidq2dx0gVbXlErPeHoNs-4TYAZbLRe0y2c,2712
|
|
32
32
|
code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
33
|
code_loader/visualizers/default_visualizers.py,sha256=onRnLE_TXfgLN4o52hQIOOhUcFexGlqJ3xSpQDVLuZM,2604
|
|
34
|
-
code_loader-1.0.139.
|
|
35
|
-
code_loader-1.0.139.
|
|
36
|
-
code_loader-1.0.139.
|
|
37
|
-
code_loader-1.0.139.
|
|
34
|
+
code_loader-1.0.139.dev5.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
|
35
|
+
code_loader-1.0.139.dev5.dist-info/METADATA,sha256=VuBCYX1zRt_iDqU9pMv0cixcnB8b39BvSRkNXOW6N_8,1095
|
|
36
|
+
code_loader-1.0.139.dev5.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
37
|
+
code_loader-1.0.139.dev5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|