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

fix workflow function name #1171

Merged
merged 2 commits into from
Oct 10, 2023
Merged

fix workflow function name #1171

merged 2 commits into from
Oct 10, 2023

Conversation

stolarczyk
Copy link
Contributor

The first code snippet in the "Environment setup" user guide calls and undefined function:

from flytekit import task, workflow

@task
def say_hello() -> str:
    return "Hello, World!"

@workflow
def hello_world_wf() -> str:
    res = say_hello()
    return res

if __name__ == "__main__":
    print(f"Running my_wf() {my_wf()}")
> python hello_world.py
╭─────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────────────────────────────╮
│ <path>/hello_world.py:16 in <module>                                                                                                                         │
│                                                                                                                                                                                         │
│ ❱ 16 │   print(f"Running my_wf() {my_wf()}")                                                                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
NameError: name 'my_wf' is not defined

This PR fixes the above issue.

Signed-off-by: Michal Stolarczyk <[email protected]>
@pingsutw pingsutw merged commit 2ebeb8e into flyteorg:master Oct 10, 2023
3 checks passed
@stolarczyk stolarczyk deleted the patch-1 branch October 11, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants