flytekit
flytekit copied to clipboard
Improve error message for missing return
Tracking issue
NA
Why are the changes needed?
What changes were proposed in this pull request?
How was this patch tested?
import os
from click.testing import CliRunner
from flytekit import task, workflow, ImageSpec
from flytekit.clis.sdk_in_container import pyflyte
default = ["pandas", "mypy"]
image = ImageSpec(registry="pingsutw", packages=[*default])
@task(container_image=image)
def t1() -> int:
return 3 + 2
@task(container_image=os.getenv("IMAGE"))
def t2(a: int) -> int:
return a + 3
@workflow()
def wf(a: int = 3) -> int:
t1()
t2(a=a)
if __name__ == '__main__':
runner = CliRunner()
result = runner.invoke(
pyflyte.main,
[
"-vv",
"register",
"/Users/kevin/git/flytekit/flyte-example/improve_image_spec.py",
]
)
print(result.stdout)
Setup process
Screenshots
Before:
After:
Check all the applicable boxes
- [x] I updated the documentation accordingly.
- [x] All new and existing tests passed.
- [x] All commits are signed-off.
Related PRs
NA
Docs link
NA