konduktor-nightly 0.1.0.dev20250915104603__py3-none-any.whl → 0.1.0.dev20251107104752__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.
konduktor/__init__.py CHANGED
@@ -11,7 +11,7 @@ from konduktor.task import Task
11
11
  __all__ = ['launch', 'Resources', 'Task', 'Serving']
12
12
 
13
13
  # Replaced with the current commit when building the wheels.
14
- _KONDUKTOR_COMMIT_SHA = '5beb52b28b01054af032813e670311b459b932b3'
14
+ _KONDUKTOR_COMMIT_SHA = '5ceef9b8f579ac23f7a2bd863820aaa2341055e3'
15
15
  os.makedirs(os.path.expanduser('~/.konduktor'), exist_ok=True)
16
16
 
17
17
 
@@ -45,5 +45,5 @@ def _get_git_commit():
45
45
 
46
46
 
47
47
  __commit__ = _get_git_commit()
48
- __version__ = '1.0.0.dev0.1.0.dev20250915104603'
48
+ __version__ = '1.0.0.dev0.1.0.dev20251107104752'
49
49
  __root_dir__ = os.path.dirname(os.path.abspath(__file__))
@@ -18,3 +18,4 @@ STOP_USERNAME_LABEL = 'trainy.ai/stop-username'
18
18
  SECRET_BASENAME_LABEL = 'trainy.ai/secret-basename'
19
19
  SECRET_KIND_LABEL = 'trainy.ai/secret-kind'
20
20
  SECRET_OWNER_LABEL = 'trainy.ai/secret-owner'
21
+ ROOT_NAME = 'trainy.ai/root-name'
@@ -54,8 +54,19 @@ def _wait_for_all_ready(namespace: str, name: str):
54
54
  except ApiException:
55
55
  services_map = {}
56
56
 
57
- autoscaler = deployment_utils.get_autoscaler(namespace, name)
58
- autoscalers_map = {name: autoscaler} if autoscaler else {}
57
+ autoscalers_map = {}
58
+ try:
59
+ autoscaler_obj = deployment_utils.get_autoscaler(namespace, name)
60
+ if autoscaler_obj:
61
+ # detect aibrix vs general from deployment labels
62
+ labels = (deployment.metadata.labels or {}) if deployment else {}
63
+ is_aibrix = deployment_utils.AIBRIX_NAME_LABEL in labels
64
+ if is_aibrix:
65
+ autoscalers_map[name] = {'kpa': autoscaler_obj}
66
+ else:
67
+ autoscalers_map[name] = {'hpa': autoscaler_obj}
68
+ except ApiException:
69
+ pass
59
70
 
60
71
  status = deployment_utils.get_model_status(
61
72
  name, deployments_map, services_map, autoscalers_map
@@ -144,6 +155,7 @@ class DeploymentBackend(backend.Backend):
144
155
  namespace = kubernetes_utils.get_kube_config_context_namespace(context)
145
156
 
146
157
  if not dryrun and task.serving:
158
+ logger.debug(f'[DEBUG] Creating deployment for task: {task.name}')
147
159
  deployment_utils.create_deployment(
148
160
  namespace=namespace,
149
161
  task=task,
@@ -151,25 +163,30 @@ class DeploymentBackend(backend.Backend):
151
163
  dryrun=dryrun,
152
164
  )
153
165
 
166
+ logger.debug(f'[DEBUG] Creating service for task: {task.name}')
154
167
  deployment_utils.create_service(
155
168
  namespace=namespace,
156
169
  task=task,
157
170
  dryrun=dryrun,
158
171
  )
159
172
 
160
- deployment_utils.create_autoscaler(
173
+ # Create podautoscaler for non-general deployments
174
+ logger.debug(f'[DEBUG] Creating podautoscaler for task: {task.name}')
175
+ deployment_utils.create_pod_autoscaler(
161
176
  namespace=namespace,
162
177
  task=task,
163
178
  dryrun=dryrun,
164
179
  )
165
180
 
166
- # Apoxy resources for general deployments only when endpoint: trainy
167
- if deployment_utils.get_endpoint_type_from_config() == 'trainy':
168
- deployment_utils.create_apoxy_resources(
169
- namespace=namespace,
170
- task=task,
171
- dryrun=dryrun,
172
- )
181
+ # HTTP Add-on resources for general deployments
182
+ logger.debug(
183
+ f'[DEBUG] Creating HTTP Add-on resources for task: {task.name}'
184
+ )
185
+ deployment_utils.create_http_addon_resources(
186
+ namespace=namespace,
187
+ task=task,
188
+ dryrun=dryrun,
189
+ )
173
190
 
174
191
  if not dryrun and not detach_run:
175
192
  with ux_utils.print_exception_no_traceback():