torchx-nightly 2024.4.17__py3-none-any.whl → 2024.4.19__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/cli/cmd_run.py +12 -0
- torchx/runner/api.py +27 -13
- torchx/runner/events/__init__.py +2 -1
- {torchx_nightly-2024.4.17.dist-info → torchx_nightly-2024.4.19.dist-info}/METADATA +1 -1
- {torchx_nightly-2024.4.17.dist-info → torchx_nightly-2024.4.19.dist-info}/RECORD +9 -9
- {torchx_nightly-2024.4.17.dist-info → torchx_nightly-2024.4.19.dist-info}/LICENSE +0 -0
- {torchx_nightly-2024.4.17.dist-info → torchx_nightly-2024.4.19.dist-info}/WHEEL +0 -0
- {torchx_nightly-2024.4.17.dist-info → torchx_nightly-2024.4.19.dist-info}/entry_points.txt +0 -0
- {torchx_nightly-2024.4.17.dist-info → torchx_nightly-2024.4.19.dist-info}/top_level.txt +0 -0
torchx/cli/cmd_run.py
CHANGED
|
@@ -11,6 +11,7 @@ import logging
|
|
|
11
11
|
import os
|
|
12
12
|
import sys
|
|
13
13
|
import threading
|
|
14
|
+
from collections import Counter
|
|
14
15
|
from dataclasses import asdict
|
|
15
16
|
from pathlib import Path
|
|
16
17
|
from pprint import pformat
|
|
@@ -84,6 +85,17 @@ def _parse_component_name_and_args(
|
|
|
84
85
|
component = args[0]
|
|
85
86
|
component_args = args[1:]
|
|
86
87
|
|
|
88
|
+
# Error if there are repeated command line arguments
|
|
89
|
+
all_options = [
|
|
90
|
+
x
|
|
91
|
+
for x in component_args
|
|
92
|
+
if x.startswith("-") and x.strip() != "-" and x.strip() != "--"
|
|
93
|
+
]
|
|
94
|
+
arg_count = Counter(all_options)
|
|
95
|
+
duplicates = [arg for arg, count in arg_count.items() if count > 1]
|
|
96
|
+
if len(duplicates) > 0:
|
|
97
|
+
subparser.error(f"Repeated Command Line Arguments: {duplicates}")
|
|
98
|
+
|
|
87
99
|
if not component:
|
|
88
100
|
subparser.error(MISSING_COMPONENT_ERROR_MSG)
|
|
89
101
|
|
torchx/runner/api.py
CHANGED
|
@@ -177,15 +177,20 @@ class Runner:
|
|
|
177
177
|
ComponentNotFoundException: if the ``component_path`` is failed to resolve.
|
|
178
178
|
"""
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
180
|
+
with log_event("run_component") as ctx:
|
|
181
|
+
dryrun_info = self.dryrun_component(
|
|
182
|
+
component,
|
|
183
|
+
component_args,
|
|
184
|
+
scheduler,
|
|
185
|
+
cfg=cfg,
|
|
186
|
+
workspace=workspace,
|
|
187
|
+
parent_run_id=parent_run_id,
|
|
188
|
+
)
|
|
189
|
+
handle = self.schedule(dryrun_info)
|
|
190
|
+
ctx._torchx_event.scheduler = none_throws(dryrun_info._scheduler)
|
|
191
|
+
ctx._torchx_event.app_image = none_throws(dryrun_info._app).roles[0].image
|
|
192
|
+
ctx._torchx_event.app_id = parse_app_handle(handle)[2]
|
|
193
|
+
return handle
|
|
189
194
|
|
|
190
195
|
def dryrun_component(
|
|
191
196
|
self,
|
|
@@ -232,10 +237,19 @@ class Runner:
|
|
|
232
237
|
An application handle that is used to call other action APIs on the app.
|
|
233
238
|
"""
|
|
234
239
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
240
|
+
with log_event(api="run", runcfg=json.dumps(cfg) if cfg else None) as ctx:
|
|
241
|
+
dryrun_info = self.dryrun(
|
|
242
|
+
app,
|
|
243
|
+
scheduler,
|
|
244
|
+
cfg=cfg,
|
|
245
|
+
workspace=workspace,
|
|
246
|
+
parent_run_id=parent_run_id,
|
|
247
|
+
)
|
|
248
|
+
handle = self.schedule(dryrun_info)
|
|
249
|
+
ctx._torchx_event.scheduler = none_throws(dryrun_info._scheduler)
|
|
250
|
+
ctx._torchx_event.app_image = none_throws(dryrun_info._app).roles[0].image
|
|
251
|
+
ctx._torchx_event.app_id = parse_app_handle(handle)[2]
|
|
252
|
+
return handle
|
|
239
253
|
|
|
240
254
|
def schedule(self, dryrun_info: AppDryRunInfo) -> AppHandle:
|
|
241
255
|
"""
|
torchx/runner/events/__init__.py
CHANGED
|
@@ -96,7 +96,8 @@ class log_event:
|
|
|
96
96
|
def __enter__(self) -> "log_event":
|
|
97
97
|
self._start_cpu_time_ns = time.process_time_ns()
|
|
98
98
|
self._start_wall_time_ns = time.perf_counter_ns()
|
|
99
|
-
self.
|
|
99
|
+
self._torchx_event.start_epoch_time_usec = int(time.time() * 1_000_000)
|
|
100
|
+
|
|
100
101
|
return self
|
|
101
102
|
|
|
102
103
|
def __exit__(
|
|
@@ -16,7 +16,7 @@ torchx/cli/cmd_configure.py,sha256=1kTv0qbsbV44So74plAySwWu56pQrqjhfW_kbfdC3Rw,1
|
|
|
16
16
|
torchx/cli/cmd_describe.py,sha256=E5disbHoKTsqYKp2s3DaFW9GDLCCOgdOc3pQoHKoyCs,1283
|
|
17
17
|
torchx/cli/cmd_list.py,sha256=BVqHEW2oTEJ3GqcFK7c1K-i2R-DUjaXQ-WBr0meeIGM,1429
|
|
18
18
|
torchx/cli/cmd_log.py,sha256=Xh5vrsbwyV_ppwurrENGBNKxc1XLVbFC6YH1b8jlHAM,6104
|
|
19
|
-
torchx/cli/cmd_run.py,sha256=
|
|
19
|
+
torchx/cli/cmd_run.py,sha256=3IewCg6KqUY8V8Uhm6LSUyoNvbw64QQC-zVdh_hOTTA,10968
|
|
20
20
|
torchx/cli/cmd_runopts.py,sha256=NWZiP8XpQjfTDJgays2c6MgL_8wxFoeDge6NstaZdKk,1302
|
|
21
21
|
torchx/cli/cmd_status.py,sha256=ubtmCp4PylrIh_kC3ZJ5QJm7lzXRt_aRPmY7j-sZu_0,1836
|
|
22
22
|
torchx/cli/cmd_tracker.py,sha256=RfLxE4Cq1wfk7k051RtZ8RPJp0pEKSCa3KmTeRs3LF8,5218
|
|
@@ -55,9 +55,9 @@ torchx/pipelines/kfp/__init__.py,sha256=8iJ8lql_fxwuk9VCYSxXnX6tPL228fB5mDZpOs-k
|
|
|
55
55
|
torchx/pipelines/kfp/adapter.py,sha256=q9fGRS3-xOYVl-tAjTNlUFLbw22r5IiCz9IP34t1rWU,8959
|
|
56
56
|
torchx/pipelines/kfp/version.py,sha256=mYBxd6bm4MeR34D--xo-JLQ9wHeAl_ZQLwbItCf9tr0,539
|
|
57
57
|
torchx/runner/__init__.py,sha256=x8Sz7s_tLxPgJgvWIhK4ju9BNZU61uBFywGwDY6CqJs,315
|
|
58
|
-
torchx/runner/api.py,sha256=
|
|
58
|
+
torchx/runner/api.py,sha256=AuP2qGGPotawzBOrsZHw5pQq8uzDTIelp6PiGNe1DAA,27869
|
|
59
59
|
torchx/runner/config.py,sha256=pBNbe51EvsfyZvOdhAKvobq0V9lKtpnDkWUzEgnxiP4,17838
|
|
60
|
-
torchx/runner/events/__init__.py,sha256=
|
|
60
|
+
torchx/runner/events/__init__.py,sha256=3FBI4y9oaLFUs6TtTjJAWmGV24WLP_GkOo9AfhDrfxg,4179
|
|
61
61
|
torchx/runner/events/api.py,sha256=EgXK2wF_qc_zZHFgVHNcSAaPibyjM91DfQVtkXXcC-E,2195
|
|
62
62
|
torchx/runner/events/handlers.py,sha256=ThHCIJW21BfBgB7b6ftyjASJmD1KdizpjuTtsyqnvJs,522
|
|
63
63
|
torchx/runtime/__init__.py,sha256=Wxje2BryzeQneFu5r6P9JJiEKG-_C9W1CcZ_JNrKT6g,593
|
|
@@ -112,9 +112,9 @@ torchx/workspace/__init__.py,sha256=FqN8AN4VhR1C_SBY10MggQvNZmyanbbuPuE-JCjkyUY,
|
|
|
112
112
|
torchx/workspace/api.py,sha256=1heBmPgB-W5Zf9gwViM7NrqvHpZlVYeMN7jpY8Qkytc,5479
|
|
113
113
|
torchx/workspace/dir_workspace.py,sha256=npNW_IjUZm_yS5r-8hrRkH46ndDd9a_eApT64m1S1T4,2268
|
|
114
114
|
torchx/workspace/docker_workspace.py,sha256=PFu2KQNVC-0p2aKJ-W_BKA9ZOmXdCY2ABEkCExp3udQ,10269
|
|
115
|
-
torchx_nightly-2024.4.
|
|
116
|
-
torchx_nightly-2024.4.
|
|
117
|
-
torchx_nightly-2024.4.
|
|
118
|
-
torchx_nightly-2024.4.
|
|
119
|
-
torchx_nightly-2024.4.
|
|
120
|
-
torchx_nightly-2024.4.
|
|
115
|
+
torchx_nightly-2024.4.19.dist-info/LICENSE,sha256=WVHfXhFC0Ia8LTKt_nJVYobdqTJVg_4J3Crrfm2A8KQ,1721
|
|
116
|
+
torchx_nightly-2024.4.19.dist-info/METADATA,sha256=vW_XlkqLiWNAZiCPH7hHbUXZC6jvcixer3KG_Tb3vLY,6053
|
|
117
|
+
torchx_nightly-2024.4.19.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
118
|
+
torchx_nightly-2024.4.19.dist-info/entry_points.txt,sha256=3JYZFlX9aWzR-Gs_qsx1zq7mlqbFz6Mi9rQUULW8caI,170
|
|
119
|
+
torchx_nightly-2024.4.19.dist-info/top_level.txt,sha256=pxew3bc2gsiViS0zADs0jb6kC5v8o_Yy_85fhHj_J1A,7
|
|
120
|
+
torchx_nightly-2024.4.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|