You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task template creation can be simplified dramatically by just inspecting an action's arguments, instead of having complicated logic based on the action name.
As a rough template, something like:
def create_task_template(tool, action):
command_template = ["{entrypoint}"]
for arg in action.kwargs.values():
command_template.append(f"--{arg}")
command_template.append(f"{{{arg}}}")
joined_template = " ".join(command_template)
# Assume entrypoint is an op arg, all others are node args.
task_template = tool.create_task_template(
template_name=action.name,
command_template=joined_template,
node_args=list(action.kwargs.keys()),
op_args=["entrypoint"],
default_cluster_name=tool.default_cluster_name,
yaml_file="",
)
return task_template
The text was updated successfully, but these errors were encountered:
Task template creation can be simplified dramatically by just inspecting an action's arguments, instead of having complicated logic based on the action name.
As a rough template, something like:
The text was updated successfully, but these errors were encountered: