accli 0.7.5__tar.gz → 0.7.6__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: accli
3
- Version: 0.7.5
3
+ Version: 0.7.6
4
4
  Summary: IIASA Accelerator Client
5
5
  Author-email: Wrufesh S <wrufesh@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -143,6 +143,21 @@ class JobDispatchModel(BaseModel):
143
143
  children: List['JobDispatchModel'] = []
144
144
  callback: Optional['JobDispatchModel']
145
145
 
146
+ def dict(self, *args, **kwargs):
147
+ result = super().dict(*args, **kwargs)
148
+ if result['is_holder_job'] and result['execute_cluster'] == 'WKUBE':
149
+ if len(result['children']) > 1:
150
+ if not result['children'][0]['job_kwargs'].get('docker_image'):
151
+ builder_task = result['children'][0].copy()
152
+
153
+ builder_task['build_only_task'] = True
154
+
155
+ builder_task['callback'] = result.copy()
156
+ builder_task['name'] = f"{builder_task['callback']['name']} -- Image Builder"
157
+ builder_task['callback']['name'] = f"{builder_task['callback']['name']} -- Holder"
158
+ return builder_task
159
+ return result
160
+
146
161
 
147
162
  class WKubeTaskMeta(BaseModel):
148
163
  required_cores: float
@@ -234,8 +249,9 @@ class WKubeTask(GenericTask):
234
249
  wkube_task_kwargs = None
235
250
  wkube_task_meta = dict()
236
251
 
237
- if (t_args or t_kwargs):
238
- name = t_kwargs.pop('name')
252
+
253
+ name = t_kwargs.pop('name') if 'name' in t_kwargs else None
254
+ if (t_args or t_kwargs):
239
255
  WKubeTaskPydantic(*t_args, **t_kwargs)
240
256
  wkube_task_kwargs = WKubeTaskKwargs(*t_args, **t_kwargs)
241
257
  wkube_task_meta.update(WKubeTaskMeta(*t_args, **t_kwargs).dict(exclude_unset=True))
@@ -1,3 +1,3 @@
1
1
  # Please strictly put double quote to use this info for git tag
2
2
  # Read developer guide for git tag command with regex
3
- VERSION = "v0.7.5"
3
+ VERSION = "v0.7.6"
@@ -212,12 +212,12 @@ def dispatch(
212
212
  print(job_to_dispatch.description)
213
213
 
214
214
 
215
- root_job_id = term_cli_project_service.dispatch(
216
- project_slug,
217
- job_to_dispatch.description
218
- )
215
+ # root_job_id = term_cli_project_service.dispatch(
216
+ # project_slug,
217
+ # job_to_dispatch.description
218
+ # )
219
219
 
220
- print(f"Dispatched root job #ID: {root_job_id}")
220
+ # print(f"Dispatched root job #ID: {root_job_id}")
221
221
 
222
222
 
223
223
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: accli
3
- Version: 0.7.5
3
+ Version: 0.7.6
4
4
  Summary: IIASA Accelerator Client
5
5
  Author-email: Wrufesh S <wrufesh@gmail.com>
6
6
  License: The MIT License (MIT)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes