-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't loop over output from lightweight function #2692
Comments
Another error occurs if the python function compiled with ...
File "/Users/colincampbell/.virtualenvs/venvs/recommendations/lib/python3.7/site-packages/kfp/_client.py", line 342, in create_run_from_pipeline_func
compiler.Compiler().compile(pipeline_func, pipeline_package_path, pipeline_conf=pipeline_conf)
File "/Users/colincampbell/.virtualenvs/venvs/recommendations/lib/python3.7/site-packages/kfp/compiler/compiler.py", line 846, in compile
package_path=package_path)
File "/Users/colincampbell/.virtualenvs/venvs/recommendations/lib/python3.7/site-packages/kfp/compiler/compiler.py", line 908, in _create_and_write_workflow
pipeline_conf)
File "/Users/colincampbell/.virtualenvs/venvs/recommendations/lib/python3.7/site-packages/kfp/compiler/compiler.py", line 790, in _create_workflow
workflow = fix_big_data_passing(workflow)
File "/Users/colincampbell/.virtualenvs/venvs/recommendations/lib/python3.7/site-packages/kfp/compiler/_data_passing_rewriter.py", line 155, in fix_big_data_passing
upstream_template_name = task_name_to_template_name[upstream_task_name]
KeyError: 'Active' |
There seems to be two bugs:
This also highlights the lack of validation in Backend's create_run and upload_pipeline methods. @IronPan @jingzhang36 @rmgogogo |
@ColinCampbell-GBI do you mind sharing your |
I can reproduce the issue: import kfp
produce_op = kfp.components.load_component_from_text('''\
name: Produce list
outputs:
- name: data_list
implementation:
container:
image: busybox
command:
- sh
- -c
- echo "[1, 2, 3]" > "$0"
- outputPath: data_list
''')
consume_op = kfp.components.load_component_from_text('''\
name: Consume data
inputs:
- name: data
implementation:
container:
image: busybox
command:
- echo
- inputValue: data
''')
def pip1():
source_task = produce_op()
with kfp.dsl.ParallelFor(source_task.output) as item:
consume_op(item)
kfp.compiler.Compiler()._compile(pip1)
As you see, the task name is not sanitized here (has spaces). |
Thanks Alexey! I will fix UI handling |
|
It seems like we need to sanitize the output names eagerly during compilation. Will put together a fix shortly. |
What happened:
When calling ParallelFor on the output of a lightweight python component, I get an error saying that the task is not defined.
Pipeline returns the error
This occurs when triggering a run through
create_run_from_pipeline_func
. If the pipeline is compiled and uploaded using the browser, attempting to view the pipeline leads to a blank screen with the following errors in the console.What did you expect to happen:
ParallelFor to run a task for each entry in the list returned by get_active_areas
Anything else you would like to add:
Pipeline compiled with 0.1.36, run on kubeflow 0.7.0
The text was updated successfully, but these errors were encountered: