Here's the example: Even though I'm passing different parameters to the two clones, they will end up configured with the same (the second) parameter set.
` project_name = 'pipeline_test'
task = Task.init(project_name=project_name,
task_name='pipeline_main',
task_type=Task.TaskTypes.controller,
reuse_last_task_id=False)
pipe = PipelineController(default_execution_queue='default_queue',
add_pipeline_tags=False)
#%%
task_IDs = {
'task_1': '',
'task_2': ''
}
#%%
task_1_args = {'param1', 1}
task_2_args_clone_1 = {'param1', 1}
task_2_args_clone_2 = {'param1', 2}
first task
pipe.add_step(name='task_1',
base_task_project=project_name,
base_task_id=task_IDs['task_1'],
parameter_override=task_1_args)
second tasks
pipe.add_step(name='task_2_clone_1',
parents=['task_1'],
base_task_project=project_name,
base_task_id=task_IDs['task_2'],
parameter_override=task_2_args_clone_1)
pipe.add_step(name='task_2_clone_2',
parents=['task_1'],
base_task_project=project_name,
base_task_id=task_IDs['task_2'],
parameter_override=task_2_args_clone_2) `
The section name needs to be added in both the base task as well as the pipeline task for it to work. Since the parameters also show up in the "General" section in the web interface when the parameters are connected only with their name (without section name), I didn't think that this could matter. Thank you for your help!
No worries, and I will make sure we output a warning if section names are not used 🙂
Hi SucculentBeetle7
The parameters passed to add_step
need to contain the section name (maybe we should warn if it is not there, I'll see if we can add it).
So maybe something like:{'Args/param1', 1}
Or{'General/param1', 1}
Can you verify it solves the issue?