|
38 | 38 | KJOB_SHELL_IMAGE, |
39 | 39 | KJOB_SHELL_INTERACTIVE_COMMAND, |
40 | 40 | KJOB_SHELL_WORKING_DIRECTORY, |
41 | | - XpkConfig, |
| 41 | + xpk_config, |
42 | 42 | ) |
43 | 43 | from .network import get_cluster_subnetworks |
44 | 44 | from .system_characteristics import AcceleratorType, SystemCharacteristics |
@@ -234,8 +234,7 @@ def get_pod_template_interactive_command() -> str: |
234 | 234 | Returns: |
235 | 235 | str - PodTemplate's interactive command |
236 | 236 | """ |
237 | | - config = XpkConfig() |
238 | | - pod_command = config.get(KJOB_SHELL_INTERACTIVE_COMMAND) |
| 237 | + pod_command = xpk_config.get(KJOB_SHELL_INTERACTIVE_COMMAND) |
239 | 238 | if pod_command is None or len(pod_command) == 0: |
240 | 239 | pod_command = PodTemplateDefaults.INTERACTIVE_COMMAND.value |
241 | 240 |
|
@@ -287,11 +286,10 @@ def create_job_template_instance( |
287 | 286 | Returns: |
288 | 287 | exit_code > 0 if creating JobTemplate fails, 0 otherwise |
289 | 288 | """ |
290 | | - config = XpkConfig() |
291 | | - job_image = config.get(KJOB_BATCH_IMAGE) |
| 289 | + job_image = xpk_config.get(KJOB_BATCH_IMAGE) |
292 | 290 | if job_image is None or len(job_image) == 0: |
293 | 291 | job_image = JobTemplateDefaults.IMAGE.value |
294 | | - working_directory = config.get(KJOB_BATCH_WORKING_DIRECTORY) |
| 292 | + working_directory = xpk_config.get(KJOB_BATCH_WORKING_DIRECTORY) |
295 | 293 | if working_directory is None or len(working_directory) == 0: |
296 | 294 | working_directory = JobTemplateDefaults.WORKING_DIRECTORY.value |
297 | 295 | resources = ( |
@@ -332,11 +330,10 @@ def create_pod_template_instance(service_account: str) -> int: |
332 | 330 | Returns: |
333 | 331 | exit_code > 0 if creating PodTemplate fails, 0 otherwise |
334 | 332 | """ |
335 | | - config = XpkConfig() |
336 | | - pod_image = config.get(KJOB_SHELL_IMAGE) |
| 333 | + pod_image = xpk_config.get(KJOB_SHELL_IMAGE) |
337 | 334 | if pod_image is None or len(pod_image) == 0: |
338 | 335 | pod_image = PodTemplateDefaults.IMAGE.value |
339 | | - working_directory = config.get(KJOB_SHELL_WORKING_DIRECTORY) |
| 336 | + working_directory = xpk_config.get(KJOB_SHELL_WORKING_DIRECTORY) |
340 | 337 | if working_directory is None or len(working_directory) == 0: |
341 | 338 | working_directory = PodTemplateDefaults.WORKING_DIRECTORY.value |
342 | 339 |
|
|
0 commit comments