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] No Flyte Entities Detected with Ray example Jupyter Notebook workflow registration #3588

Closed
2 tasks done
peterklingelhofer opened this issue Apr 12, 2023 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers

Comments

@peterklingelhofer
Copy link

peterklingelhofer commented Apr 12, 2023

Describe the bug

Using the example Jupyter Notebook file found here:
https://docs.flyte.org/projects/cookbook/en/latest/auto/integrations/kubernetes/ray_example/ray_example.html

When I try to register the ray_example.ipynb file's workflow, I get this output:

pyflyte register workflows --project repo --image localhost:30000/$FLYTE_DOCKER_IMAGE_TAG
Running pyflyte register from ~/Dev/repo with images ImageConfig(default_image=Image(name='default', fqn='localhost:30000/repo', tag='imageTag'), images=[Image(name='default', fqn='localhost:30000/repo', tag='imageTag')]) and image destination folder /root on 1 package(s) ('~/Dev/repo/workflows',)
Registering against localhost:30080
Detected Root ~/Dev/repo, using this to create deployable package...
No output path provided, using a temporary directory at /var/folders/t4/7xnpxvjj3w3g7cf752g1qvjh0000gn/T/tmp7dmep_68 instead
Computed version is kChHd1ibpkx7jpAR1MIWIg==
Loading packages ['workflows'] under source root ~/Dev/repo
Successfully serialized 0 flyte objects
No Flyte entities were detected. Aborting!

The ray_example.ipynb runs fine locally as we'd expect, it's just when attempting to register the workflow do we run into problems.

Expected behavior

I would expect this to work the way the python example (downloadable from that same page in the docs) works:

pyflyte register workflows --project repo --image localhost:30000/$FLYTE_DOCKER_IMAGE_TAG
Running pyflyte register from ~/Dev/repo with images ImageConfig(default_image=Image(name='default', fqn='localhost:30000/repo', tag='imageTag'), images=[Image(name='default', fqn='localhost:30000/repo', tag='imageTag')]) and image destination folder /root on 1 package(s) ('~/Dev/repo/workflows',)
Registering against localhost:30080
Detected Root ~/Dev/repo, using this to create deployable package...
No output path provided, using a temporary directory at /var/folders/t4/7xnpxvjj3w3g7cf752g1qvjh0000gn/T/tmpq6mm2c8o instead
Computed version is 69UqeNHQfi0GyndHMSA6uw==
Loading packages ['workflows'] under source root ~/Dev/repo
Successfully serialized 3 flyte objects
[✔] Registration workflows.ray_example.ray_task type TASK successful with version 69UqeNHQfi0GyndHMSA6uw==
[✔] Registration workflows.ray_example.ray_workflow type WORKFLOW successful with version 69UqeNHQfi0GyndHMSA6uw==
[✔] Registration workflows.ray_example.ray_workflow type LAUNCH_PLAN successful with version 69UqeNHQfi0GyndHMSA6uw==
Successfully registered 3 entities

Additional context to reproduce

I noticed that VS Code thinks there is a \n after @workflow (unsurprising as Jupyter Notebooks are typically run in the browser obviously), not sure if that could be causing the problem.

Screenshots

Screenshot 2023-04-12 at 3 47 20 PM

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@peterklingelhofer peterklingelhofer added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Apr 12, 2023
@welcome
Copy link

welcome bot commented Apr 12, 2023

Thank you for opening your first issue here! 🛠

@peterklingelhofer peterklingelhofer changed the title [BUG] No Flyte Entities Detected with example Jupyter Notebook workflow registration [BUG] No Flyte Entities Detected with Ray example Jupyter Notebook workflow registration Apr 12, 2023
@pingsutw
Copy link
Member

@peterklingelhofer Currently, Flyte only supports workflows that are in .py files.

@peterklingelhofer
Copy link
Author

peterklingelhofer commented Apr 15, 2023

Ah, I see, so the preferred way of running a task in a Jupyter Notebook is by importing it via Papermill?

I also note that in this video the presenter seems to be using Jupyter Notebooks with Flyte, but they're integrating with Pydantic.

Closing this issue, as I got this working with the Papermil plugin and following the Flyte-Papermil docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers
Projects
None yet
Development

No branches or pull requests

2 participants