accli 0.7.5__tar.gz → 0.7.8__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.8
4
4
  Summary: IIASA Accelerator Client
5
5
  Author-email: Wrufesh S <wrufesh@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -114,6 +114,7 @@ def push_folder_job(dir):
114
114
 
115
115
  class JobDispatchModel(BaseModel):
116
116
  is_holder_job: bool = True
117
+ build_only_task: bool = False
117
118
 
118
119
  name: str
119
120
 
@@ -143,6 +144,21 @@ class JobDispatchModel(BaseModel):
143
144
  children: List['JobDispatchModel'] = []
144
145
  callback: Optional['JobDispatchModel']
145
146
 
147
+ def dict(self, *args, **kwargs):
148
+ result = super().dict(*args, **kwargs)
149
+ if result['is_holder_job'] and result['execute_cluster'] == 'WKUBE':
150
+ if len(result['children']) > 1:
151
+ if not result['children'][0]['job_kwargs'].get('docker_image'):
152
+ builder_task = result['children'][0].copy()
153
+
154
+ builder_task['build_only_task'] = True
155
+
156
+ builder_task['callback'] = result.copy()
157
+ builder_task['name'] = f"{builder_task['callback']['name']} -- Image Builder"
158
+ builder_task['callback']['name'] = f"{builder_task['callback']['name']} -- Holder"
159
+ return builder_task
160
+ return result
161
+
146
162
 
147
163
  class WKubeTaskMeta(BaseModel):
148
164
  required_cores: float
@@ -234,8 +250,9 @@ class WKubeTask(GenericTask):
234
250
  wkube_task_kwargs = None
235
251
  wkube_task_meta = dict()
236
252
 
237
- if (t_args or t_kwargs):
238
- name = t_kwargs.pop('name')
253
+
254
+ name = t_kwargs.pop('name') if 'name' in t_kwargs else None
255
+ if (t_args or t_kwargs):
239
256
  WKubeTaskPydantic(*t_args, **t_kwargs)
240
257
  wkube_task_kwargs = WKubeTaskKwargs(*t_args, **t_kwargs)
241
258
  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.8"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: accli
3
- Version: 0.7.5
3
+ Version: 0.7.8
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
File without changes