Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle-yooh committed Dec 20, 2023
1 parent 92f215d commit 2a7a6e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,6 @@ def create_node_labels(args, system) -> str:
""".format(gke_accelerator=system.gke_accelerator, topology=system.topology)
elif args.device_type in GpuUserFacingNameToSystemCharacteristics:
return """cloud.google.com/gke-accelerator: {gke_accelerator}
cloud.google.com/gce-machine-type: {gce_machine_type}
""".format(gke_accelerator=system.gke_accelerator, gce_machine_type=system.gce_machine_type)
else:
raise ValueError("Unknown device type")
Expand All @@ -1866,7 +1865,6 @@ def create_node_selector(args, system) -> str:
""".format(gke_accelerator=system.gke_accelerator, topology=system.topology)
elif args.device_type in GpuUserFacingNameToSystemCharacteristics:
return """cloud.google.com/gke-accelerator: {gke_accelerator}
cloud.google.com/gce-machine-type: {gce_machine_type}
""".format(gke_accelerator=system.gke_accelerator,
gce_machine_type=system.gce_machine_type)
else:
Expand Down Expand Up @@ -1933,6 +1931,8 @@ def workload_create(args) -> int:
command=command,
node_selector=create_node_selector(args, system),
resource_type=get_resource_type(args))
print('*'*3 + 'print workload_create_yaml')
print(yml_string)
tmp = write_temporary_file(yml_string)
command = f'kubectl apply -f {str(tmp.file.name)}'

Expand Down

0 comments on commit 2a7a6e3

Please sign in to comment.