hi team, I am an engineer at Gojek and we use flyt...
# flyte-support
a
hi team, I am an engineer at Gojek and we use flyte for orchestrating ML pipelines. I have a requirement to create multiple
launch plans
with different set of
fixed inputs
for an existing
workflow
. I am following flytekit documentation to fetch a workflow and create a launchplan for it. The following in the code snippet from above docs:
Copy code
from flytekit import LaunchPlan

flyte_workflow = remote.fetch_workflow(
    name="my_workflow", version="v1", project="flytesnacks", domain="development"
)
launch_plan = LaunchPlan.get_or_create(name="my_launch_plan", workflow=flyte_workflow)
Creating a launchplan fails with the following error:
Copy code
File "/Users/.../lib/python3.7/site-packages/flytekit/core/launch_plan.py", line 143, in create
    native_types=workflow.python_interface.inputs,
AttributeError: 'NoneType' object has no attribute 'inputs'
python_interface
attribute of workflow object returned by
fetch_workflow
is None, although the workflow is a valid one and when i register a launchplan using "register files" in cli, it works. flytekit version: 1.1.0 flyte helm chart version: 1.1.0 Any help appreciated.
f
Cc @tall-lock-23197 this is completely doable- so must be some usage issue can you check?
thx 1
t
Hi, @abundant-spoon-52040! Is your workflow accepting inputs?
Also, would you mind sharing the command with me, the one that’s resulting in the error?
a
yes the workflow accepts two string type inputs, which I am trying to pass a fixed_inputs in the launch plan.
Copy code
generated_lp = LaunchPlan.get_or_create(
    name="somename",
    workflow=fetched_workflow,
    # specify the input value for the workflow when it's being triggered by the scheduler
    fixed_inputs={
        "input1": "value1",
        "input2": "value2"
    }
)
calling
LaunchPlan.get_or_create
ends up in error
t
When are you seeing this error if registration is working fine?
a
I am not able to reach the registration part when I pass workflow received from
fetch_workflow
method to
LaunchPlan.get_or_create
method registration works fine if i use cli and pass the workflow annotated imported from file
t
I’m sorry I don’t understand. Can you send me the commands you’re trying to run after you create a launch plan in your Python code?
a
I have a python file like this one, which I try to run using
python launch_plan.py
It fails at line no. 15 (while invocating
LaunchPlan.get_or_create
method) with the error shared above
t
@abundant-spoon-52040, I’m able to reproduce this issue. Seems like a bug. cc: @glamorous-carpet-83516 @high-accountant-32689
☺️ 1
g
I got the same error, trying to fix it now.
a
Is there a github issue logged for this bug ?
g
160 Views