3535
3636class SubmitConfig (BaseModel ):
3737 preemptible : bool
38- bootDiskSizeGb : float
38+ boot_volume_in_gb : float
3939 default_url_prefix : str
4040 machine_type : str
4141 image : str
@@ -196,7 +196,7 @@ def submit(jq: JobQueue, io: IO, cluster: Cluster, job_id: str, spec: dict, conf
196196 skip_kube_submit = True
197197
198198 preemptible = config .preemptible
199- bootDiskSizeGb = config .bootDiskSizeGb
199+ boot_volume_in_gb = config .boot_volume_in_gb
200200 default_url_prefix = config .default_url_prefix
201201 gpu_count = config .gpu_count
202202
@@ -240,7 +240,7 @@ def submit(jq: JobQueue, io: IO, cluster: Cluster, job_id: str, spec: dict, conf
240240 consume_exe_args = ["--cluster" , cluster_name , "--projectId" , project ,
241241 "--zones" , "," .join (config .zones ), "--port" , str (monitor_port )]
242242
243- machine_specs = MachineSpec (boot_volume_in_gb = bootDiskSizeGb ,
243+ machine_specs = MachineSpec (boot_volume_in_gb = boot_volume_in_gb ,
244244 mount_point = config .mount_point ,
245245 machine_type = config .machine_type ,
246246 gpu_count = gpu_count )
@@ -402,8 +402,14 @@ def add_submit_cmd(subparser):
402402 help = "Number of gpus on your VM" , default = 0 )
403403
404404
405- def _get_bootDiskSizeGb (config ):
406- bootDiskSizeGb_flag = config .get ("bootDiskSizeGb" , "20" )
405+ def _get_boot_volume_in_gb (config ):
406+ bootDiskSizeGb_flag = config .get ("bootDiskSizeGb" )
407+ if bootDiskSizeGb_flag is None :
408+ bootDiskSizeGb_flag = config .get ("bootdisksizegb" )
409+ if bootDiskSizeGb_flag is None :
410+ bootDiskSizeGb_flag = config .get ("boot_volume_in_gb" )
411+ if bootDiskSizeGb_flag is None :
412+ bootDiskSizeGb_flag = "20"
407413 bootDiskSizeGb = int (bootDiskSizeGb_flag )
408414 assert bootDiskSizeGb >= 10
409415 return bootDiskSizeGb
@@ -426,7 +432,7 @@ def submit_cmd(jq, io, cluster, args, config):
426432 "setting 'preemptible' in config must either by 'y' or 'n' but was: {}" .format (preemptible_flag ))
427433 preemptible = preemptible_flag == 'y'
428434
429- bootDiskSizeGb = _get_bootDiskSizeGb (config )
435+ boot_volume_in_gb = _get_boot_volume_in_gb (config )
430436 default_url_prefix = config .get ("default_url_prefix" , "" )
431437 work_dir = config .get ("local_work_dir" , os .path .expanduser (
432438 "~/.sparkles-cache/local_work_dir" ))
@@ -522,7 +528,7 @@ def submit_cmd(jq, io, cluster, args, config):
522528 log .debug ("spec: %s" , json .dumps (spec , indent = 2 ))
523529
524530 submit_config = SubmitConfig (preemptible = preemptible ,
525- bootDiskSizeGb = bootDiskSizeGb ,
531+ boot_volume_in_gb = boot_volume_in_gb ,
526532 default_url_prefix = default_url_prefix ,
527533 machine_type = machine_type ,
528534 image = spec ['image' ],
0 commit comments