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] pyflyte run cannot handle imperative workflows #2706

Closed
2 tasks done
iaroslav-ciupin opened this issue Jul 20, 2022 · 1 comment
Closed
2 tasks done

[BUG] pyflyte run cannot handle imperative workflows #2706

iaroslav-ciupin opened this issue Jul 20, 2022 · 1 comment
Assignees
Labels
bug Something isn't working flytekit FlyteKit Python related issue

Comments

@iaroslav-ciupin
Copy link
Contributor

Describe the bug

This docs page https://docs.flyte.org/projects/cookbook/en/latest/auto/core/flyte_basics/imperative_wf_style.html suggests to run imperative flow example like so:
pyflyte run --remote imperative_wf_style.py wf --in1 hello --in2 foo

but it fails with

Traceback (most recent call last):
  File "/opt/homebrew/bin/pyflyte", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/flytekit/clis/sdk_in_container/run.py", line 516, in _run
    remote_entity = remote.register_script(
  File "/opt/homebrew/lib/python3.9/site-packages/flytekit/remote/remote.py", line 596, in register_script
    upload_location, md5_bytes = fast_register_single_script(
  File "/opt/homebrew/lib/python3.9/site-packages/flytekit/tools/script_mode.py", line 105, in fast_register_single_script
    _, mod_name, _, script_full_path = extract_task_module(wf_entity)
  File "/opt/homebrew/lib/python3.9/site-packages/flytekit/core/tracker.py", line 237, in extract_task_module
    name = f.__name__.split(".")[-1]
AttributeError: 'ImperativeWorkflow' object has no attribute '__name__'

Expected behavior

example should successfully run

Additional context to reproduce

No response

Screenshots

No response

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@iaroslav-ciupin iaroslav-ciupin added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jul 20, 2022
@welcome
Copy link

welcome bot commented Jul 20, 2022

Thank you for opening your first issue here! 🛠

@eapolinario eapolinario changed the title [BUG] [BUG] pyflyte run cannot handle imperative workflows Jul 20, 2022
@wild-endeavor wild-endeavor added flytekit FlyteKit Python related issue and removed untriaged This issues has not yet been looked at by the Maintainers labels Jul 22, 2022
@wild-endeavor wild-endeavor modified the milestones: 1.2.0, 1.2.0-candidate Jul 22, 2022
@pingsutw pingsutw self-assigned this Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flytekit FlyteKit Python related issue
Projects
None yet
Development

No branches or pull requests

4 participants