late-noon-138
09/13/2023, 1:02 AMfrom flytekit import task, workflow, Resources
@task(requests=Resources(cpu="1", gpu="1", mem="1Gi"),
container_image="<http://ghcr.io/flyteorg/flytecookbook:kfpytorch-latest|ghcr.io/flyteorg/flytecookbook:kfpytorch-latest>",)
def say_hello() -> str:
return "Hello, World!"
@workflow
def hello_world_wf_gpu() -> str:
res = say_hello()
return res
if __name__ == "__main__":
print(f"Running my_wf() {hello_world_wf_gpu()}")
When I run this workflow, I get the follow error . Any idea how to fix this ?late-noon-138
09/13/2023, 1:56 AMspec:
nodeSelector:
<http://cloud.google.com/gke-accelerator|cloud.google.com/gke-accelerator>: GPU_TYPE
How to specify/pass this from the Task config ?tall-lock-23197
late-noon-138
09/13/2023, 5:02 AMtall-lock-23197
late-noon-138
09/13/2023, 6:20 AM