runnable 0.30.4__py3-none-any.whl → 0.30.5__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 +9 -2
- extensions/nodes/torch_config.py +30 -24
- {runnable-0.30.4.dist-info → runnable-0.30.5.dist-info}/METADATA +1 -1
- {runnable-0.30.4.dist-info → runnable-0.30.5.dist-info}/RECORD +7 -7
- {runnable-0.30.4.dist-info → runnable-0.30.5.dist-info}/WHEEL +0 -0
- {runnable-0.30.4.dist-info → runnable-0.30.5.dist-info}/entry_points.txt +0 -0
- {runnable-0.30.4.dist-info → runnable-0.30.5.dist-info}/licenses/LICENSE +0 -0
extensions/nodes/torch.py
CHANGED
@@ -6,7 +6,7 @@ import string
|
|
6
6
|
from datetime import datetime
|
7
7
|
from typing import Any, Callable
|
8
8
|
|
9
|
-
from pydantic import ConfigDict, Field
|
9
|
+
from pydantic import BaseModel, ConfigDict, Field
|
10
10
|
|
11
11
|
from extensions.nodes.torch_config import TorchConfig
|
12
12
|
from runnable import PythonJob, datastore, defaults
|
@@ -120,7 +120,8 @@ class TorchNode(DistributedNode, TorchConfig):
|
|
120
120
|
return cls(executable=executable, **node_config, **task_config)
|
121
121
|
|
122
122
|
def get_launch_config(self) -> LaunchConfig:
|
123
|
-
|
123
|
+
easy_model = EasyModel(**self.model_dump(exclude_none=True))
|
124
|
+
config, _, _ = config_from_args(easy_model)
|
124
125
|
config.run_id = self._context.run_id
|
125
126
|
return config
|
126
127
|
|
@@ -194,3 +195,9 @@ class TorchNode(DistributedNode, TorchConfig):
|
|
194
195
|
assert (
|
195
196
|
map_variable is None or not map_variable
|
196
197
|
), "TorchNode does not support map_variable"
|
198
|
+
|
199
|
+
|
200
|
+
class EasyModel(BaseModel):
|
201
|
+
model_config = ConfigDict(extra="allow")
|
202
|
+
logs_specs: str | None = None
|
203
|
+
local_addr: str | None = Field(default=None)
|
extensions/nodes/torch_config.py
CHANGED
@@ -1,33 +1,39 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
1
3
|
from pydantic import BaseModel, Field
|
2
4
|
|
3
5
|
|
6
|
+
class StartMethod(str, Enum):
|
7
|
+
spawn = "spawn"
|
8
|
+
fork = "fork"
|
9
|
+
forkserver = "forkserver"
|
10
|
+
|
11
|
+
|
4
12
|
class TorchConfig(BaseModel):
|
5
13
|
nnodes: str = Field(default="1:1")
|
6
|
-
nproc_per_node: int = Field(default=
|
7
|
-
|
8
|
-
rdzv_backend: str = Field(default="static")
|
9
|
-
rdzv_endpoint: str = Field(default="")
|
10
|
-
rdzv_id: str | None = Field(default=
|
11
|
-
rdzv_conf: str = Field(default="")
|
12
|
-
|
13
|
-
max_restarts: int = Field(default=
|
14
|
-
monitor_interval: float = Field(default=0.1)
|
15
|
-
start_method: str = Field(default=
|
16
|
-
role: str = Field(default="
|
17
|
-
log_dir: str = Field(default="torch_logs")
|
18
|
-
redirects: str = Field(default="
|
19
|
-
tee: str = Field(default="
|
20
|
-
master_addr: str = Field(default="localhost")
|
21
|
-
master_port: str = Field(default="29500")
|
14
|
+
nproc_per_node: int = Field(default=1)
|
15
|
+
|
16
|
+
rdzv_backend: str | None = Field(default="static")
|
17
|
+
rdzv_endpoint: str | None = Field(default="")
|
18
|
+
rdzv_id: str | None = Field(default="none")
|
19
|
+
rdzv_conf: str | None = Field(default="")
|
20
|
+
|
21
|
+
max_restarts: int | None = Field(default=None)
|
22
|
+
monitor_interval: float | None = Field(default=0.1)
|
23
|
+
start_method: str | None = Field(default=StartMethod.spawn)
|
24
|
+
role: str | None = Field(default="default")
|
25
|
+
log_dir: str | None = Field(default="torch_logs")
|
26
|
+
redirects: str | None = Field(default="0")
|
27
|
+
tee: str | None = Field(default="0")
|
28
|
+
master_addr: str | None = Field(default="localhost")
|
29
|
+
master_port: str | None = Field(default="29500")
|
22
30
|
training_script: str = Field(default="dummy_training_script")
|
23
31
|
training_script_args: str = Field(default="")
|
24
32
|
|
25
33
|
# Optional fields
|
26
|
-
local_ranks_filter: str = Field(default="")
|
27
|
-
node_rank: int = Field(default=0)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
no_python: bool = Field(default=False)
|
33
|
-
run_path: bool = Field(default=False)
|
34
|
+
local_ranks_filter: str | None = Field(default="0")
|
35
|
+
node_rank: int | None = Field(default=0)
|
36
|
+
standalone: bool | None = Field(default=None)
|
37
|
+
module: bool | None = Field(default=False)
|
38
|
+
no_python: bool | None = Field(default=False)
|
39
|
+
run_path: bool | None = Field(default=False)
|
@@ -16,8 +16,8 @@ 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=
|
20
|
-
extensions/nodes/torch_config.py,sha256=
|
19
|
+
extensions/nodes/torch.py,sha256=JyU4fZl06QLW90YVckPenQ6bAXZGNr66eGLnr-dpOsE,6562
|
20
|
+
extensions/nodes/torch_config.py,sha256=6J-Oy0TPnAgiyKST8pDZ-OIUWzZqyNs_ej18yuOI9-E,1383
|
21
21
|
extensions/pipeline_executor/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
extensions/pipeline_executor/__init__.py,sha256=wfigTL2T9OHrmE8b2Ydmb8h6hr-oF--Yc2FectC7WaY,24623
|
23
23
|
extensions/pipeline_executor/argo.py,sha256=AEGSWVZulBL6EsvbVCaeBeTl2m_t5ymc6RFpMKhivis,37946
|
@@ -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.5.dist-info/METADATA,sha256=FXkML9uUZiGwloqMjW6rh89cN4H_2XzBrtcMPDG92VU,10115
|
62
|
+
runnable-0.30.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
63
|
+
runnable-0.30.5.dist-info/entry_points.txt,sha256=PrjKrlfXPZaV_7hz8orGu4FDnatLqnhPOXljyllszdw,1880
|
64
|
+
runnable-0.30.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
65
|
+
runnable-0.30.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|