Skip to content
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

[Bug] path issues when running superworkflow pipeline sample for kfp v2 #909

Open
2 tasks done
juancappi opened this issue Jan 2, 2025 · 2 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@juancappi
Copy link
Contributor

Search before asking

  • I searched the issues and found no similar issues.

Component

KFP workflows

What happened + What you expected to happen

When running super-pipeline example from examples/kfp-pipelines/superworkflows/ray/kfp_v2/ (only after fixing the issues proposed in PR #906), the build fails due to incorrect relative path computation:

FileNotFoundError: [Errno 2] No such file or directory: '../../../../kfp/kfp_ray_components/createRayClusterComponent.yaml'

Reproduction script

make workflow-build
...
Traceback (most recent call last):
  File "[...]/git/ai-foundation/data-prep-kit/examples/kfp-pipelines/superworkflows/ray/kfp_v2/superpipeline_noop_docId_v2_wf.py", line 18, in <module>
    from universal.doc_id.kfp_ray.doc_id_wf import doc_id
  File "[...]/git/ai-foundation/data-prep-kit/transforms/universal/doc_id/kfp_ray/doc_id_wf.py", line 94, in <module>
    create_ray_op = comp.load_component_from_file(component_spec_path + "createRayClusterComponent.yaml")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[...]/git/ai-foundation/data-prep-kit/transforms/venv/lib/python3.11/site-packages/kfp/components/load_yaml_utilities.py", line 53, in load_component_from_file
    with open(file_path, 'r') as component_stream:
         ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../../../../kfp/kfp_ray_components/createRayClusterComponent.yaml'
make[2]: *** [.workflows.compile-pipeline] Error 1
make[1]: *** [superpipeline_noop_docId_v2_wf.yaml] Error 2
make: *** [workflow-build] Error 2

If I update the relative path in doc_id_wf.py to include the extra level ../:

component_spec_path = "../../../../kfp/kfp_ray_components/"

The super-pipeline build works, but then the build of kfp pipeline for that individual transform will fail.

Anything else

This depends on fix from #906

OS

MacOS (limited support)

Python

3.11.x

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@juancappi juancappi added the bug Something isn't working label Jan 2, 2025
@juancappi
Copy link
Contributor Author

juancappi commented Jan 2, 2025

@roytman I see you have worked on some of the affected files. If you are not the right person, maybe you can help finding the right person to work with.
CC @touma-I

@revit13
Copy link
Collaborator

revit13 commented Jan 5, 2025

@juancappi This probably due to one of the refactoring changes that was made in the repo. A possible solution is to add to the examples/kfp-pipelines/superworkflows/ray/kfp_v2/README.md file a comment about the need to change the component_spec_path with the correct path as you mentioned just for the purpose of compiling the super pipelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants