cloudwego / cloudwego/eino

Enhance callback runInfo with more graph information

Open
#159 4 comments 3 reactions 0 assignees View on GitHub
C-feature-request D-callback
Dominant language
Go
Stars
13k
Forks
1.1k
Avg merge
4h 6m
Merged PRs (30d)
41

Description

I'm currently working with callbacks and have noticed that the RunInfo structure passed to the callback contains limited information about the graph. Specifically, the current RunInfo struct is defined as:

```
type RunInfo struct {
Name string
Type string
Component components.Component
}
```

However, this information is not sufficient to accurately identify which node the callback is being triggered from. The Name and Type fields do not provide enough uniqueness to pinpoint the exact node, making it difficult to understand the context of the callback.It would be extremely helpful if the RunInfo structure could include more detailed information about the graph and the specific node. Additionally, including information about the node's position or path within the graph could also be beneficial for debugging and logging purposes.

For example, adding fields such as NodeID or NodeKey (if available) would greatly enhance the ability to trace back to the exact node triggering the callback. Or maybe we can provide GraphSchema(from eino-ext/devops) in callbacks RunInfo

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.