zenml-nightly 0.84.2.dev20250821__py3-none-any.whl → 0.84.2.dev20250822__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.
zenml/VERSION CHANGED
@@ -1 +1 @@
1
- 0.84.2.dev20250821
1
+ 0.84.2.dev20250822
@@ -141,46 +141,6 @@ def load_kube_config(
141
141
  k8s_config.load_kube_config(context=context)
142
142
 
143
143
 
144
- def calculate_max_pod_name_length_for_namespace(namespace: str) -> int:
145
- """Calculate the max pod length for a certain namespace.
146
-
147
- Args:
148
- namespace: The namespace in which the pod will be created.
149
-
150
- Returns:
151
- The maximum pod name length.
152
- """
153
- # Kubernetes allows Pod names to have 253 characters. However, when
154
- # creating a pod they try to create a log file which is called
155
- # <NAMESPACE>_<POD_NAME>_<UUID>, which adds additional characters and
156
- # runs into filesystem limitations for filename lengths (255). We therefore
157
- # subtract the length of a UUID (36), the two underscores and the
158
- # namespace length from the max filename length.
159
- return 255 - 38 - len(namespace)
160
-
161
-
162
- def sanitize_pod_name(pod_name: str, namespace: str) -> str:
163
- """Sanitize pod names so they conform to Kubernetes pod naming convention.
164
-
165
- Args:
166
- pod_name: Arbitrary input pod name.
167
- namespace: Namespace in which the Pod will be created.
168
-
169
- Returns:
170
- Sanitized pod name.
171
- """
172
- # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names
173
- pod_name = re.sub(r"[^a-z0-9-]", "-", pod_name.lower())
174
- pod_name = re.sub(r"^[-]+", "", pod_name)
175
- pod_name = re.sub(r"[-]+$", "", pod_name)
176
- pod_name = re.sub(r"[-]+", "-", pod_name)
177
-
178
- allowed_length = calculate_max_pod_name_length_for_namespace(
179
- namespace=namespace
180
- )
181
- return pod_name[:allowed_length]
182
-
183
-
184
144
  def sanitize_label(label: str) -> str:
185
145
  """Sanitize a label for a Kubernetes resource.
186
146
 
@@ -193,10 +153,13 @@ def sanitize_label(label: str) -> str:
193
153
  # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#rfc-1035-label-names
194
154
  label = re.sub(r"[^a-z0-9-]", "-", label.lower())
195
155
  label = re.sub(r"^[-]+", "", label)
196
- label = re.sub(r"[-]+$", "", label)
197
156
  label = re.sub(r"[-]+", "-", label)
157
+ label = label[:63]
158
+ # Remove trailing dashes after truncation to make sure we end with an
159
+ # alphanumeric character
160
+ label = re.sub(r"[-]+$", "", label)
198
161
 
199
- return label[:63]
162
+ return label
200
163
 
201
164
 
202
165
  def pod_is_not_pending(pod: k8s_client.V1Pod) -> bool:
@@ -58,7 +58,9 @@ def collect_exception_information(
58
58
  )
59
59
  end_line = start_line + len(lines)
60
60
 
61
- line_pattern = re.compile(f'File "{source_file}", line (\d+),')
61
+ line_pattern = re.compile(
62
+ rf'File "{re.escape(source_file)}", line (\d+),'
63
+ )
62
64
 
63
65
  for index, line in enumerate(tb):
64
66
  match = line_pattern.search(line)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zenml-nightly
3
- Version: 0.84.2.dev20250821
3
+ Version: 0.84.2.dev20250822
4
4
  Summary: ZenML: Write production-ready ML code.
5
5
  License: Apache-2.0
6
6
  Keywords: machine learning,production,pipeline,mlops,devops
@@ -1,5 +1,5 @@
1
1
  zenml/README.md,sha256=827dekbOWAs1BpW7VF1a4d7EbwPbjwccX-2zdXBENZo,1777
2
- zenml/VERSION,sha256=BU1fQtpgvlUdd-WqGfLOlV5VSASH_i-rWYm1p9NHdKY,19
2
+ zenml/VERSION,sha256=QDrfWptgjmt1A4P9nq9FYItXqMOYstyA2heyytgqDt0,19
3
3
  zenml/__init__.py,sha256=r7JUg2SVDf_dPhS7iU6vudKusEqK4ics7_jFMZhq0o4,2731
4
4
  zenml/actions/__init__.py,sha256=mrt6wPo73iKRxK754_NqsGyJ3buW7RnVeIGXr1xEw8Y,681
5
5
  zenml/actions/base_action.py,sha256=UcaHev6BTuLDwuswnyaPjdA8AgUqB5xPZ-lRtuvf2FU,25553
@@ -339,7 +339,7 @@ zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py,sha256=O
339
339
  zenml/integrations/kubernetes/flavors/kubernetes_step_operator_flavor.py,sha256=unk8I8uYXn3pJS3HajEhZodhsdFvvhCTs5NzzqkQk3Q,7453
340
340
  zenml/integrations/kubernetes/orchestrators/__init__.py,sha256=TJID3OTieZBox36WpQpzD0jdVRA_aZVcs_bNtfXS8ik,811
341
341
  zenml/integrations/kubernetes/orchestrators/dag_runner.py,sha256=IDumuhi9hySiTZ7oTI6hz5RlJ4kiuv3NpVYgA_pLS_Y,12044
342
- zenml/integrations/kubernetes/orchestrators/kube_utils.py,sha256=soQPph_FWFPAwL7vpZX91cu8jEjo4xBYnafLUdMNtnw,38684
342
+ zenml/integrations/kubernetes/orchestrators/kube_utils.py,sha256=XXBs-iE77X0J6K-uRQxXK-iir4IY-Uz3p1b82iQlJ9k,37335
343
343
  zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py,sha256=TnrKa6xnrYtAq1elyob0aRy-aTLrSjLuuOzdLSs_GFs,36811
344
344
  zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py,sha256=QahXJ-cM6lrXqWs2BHMQtKQf3svqKB5l69d4D0OB4qc,24789
345
345
  zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint_configuration.py,sha256=QOwQnWCfB-t_BQ2eOZN0SakurGUd0GTMCSdUlREhk6I,2324
@@ -778,7 +778,7 @@ zenml/utils/docker_utils.py,sha256=occ364GUasOyiEipCcBHdK1WSvh1oVJIVnc-XXNsrcE,1
778
778
  zenml/utils/downloaded_repository_context.py,sha256=GyPOzC8M3SaEGnnbPgEgJhUW-m5hx9rLScnCiGw6_PY,1504
779
779
  zenml/utils/enum_utils.py,sha256=0fA0B9v9Wjutuqlu_owUoOit1utIw2UH5J6YHXSqhLU,1368
780
780
  zenml/utils/env_utils.py,sha256=2--2DDUt3gPOvCNVyobBtAciikQ0OEXs5WWp7NvYuKo,5276
781
- zenml/utils/exception_utils.py,sha256=7X--e7ERx2PYzhNwyhFMzKyriBpPPLybS5blpdZe1PE,2965
781
+ zenml/utils/exception_utils.py,sha256=NkBBE7d9VKhhf4CyV5h7AkbuJ_F8IeCQDAaTUNfNIPs,3007
782
782
  zenml/utils/filesync_model.py,sha256=9ibsIr2HJfkEQ41upQd4uJ79ZhzB0MHS85GOGOAQ19Y,5470
783
783
  zenml/utils/function_utils.py,sha256=bznRrCrQIJ3Joc-QQ8ynDyn9AvyIcR61bzLnaXQV3tc,8109
784
784
  zenml/utils/git_utils.py,sha256=O2f6PUpDuMQrcmkcGXIhbJQpTzLM7p8PyiKWjcIuWqM,1831
@@ -1355,8 +1355,8 @@ zenml/zen_stores/secrets_stores/sql_secrets_store.py,sha256=LPFW757WCJLP1S8vrvjs
1355
1355
  zenml/zen_stores/sql_zen_store.py,sha256=-3zeByIUjIvsx3564O2gJ463512QkZl04okL3eB-nJs,491568
1356
1356
  zenml/zen_stores/template_utils.py,sha256=iCXrXpqzVTY7roqop4Eh9J7DmLW6PQeILZexmw_l3b8,10074
1357
1357
  zenml/zen_stores/zen_store_interface.py,sha256=weiSULdI9AsbCE10a5TcwtybX-BJs9hKhjPJnTapWv4,93023
1358
- zenml_nightly-0.84.2.dev20250821.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1359
- zenml_nightly-0.84.2.dev20250821.dist-info/METADATA,sha256=odTEr5qNuiuneU0oO5mGutzgwLgkydiTCv6stSAs0GM,25251
1360
- zenml_nightly-0.84.2.dev20250821.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
1361
- zenml_nightly-0.84.2.dev20250821.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1362
- zenml_nightly-0.84.2.dev20250821.dist-info/RECORD,,
1358
+ zenml_nightly-0.84.2.dev20250822.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1359
+ zenml_nightly-0.84.2.dev20250822.dist-info/METADATA,sha256=HC6BQCgcWx-6xFlDAesgHakIXPJTLMF_8-pVAzC0_i0,25251
1360
+ zenml_nightly-0.84.2.dev20250822.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
1361
+ zenml_nightly-0.84.2.dev20250822.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1362
+ zenml_nightly-0.84.2.dev20250822.dist-info/RECORD,,