torchx-nightly 2025.2.20__py3-none-any.whl → 2025.2.22__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 torchx-nightly might be problematic. Click here for more details.
- torchx/components/utils.py +12 -3
- {torchx_nightly-2025.2.20.dist-info → torchx_nightly-2025.2.22.dist-info}/METADATA +1 -1
- {torchx_nightly-2025.2.20.dist-info → torchx_nightly-2025.2.22.dist-info}/RECORD +7 -7
- {torchx_nightly-2025.2.20.dist-info → torchx_nightly-2025.2.22.dist-info}/LICENSE +0 -0
- {torchx_nightly-2025.2.20.dist-info → torchx_nightly-2025.2.22.dist-info}/WHEEL +0 -0
- {torchx_nightly-2025.2.20.dist-info → torchx_nightly-2025.2.22.dist-info}/entry_points.txt +0 -0
- {torchx_nightly-2025.2.20.dist-info → torchx_nightly-2025.2.22.dist-info}/top_level.txt +0 -0
torchx/components/utils.py
CHANGED
|
@@ -83,6 +83,7 @@ def sh(
|
|
|
83
83
|
env: Optional[Dict[str, str]] = None,
|
|
84
84
|
max_retries: int = 0,
|
|
85
85
|
mounts: Optional[List[str]] = None,
|
|
86
|
+
entrypoint: Optional[str] = None,
|
|
86
87
|
) -> specs.AppDef:
|
|
87
88
|
"""
|
|
88
89
|
Runs the provided command via sh. Currently sh does not support
|
|
@@ -100,21 +101,29 @@ def sh(
|
|
|
100
101
|
max_retries: the number of scheduler retries allowed
|
|
101
102
|
mounts: mounts to mount into the worker environment/container (ex. type=<bind/volume>,src=/host,dst=/job[,readonly]).
|
|
102
103
|
See scheduler documentation for more info.
|
|
104
|
+
entrypoint: the entrypoint to use for the command (defaults to sh)
|
|
103
105
|
"""
|
|
104
106
|
|
|
105
|
-
escaped_args =
|
|
107
|
+
escaped_args = [shlex.quote(arg) for arg in args]
|
|
106
108
|
if env is None:
|
|
107
109
|
env = {}
|
|
108
110
|
env.setdefault("LOGLEVEL", os.getenv("LOGLEVEL", "WARNING"))
|
|
109
111
|
|
|
112
|
+
if entrypoint is not None:
|
|
113
|
+
resolved_entrypoint = entrypoint
|
|
114
|
+
resolved_args = escaped_args
|
|
115
|
+
else:
|
|
116
|
+
resolved_entrypoint = "sh"
|
|
117
|
+
resolved_args = ["-c", " ".join(escaped_args)]
|
|
118
|
+
|
|
110
119
|
return specs.AppDef(
|
|
111
120
|
name="sh",
|
|
112
121
|
roles=[
|
|
113
122
|
specs.Role(
|
|
114
123
|
name="sh",
|
|
115
124
|
image=image,
|
|
116
|
-
entrypoint=
|
|
117
|
-
args=
|
|
125
|
+
entrypoint=resolved_entrypoint,
|
|
126
|
+
args=resolved_args,
|
|
118
127
|
num_replicas=num_replicas,
|
|
119
128
|
resource=specs.resource(cpu=cpu, gpu=gpu, memMB=memMB, h=h),
|
|
120
129
|
env=env,
|
|
@@ -30,7 +30,7 @@ torchx/components/metrics.py,sha256=1gbp8BfzZWGa7PD1db5vRADlONzmae4qSBUUdCWayr0,
|
|
|
30
30
|
torchx/components/serve.py,sha256=uxIC5gU2ecg0EJIPX_oEPzNNOXRAre4j2eXusrgwGAI,2156
|
|
31
31
|
torchx/components/structured_arg.py,sha256=etjZ1XRttrolvtr1bFuTi7bVsmvBAgqO0q-TeM3Etxk,9569
|
|
32
32
|
torchx/components/train.py,sha256=vtrQXRcD7bIcbb3lSeyD9BBlIe1mv1WNW6rnLK9R0Mw,1259
|
|
33
|
-
torchx/components/utils.py,sha256=
|
|
33
|
+
torchx/components/utils.py,sha256=QRBxBm1OnNhOhpPs0lKdbJ8_mNhWYMklY6cl1gPIw9A,9363
|
|
34
34
|
torchx/components/integration_tests/__init__.py,sha256=Md3cCHD7Ano9kV15PqGbicgUO-RMdh4aVy1yKiDt_xE,208
|
|
35
35
|
torchx/components/integration_tests/component_provider.py,sha256=cFNGqmclcZTJlOW_YGf5XEuGeWloTmcJEAh02Aob_PQ,3995
|
|
36
36
|
torchx/components/integration_tests/integ_tests.py,sha256=O8jd8Jq5O0mns7xzIFsHexBDHkIIAIfELQkWCzNPzRw,5165
|
|
@@ -115,9 +115,9 @@ torchx/workspace/__init__.py,sha256=FqN8AN4VhR1C_SBY10MggQvNZmyanbbuPuE-JCjkyUY,
|
|
|
115
115
|
torchx/workspace/api.py,sha256=PtDkGTC5lX03pRoYpuMz2KCmM1ZOycRP1UknqvNb97Y,6341
|
|
116
116
|
torchx/workspace/dir_workspace.py,sha256=npNW_IjUZm_yS5r-8hrRkH46ndDd9a_eApT64m1S1T4,2268
|
|
117
117
|
torchx/workspace/docker_workspace.py,sha256=PFu2KQNVC-0p2aKJ-W_BKA9ZOmXdCY2ABEkCExp3udQ,10269
|
|
118
|
-
torchx_nightly-2025.2.
|
|
119
|
-
torchx_nightly-2025.2.
|
|
120
|
-
torchx_nightly-2025.2.
|
|
121
|
-
torchx_nightly-2025.2.
|
|
122
|
-
torchx_nightly-2025.2.
|
|
123
|
-
torchx_nightly-2025.2.
|
|
118
|
+
torchx_nightly-2025.2.22.dist-info/LICENSE,sha256=WVHfXhFC0Ia8LTKt_nJVYobdqTJVg_4J3Crrfm2A8KQ,1721
|
|
119
|
+
torchx_nightly-2025.2.22.dist-info/METADATA,sha256=KeM_d4NrBvdYbvyhmP804MY80P8-3Do0_2ILmzh5jp4,6169
|
|
120
|
+
torchx_nightly-2025.2.22.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
121
|
+
torchx_nightly-2025.2.22.dist-info/entry_points.txt,sha256=T328AMXeKI3JZnnxfkEew2ZcMN1oQDtkXjMz7lkV-P4,169
|
|
122
|
+
torchx_nightly-2025.2.22.dist-info/top_level.txt,sha256=pxew3bc2gsiViS0zADs0jb6kC5v8o_Yy_85fhHj_J1A,7
|
|
123
|
+
torchx_nightly-2025.2.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|