acoustic-carpenter-78188
03/31/2023, 9:39 AMtask_config argument.
Currently this fails with:
Failed with Unknown Exception <class 'TypeError'> Reason: __init__() got multiple values for keyword argument 'task_config'
__init__() got multiple values for keyword argument 'task_config'
Expected behavior
This code should execute without any error message:
from flytekitplugins.pod import Pod
from kubernetes.client.models import V1PodSpec
from flytekit import ContainerTask, workflow, kwtypes, Resources
TC = Pod(
pod_spec=V1PodSpec(
containers=[],
node_selector={"key": "value"},
)
)
ct_task = ContainerTask(
name="ellipse-area-metadata-shell",
task_config=TC,
input_data_dir="/var/inputs",
output_data_dir="/var/outputs",
inputs=kwtypes(a=float, b=float),
outputs=kwtypes(area=float, metadata=str),
image="<http://ghcr.io/flyteorg/rawcontainers-shell:v2|ghcr.io/flyteorg/rawcontainers-shell:v2>",
command=[
"./calculate-ellipse-area.sh",
"{{.inputs.a}}",
"{{.inputs.b}}",
"/var/outputs",
],
requests=Resources(
cpu="100m",
mem="1G",
),
)
@workflow
def wf():
ct_task
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteacoustic-carpenter-78188
03/31/2023, 2:02 PM