Hello. I have some questions about FlyteRemote
# flyte-support
b
Hello. I have some questions about FlyteRemote
I am testing this as an option to run pre-registered tasks from a workflow in a separate project https://docs.flyte.org/en/latest/api/flytekit/design/control_plane.html#design-control-plane
Copy code
config = Config.auto(config_file="/mypath/config.yaml")

# Initialize FlyteRemote with the appropriate configuration
remote = FlyteRemote(
    config=config,
    default_project="mytasks",
    default_domain="development",
)

# Fetch the remote workflow or task
# <https://github.com/flyteorg/flytekit/blob/ea6fa0dffcdacc4f6e43c968fa24ba1811d7183f/flytekit/remote/remote.py#L332>
helloworld_task = remote.fetch_task(
        name="mytasks.helloworld.print_hello_world",
        version="1234566",
        project="mytasks",
        domain="development",
        )
### this part if uncommented works but gives a permission error ###
# Execute the remote workflow
# execution = remote.execute(
#   helloworld_task, inputs={}, wait=True
# )
# Access the outputs of the execution
# print(execution.outputs)
###

@workflow
def test() -> str:
    return helloworld_task()
1. if I uncomment remote.execute and run using
pyflyte run -p anotherproject -d development remote.py test
It seems to work and the task execution is launched and fails with Edit: the permissions error was an error on my part 2. If I keep the execute part commented out. Then I am unable to run the workflow. The tasks are registered. The error is
Failed with Unknown Exception <class 'flytekit.remote.remote.RegistrationSkipped'> Reason: Remote task/Workflow mytasks.helloworld.print_hello_world is not registrable.
This should work based on documentation https://docs.flyte.org/en/latest/api/flytekit/design/control_plane.html#fetching-entities
2 summarize: I have 2 projects mytasks - contains registered tasks anotherproject - containers workflows that run registered tasks from mytaks I attempted this with reference tasks (my last post) and flyteRemote
t
remote.execute
works for me. how are you triggering the python script? you'd just have to run this command:
python remote.py
.
b
I would like to trigger it from a flyte workflow
t
this should be possible. do you have any more error messages? what’s the command you’re running from the CLI?
b
A basic pyflyte run command. With the remote.execute line commented out
pyflyte run --remote -p myproj -d development testremote.py test
Hello again. I have it working but moving the execute into the workflow which makes sense
Copy code
@workflow
def test() -> list[str]:
    execution = remote.execute(
          helloworld_task, inputs={}, wait=True
    )
t
no no you shouldn’t have to do that, that’s not the correct paradigm.
that’s more akin to the eager workflow concept.
👀 1
normal workflows only get evaluated once, they run at registration time, so your earlier code should have worked.
let me try to repro on my end
👍 1
still investigating.
i think this issue is somehow related to pyflyte run…
can you try reverting to your earlier format, and using pyflyte register first? and then run from the UI
again @boundless-lifeguard-61788 thank you for reporting this. this is a small bug that only shows up in the
run
command, not the
register
command. we’ll have a fix out by tomorrow.
👍 1
https://github.com/flyteorg/flytekit/pull/2657 feel free to install from master if you need it. thank you.
b
I can wait for a release since we don't have an immediate need now. I am also waiting for https://github.com/flyteorg/flyte/pull/5579 which we recently encountered
Thank you for looking into the flyte remote
@average-finland-92144 @thankful-minister-83577 is 5579 released in a stable branch yet?
t
no… this will be the 1.13.1 release
👍 1
b
is there an estimate timeline? Isn't the latest https://github.com/flyteorg/flytekit/releases/tag/v1.13.3
a
@boundless-lifeguard-61788 that's the latest for flytekit. A 1.13.1 RC for flyte should be out in the next couple of days, including #5579
b
ah ya thank you
a
@boundless-lifeguard-61788 the RC is here: https://github.com/flyteorg/flyte/releases/tag/v1.13.1-rc0 Please try it and report any finding
👍 1