flyteorg / flyte

Scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks.
https://flyte.org
Apache License 2.0
5.43k stars 583 forks source link

Using an Eager Workflow on --remote does not work #5629

Open tospe opened 1 month ago

tospe commented 1 month ago

Describe the bug

When running the simple eager workflow on --remote, I get the follwoing error AttributeError: 'NoneType' object has no attribute 'fetch_task'

Expected behavior

Should run the workflow according to the documentation

Additional context to reproduce

  1. Have a remote cluster
  2. Execute a simple eager workflow

Screenshots

image

Are you sure this issue hasn't been raised already?

Have you read the Code of Conduct?

welcome[bot] commented 1 month ago

Thank you for opening your first issue here! 🛠

runllm[bot] commented 1 month ago

The error you're encountering, AttributeError: 'NoneType' object has no attribute 'fetch_task', suggests that the FlyteRemote object is not properly initialized or configured. This can happen if the configuration file or the secrets required for authentication are not correctly set up.

According to the Flyte documentation on eager workflows, you need to ensure that your FlyteRemote object is correctly configured with the necessary secrets and project/domain settings. Here's an example of how to set up an eager workflow for remote execution:

from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
from flytekit.experimental import eager

@eager(
    remote=FlyteRemote(
        config=Config.auto(config_file="config.yaml"),
        default_project="flytesnacks",
        default_domain="development",
    ),
    client_secret_group="<my_client_secret_group>",
    client_secret_key="<my_client_secret_key>",
)
async def eager_workflow_remote(x: int) -> int:
    # Your workflow logic here
    ...

Ensure that your config.yaml file is correctly set up and that the client_secret_group and client_secret_key are properly configured for your Flyte cluster.

Would you like more detailed guidance on setting up the configuration file or troubleshooting this issue further?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @runllm to ask follow-up questions. See runllm.com for more!