flyte icon indicating copy to clipboard operation
flyte copied to clipboard

[BUG] Agents cannot pass custom info back to flyte

Open ddl-rliu opened this issue 1 year ago • 2 comments

Proposed fix: https://github.com/flyteorg/flyte/pull/5604 https://github.com/flyteorg/flytekit/pull/2426

Describe the bug

Agents may use the Resource object to pass some data back to flyte, but the CustomInfo field is not exposed in this object.

The solution is to enhance flytekit to add this field to the Resource object, and enhance flyte (flyteplugins webapi agent) to read this field from the agent response: https://github.com/flyteorg/flytekit/pull/2426 https://github.com/flyteorg/flyte/pull/5604/files

Expected behavior

Agents should be able to pass custom info back to Flyte. See custom info under https://docs.flyte.org/en/latest/protos/docs/event/event.html#taskexecutionevent

Additional context to reproduce

No response

Screenshots

No response

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

  • [X] Yes

Have you read the Code of Conduct?

  • [X] Yes

ddl-rliu avatar Jul 29 '24 18:07 ddl-rliu

The CustomInfo field is indeed a part of the TaskExecutionEvent in Flyte, but it is not currently exposed in the Resource object used by custom agents. According to this discussion, the custom_info field can be used to send plugin-specific execution event information back to Flyte. However, the current implementation does not support this directly.

To address this, Flytekit and Flyte need to be enhanced to include the custom_info field in the Resource object and ensure that Flyte can read this field from the agent response. This would involve updating the Flytekit library to add the custom_info field to the Resource object and modifying Flyte's backend to handle this new field appropriately.

Would you like more detailed steps on how to implement these changes?

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!

runllm[bot] avatar Jul 29 '24 18:07 runllm[bot]

FYI some PRs which implement a fix to this issue.

https://github.com/flyteorg/flyte/pull/5604 (this should land first) https://github.com/flyteorg/flytekit/pull/2426 (this should land last)

ddl-rliu avatar Aug 05 '24 18:08 ddl-rliu

Closing since both PRs have been merged. Thanks! 🎉

ddl-rliu avatar Sep 26 '24 20:09 ddl-rliu