torchx-nightly 2025.10.30__py3-none-any.whl → 2025.10.31__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/schedulers/kubernetes_scheduler.py +27 -5
- {torchx_nightly-2025.10.30.dist-info → torchx_nightly-2025.10.31.dist-info}/METADATA +1 -1
- {torchx_nightly-2025.10.30.dist-info → torchx_nightly-2025.10.31.dist-info}/RECORD +7 -7
- {torchx_nightly-2025.10.30.dist-info → torchx_nightly-2025.10.31.dist-info}/LICENSE +0 -0
- {torchx_nightly-2025.10.30.dist-info → torchx_nightly-2025.10.31.dist-info}/WHEEL +0 -0
- {torchx_nightly-2025.10.30.dist-info → torchx_nightly-2025.10.31.dist-info}/entry_points.txt +0 -0
- {torchx_nightly-2025.10.30.dist-info → torchx_nightly-2025.10.31.dist-info}/top_level.txt +0 -0
|
@@ -101,6 +101,7 @@ and adding or overriding specified ones.
|
|
|
101
101
|
|
|
102
102
|
import json
|
|
103
103
|
import logging
|
|
104
|
+
import re
|
|
104
105
|
import warnings
|
|
105
106
|
from dataclasses import dataclass
|
|
106
107
|
from datetime import datetime
|
|
@@ -984,13 +985,34 @@ def create_scheduler(
|
|
|
984
985
|
def pod_labels(
|
|
985
986
|
app: AppDef, role_idx: int, role: Role, replica_id: int, app_id: str
|
|
986
987
|
) -> Dict[str, str]:
|
|
988
|
+
|
|
989
|
+
def clean(label_value: str) -> str:
|
|
990
|
+
# cleans the provided `label_value` to make it compliant
|
|
991
|
+
# to pod label specs as described in
|
|
992
|
+
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
|
993
|
+
#
|
|
994
|
+
# Valid label value:
|
|
995
|
+
# must be 63 characters or less (can be empty),
|
|
996
|
+
# unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
|
|
997
|
+
# could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
|
|
998
|
+
|
|
999
|
+
# Replace invalid characters (allow: alphanum, -, _, .) with "."
|
|
1000
|
+
label_value = re.sub(r"[^A-Za-z0-9\-_.]", ".", label_value)
|
|
1001
|
+
# Replace leading non-alphanumeric with "."
|
|
1002
|
+
label_value = re.sub(r"^[^A-Za-z0-9]+", ".", label_value)
|
|
1003
|
+
# Replace trailing non-alphanumeric with "."
|
|
1004
|
+
label_value = re.sub(r"[^A-Za-z0-9]+$", ".", label_value)
|
|
1005
|
+
|
|
1006
|
+
# Trim to 63 characters
|
|
1007
|
+
return label_value[:63]
|
|
1008
|
+
|
|
987
1009
|
return {
|
|
988
|
-
LABEL_VERSION: torchx.__version__,
|
|
989
|
-
LABEL_APP_NAME: app.name,
|
|
1010
|
+
LABEL_VERSION: clean(torchx.__version__),
|
|
1011
|
+
LABEL_APP_NAME: clean(app.name),
|
|
990
1012
|
LABEL_ROLE_INDEX: str(role_idx),
|
|
991
|
-
LABEL_ROLE_NAME: role.name,
|
|
1013
|
+
LABEL_ROLE_NAME: clean(role.name),
|
|
992
1014
|
LABEL_REPLICA_ID: str(replica_id),
|
|
993
|
-
LABEL_KUBE_APP_NAME: app.name,
|
|
1015
|
+
LABEL_KUBE_APP_NAME: clean(app.name),
|
|
994
1016
|
LABEL_ORGANIZATION: "torchx.pytorch.org",
|
|
995
|
-
LABEL_UNIQUE_NAME: app_id,
|
|
1017
|
+
LABEL_UNIQUE_NAME: clean(app_id),
|
|
996
1018
|
}
|
|
@@ -65,7 +65,7 @@ torchx/schedulers/devices.py,sha256=RjVcu22ZRl_9OKtOtmA1A3vNXgu2qD6A9ST0L0Hsg4I,
|
|
|
65
65
|
torchx/schedulers/docker_scheduler.py,sha256=x-XHCqYnrmiW0dHfVA7hz7Fp2Qgw7fvMgRm058YOngY,16880
|
|
66
66
|
torchx/schedulers/ids.py,sha256=3E-_vwVYC-8Tv8kjuY9-W7TbOe_-Laqd8a65uIN3hQY,1798
|
|
67
67
|
torchx/schedulers/kubernetes_mcad_scheduler.py,sha256=1tuzq3OutCMdSPqg_dNmCHt_wyuSFKG0-ywLc3qITJo,42949
|
|
68
|
-
torchx/schedulers/kubernetes_scheduler.py,sha256=
|
|
68
|
+
torchx/schedulers/kubernetes_scheduler.py,sha256=86ny9XXt9tdeV6Y7AlVFQ6vhxlviOdNeZUz4gOzU3cc,34478
|
|
69
69
|
torchx/schedulers/local_scheduler.py,sha256=ttnxFDy48_DSYDEW-no27OirFZOyfrjwJ2S1MwBUi74,41929
|
|
70
70
|
torchx/schedulers/lsf_scheduler.py,sha256=YS6Yel8tXJqLPxbcGz95lZG2nCi36AQXdNDyuBJePKg,17661
|
|
71
71
|
torchx/schedulers/slurm_scheduler.py,sha256=vypGaCZe61bkyNkqRlK4Iwmk_NaAUQi-DsspaWd6BZw,31873
|
|
@@ -103,9 +103,9 @@ torchx/workspace/__init__.py,sha256=FqN8AN4VhR1C_SBY10MggQvNZmyanbbuPuE-JCjkyUY,
|
|
|
103
103
|
torchx/workspace/api.py,sha256=UESQ4qgxXjsb6Y1wP9OGv2ixaFgaTs3SqghmNuOJIZM,10235
|
|
104
104
|
torchx/workspace/dir_workspace.py,sha256=npNW_IjUZm_yS5r-8hrRkH46ndDd9a_eApT64m1S1T4,2268
|
|
105
105
|
torchx/workspace/docker_workspace.py,sha256=PFu2KQNVC-0p2aKJ-W_BKA9ZOmXdCY2ABEkCExp3udQ,10269
|
|
106
|
-
torchx_nightly-2025.10.
|
|
107
|
-
torchx_nightly-2025.10.
|
|
108
|
-
torchx_nightly-2025.10.
|
|
109
|
-
torchx_nightly-2025.10.
|
|
110
|
-
torchx_nightly-2025.10.
|
|
111
|
-
torchx_nightly-2025.10.
|
|
106
|
+
torchx_nightly-2025.10.31.dist-info/LICENSE,sha256=WVHfXhFC0Ia8LTKt_nJVYobdqTJVg_4J3Crrfm2A8KQ,1721
|
|
107
|
+
torchx_nightly-2025.10.31.dist-info/METADATA,sha256=gjm2Vsza2QfFIcUMJFJ6kAc8BKngvH4j4Ctjgh3-l2U,5046
|
|
108
|
+
torchx_nightly-2025.10.31.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
109
|
+
torchx_nightly-2025.10.31.dist-info/entry_points.txt,sha256=T328AMXeKI3JZnnxfkEew2ZcMN1oQDtkXjMz7lkV-P4,169
|
|
110
|
+
torchx_nightly-2025.10.31.dist-info/top_level.txt,sha256=pxew3bc2gsiViS0zADs0jb6kC5v8o_Yy_85fhHj_J1A,7
|
|
111
|
+
torchx_nightly-2025.10.31.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{torchx_nightly-2025.10.30.dist-info → torchx_nightly-2025.10.31.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|