runnable 0.30.2__py3-none-any.whl → 0.30.3__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.
- extensions/nodes/torch.py +16 -1
- {runnable-0.30.2.dist-info → runnable-0.30.3.dist-info}/METADATA +1 -1
- {runnable-0.30.2.dist-info → runnable-0.30.3.dist-info}/RECORD +6 -6
- {runnable-0.30.2.dist-info → runnable-0.30.3.dist-info}/WHEEL +0 -0
- {runnable-0.30.2.dist-info → runnable-0.30.3.dist-info}/entry_points.txt +0 -0
- {runnable-0.30.2.dist-info → runnable-0.30.3.dist-info}/licenses/LICENSE +0 -0
extensions/nodes/torch.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import importlib
|
2
2
|
import logging
|
3
3
|
import os
|
4
|
+
import random
|
5
|
+
import string
|
4
6
|
from datetime import datetime
|
5
7
|
from typing import Any, Callable
|
6
8
|
|
@@ -28,7 +30,13 @@ def training_subprocess():
|
|
28
30
|
command = os.environ.get("RUNNABLE_TORCH_COMMAND")
|
29
31
|
run_id = os.environ.get("RUNNABLE_TORCH_RUN_ID", "")
|
30
32
|
parameters_files = os.environ.get("RUNNABLE_TORCH_PARAMETERS_FILES", "")
|
31
|
-
process_run_id =
|
33
|
+
process_run_id = (
|
34
|
+
run_id
|
35
|
+
+ "-"
|
36
|
+
+ os.environ.get("RANK", "")
|
37
|
+
+ "-"
|
38
|
+
+ "".join(random.choices(string.ascii_lowercase, k=3))
|
39
|
+
)
|
32
40
|
|
33
41
|
delete_env_vars_with_prefix("RUNNABLE_")
|
34
42
|
|
@@ -40,6 +48,13 @@ def training_subprocess():
|
|
40
48
|
job_id=process_run_id,
|
41
49
|
)
|
42
50
|
|
51
|
+
from runnable.context import run_context
|
52
|
+
|
53
|
+
job_log = run_context.run_log_store.get_run_log_by_id(run_id=run_context.run_id)
|
54
|
+
|
55
|
+
if job_log.status == defaults.FAIL:
|
56
|
+
raise Exception(f"Job {process_run_id} failed")
|
57
|
+
|
43
58
|
|
44
59
|
def get_callable_from_dotted_path(dotted_path) -> Callable:
|
45
60
|
try:
|
@@ -16,7 +16,7 @@ extensions/job_executor/pyproject.toml,sha256=UIEgiCYHTXcRWSByNMFuKJFKgxTBpQqTqy
|
|
16
16
|
extensions/nodes/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
extensions/nodes/nodes.py,sha256=s9ub1dqy4qHjRQG6YElCdL7rCOTYNs9RUIrStZ6tEB4,28256
|
18
18
|
extensions/nodes/pyproject.toml,sha256=YTu-ETN3JNFSkMzzWeOwn4m-O2nbRH-PmiPBALDCUw4,278
|
19
|
-
extensions/nodes/torch.py,sha256=
|
19
|
+
extensions/nodes/torch.py,sha256=id0_HVkRcqL9_DPOI-b53vaDwRgVfGB-zZS3yrRej9g,6318
|
20
20
|
extensions/nodes/torch_config.py,sha256=yDvDADpnLhQsNtfH8qIztLHQ2LhYiOJEWljxpH9GZzs,1222
|
21
21
|
extensions/pipeline_executor/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
extensions/pipeline_executor/__init__.py,sha256=LApJGwJctEBTDQX9gGHkGV97T6rF_q-_59OzvAJ2X1g,24346
|
@@ -58,8 +58,8 @@ runnable/sdk.py,sha256=NZVQGaL4Zm2hwloRmqEgp8UPbBg9hY1abQGYnOgniPI,35128
|
|
58
58
|
runnable/secrets.py,sha256=4L_dBFxTgr8r_hHUD6RlZEtqaOHDRsFG5PXO5wlvMI0,2324
|
59
59
|
runnable/tasks.py,sha256=Qb1IhVxHv68E7vf3M3YCf7MGRHyjmsEEYBpEpiZ4mRI,29062
|
60
60
|
runnable/utils.py,sha256=hBr7oGwGL2VgfITlQCTz-a1iwvvf7Mfl-HY8UdENZac,19929
|
61
|
-
runnable-0.30.
|
62
|
-
runnable-0.30.
|
63
|
-
runnable-0.30.
|
64
|
-
runnable-0.30.
|
65
|
-
runnable-0.30.
|
61
|
+
runnable-0.30.3.dist-info/METADATA,sha256=crIrNT-I9IIEsO1L_zBaFYCrMo3TRuqUYpW6WusTwDI,10115
|
62
|
+
runnable-0.30.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
63
|
+
runnable-0.30.3.dist-info/entry_points.txt,sha256=PrjKrlfXPZaV_7hz8orGu4FDnatLqnhPOXljyllszdw,1880
|
64
|
+
runnable-0.30.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
65
|
+
runnable-0.30.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|