torchx-nightly 2025.2.11__py3-none-any.whl → 2025.2.13__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/runner/api.py CHANGED
@@ -412,6 +412,14 @@ class Runner:
412
412
  ):
413
413
  sched = self._scheduler(scheduler)
414
414
  resolved_cfg = sched.run_opts().resolve(cfg)
415
+
416
+ # early validation before build workspace
417
+ with log_event(
418
+ "pre_build_validate",
419
+ scheduler,
420
+ ):
421
+ sched._pre_build_validate(app, scheduler, resolved_cfg)
422
+
415
423
  if workspace and isinstance(sched, WorkspaceMixin):
416
424
  role = app.roles[0]
417
425
  old_img = role.image
@@ -420,7 +428,13 @@ class Runner:
420
428
  logger.info(
421
429
  'To disable workspaces pass: --workspace="" from CLI or workspace=None programmatically.'
422
430
  )
423
- sched.build_workspace_and_update_role(role, workspace, resolved_cfg)
431
+ with log_event(
432
+ "build_workspace_and_update_role",
433
+ scheduler,
434
+ ) as ctx:
435
+ sched.build_workspace_and_update_role(role, workspace, resolved_cfg)
436
+ ctx._torchx_event.app_image = role.image
437
+ ctx._torchx_event.workspace = workspace
424
438
 
425
439
  if old_img != role.image:
426
440
  logger.info(
torchx/schedulers/api.py CHANGED
@@ -337,12 +337,19 @@ class Scheduler(abc.ABC, Generic[T]):
337
337
  f"{self.__class__.__qualname__} does not support application log iteration"
338
338
  )
339
339
 
340
+ def _pre_build_validate(self, app: AppDef, scheduler: str, cfg: T) -> None:
341
+ """
342
+ validates before workspace build whether application is consistent with the scheduler.
343
+
344
+ Raises error if application is not compatible with scheduler
345
+ """
346
+ pass
347
+
340
348
  def _validate(self, app: AppDef, scheduler: str, cfg: T) -> None:
341
349
  """
342
- Validates whether application is consistent with the scheduler.
350
+ Validates after workspace build whether application is consistent with the scheduler.
343
351
 
344
- Raises:
345
- ValueError: if application is not compatible with scheduler
352
+ Raises error if application is not compatible with scheduler
346
353
  """
347
354
  for role in app.roles:
348
355
  if role.resource == NULL_RESOURCE:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torchx-nightly
3
- Version: 2025.2.11
3
+ Version: 2025.2.13
4
4
  Summary: TorchX SDK and Components
5
5
  Home-page: https://github.com/pytorch/torchx
6
6
  Author: TorchX Devs
@@ -56,7 +56,7 @@ torchx/pipelines/kfp/__init__.py,sha256=8iJ8lql_fxwuk9VCYSxXnX6tPL228fB5mDZpOs-k
56
56
  torchx/pipelines/kfp/adapter.py,sha256=5GeHULjb1kxG6wJtYVLpNkgdzUi4iYEaR42VFOwT6fY,9045
57
57
  torchx/pipelines/kfp/version.py,sha256=mYBxd6bm4MeR34D--xo-JLQ9wHeAl_ZQLwbItCf9tr0,539
58
58
  torchx/runner/__init__.py,sha256=x8Sz7s_tLxPgJgvWIhK4ju9BNZU61uBFywGwDY6CqJs,315
59
- torchx/runner/api.py,sha256=yeKM3I9OA8Y9Bg4JTsHxmsS8NwroNwbUFNDDYM7c2bE,29440
59
+ torchx/runner/api.py,sha256=Euzq07b_4umFZmQ6woKd3uHpdAy24N9NHJVsjDHVPXk,29945
60
60
  torchx/runner/config.py,sha256=qpq_RfUSUykquAsEKOhDT3xBsa-m3wc6F6O8oP2QJ7k,18303
61
61
  torchx/runner/events/__init__.py,sha256=1_y0bojXl3FL0zlAj7BI4Dg5cXKXUmaa2jZbVH0EDUA,5268
62
62
  torchx/runner/events/api.py,sha256=pPLfowWTXtN_XcrEDNI45pE6Ijvdc_Gdxq76RduqgGE,2664
@@ -65,7 +65,7 @@ torchx/runtime/__init__.py,sha256=Wxje2BryzeQneFu5r6P9JJiEKG-_C9W1CcZ_JNrKT6g,59
65
65
  torchx/runtime/tracking/__init__.py,sha256=dYnAPnrXYREfPXkpHhdOFkcYIODWEbA13PdD-wLQYBo,3055
66
66
  torchx/runtime/tracking/api.py,sha256=SmUQyUKZqG3KlAhT7CJOGqRz1O274E4m63wQeOVq3CU,5472
67
67
  torchx/schedulers/__init__.py,sha256=gwy1opmKOPzQ_Lqh2GY0chYycLmdissLfd4846mPEMY,2334
68
- torchx/schedulers/api.py,sha256=jAjfTKNgw26Rc5-FsZCSFt1xQIBNzXdUjUeOlllCuIU,14163
68
+ torchx/schedulers/api.py,sha256=h5gtxDz4gAMe4WN-caNFvZqpLE2DUqWpssGZng4J1Mc,14449
69
69
  torchx/schedulers/aws_batch_scheduler.py,sha256=8jRTmi5gtqyKUQfhMRqCQqNVM0drXdu8RS0xUfZby48,28091
70
70
  torchx/schedulers/aws_sagemaker_scheduler.py,sha256=x33J_tQFpRr_AUv5dWf1qxqG0dbmIjaqFHyrSnHWijw,20921
71
71
  torchx/schedulers/devices.py,sha256=RjVcu22ZRl_9OKtOtmA1A3vNXgu2qD6A9ST0L0Hsg4I,1734
@@ -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.11.dist-info/LICENSE,sha256=WVHfXhFC0Ia8LTKt_nJVYobdqTJVg_4J3Crrfm2A8KQ,1721
119
- torchx_nightly-2025.2.11.dist-info/METADATA,sha256=GDveXQ8rce7GIv66nAatJbPI3wMjIBDQYqreXfBrWkc,6169
120
- torchx_nightly-2025.2.11.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
121
- torchx_nightly-2025.2.11.dist-info/entry_points.txt,sha256=T328AMXeKI3JZnnxfkEew2ZcMN1oQDtkXjMz7lkV-P4,169
122
- torchx_nightly-2025.2.11.dist-info/top_level.txt,sha256=pxew3bc2gsiViS0zADs0jb6kC5v8o_Yy_85fhHj_J1A,7
123
- torchx_nightly-2025.2.11.dist-info/RECORD,,
118
+ torchx_nightly-2025.2.13.dist-info/LICENSE,sha256=WVHfXhFC0Ia8LTKt_nJVYobdqTJVg_4J3Crrfm2A8KQ,1721
119
+ torchx_nightly-2025.2.13.dist-info/METADATA,sha256=fTOjnDkhvUFdkZnoyCUTTZeMpbft6_-kMzPba8n5Ntk,6169
120
+ torchx_nightly-2025.2.13.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
121
+ torchx_nightly-2025.2.13.dist-info/entry_points.txt,sha256=T328AMXeKI3JZnnxfkEew2ZcMN1oQDtkXjMz7lkV-P4,169
122
+ torchx_nightly-2025.2.13.dist-info/top_level.txt,sha256=pxew3bc2gsiViS0zADs0jb6kC5v8o_Yy_85fhHj_J1A,7
123
+ torchx_nightly-2025.2.13.dist-info/RECORD,,