boundless-lifeguard-61788
08/02/2024, 6:51 PMboundless-lifeguard-61788
08/02/2024, 6:53 PMconfig = 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()
boundless-lifeguard-61788
08/02/2024, 6:59 PMpyflyte run -p anotherproject -d development remote.py test
It seems to work 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-entitiesboundless-lifeguard-61788
08/02/2024, 7:02 PMtall-lock-23197
remote.execute
works for me. how are you triggering the python script? you'd just have to run this command: python remote.py
.boundless-lifeguard-61788
08/05/2024, 5:50 PMthankful-minister-83577
boundless-lifeguard-61788
08/06/2024, 3:21 PMpyflyte run --remote -p myproj -d development testremote.py test
boundless-lifeguard-61788
08/06/2024, 3:37 PM@workflow
def test() -> list[str]:
execution = remote.execute(
helloworld_task, inputs={}, wait=True
)
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
run
command, not the register
command. we’ll have a fix out by tomorrow.thankful-minister-83577
boundless-lifeguard-61788
08/08/2024, 3:36 PMboundless-lifeguard-61788
08/08/2024, 3:36 PMboundless-lifeguard-61788
08/13/2024, 4:23 PMthankful-minister-83577
boundless-lifeguard-61788
08/13/2024, 5:26 PMaverage-finland-92144
08/13/2024, 5:31 PMboundless-lifeguard-61788
08/13/2024, 5:32 PMaverage-finland-92144
08/14/2024, 2:44 AM