Open GeeCastro opened 6 months ago
🤖
Hello @Chichilele! I'm Dosu, a friendly bot here to assist you with your bugs, queries, and contributions to the Flyte repository. I'm here to help you while we wait for a human maintainer to join us. Don't worry, we'll get your issue sorted out together. 😊
Thank you for reporting this issue. It seems like the reference_workflow
decorator is not implementing the python_interface
attribute, which is causing the AttributeError
when the LaunchPlan.create
method tries to access it.
The python_interface
attribute is typically used to define the inputs and outputs of a workflow in Flyte. However, based on the information available, it appears that the reference_workflow
decorator does not implement this attribute.
The LaunchPlan.create
method, on the other hand, seems to be expecting this attribute to be present in the workflow object. This discrepancy is likely what's causing the error you're seeing.
Unfortunately, without more information about the implementation of the reference_workflow
decorator and the python_interface
attribute, it's difficult to provide a definitive solution. It might be helpful to check the implementation of these components in the Flyte codebase or the documentation for more details.
If you have any additional information about these components or if there's anything else you'd like to know, please feel free to share.
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Hi @GeeCastro , are you still facing this problem? I tested with a small example and it successfully registered a LaunchPlan
on the console. I ran the code below with pyflyte register wf_ref.py
.
from flytekit import LaunchPlan, reference_workflow
@reference_workflow(
project="flytesnacks",
domain="development",
name="int_test.wf",
version="version_of_your_referenced_workflow",
)
def wf(a: int) -> int: ...
lp = LaunchPlan.create(
name="new_lp",
workflow=wf,
fixed_inputs={"a": 3},
)
Describe the bug
Trying to reference a workflow with the
reference_workflow
decorator throws an error when used withLaunchplan.create
. Thecreate
method tries to accessworkflow.python_interface
but the attribute doesn't exist.Expected behavior
Should create a launch plan without an error or error with a helpful message.
Additional context to reproduce
Yields
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?