Bundling Actions Together
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 AppBuilder 和 GraphBuilder 开始,然后追踪 actions、transitions、subgraphs 和 MappedStates 的表示方式。将提议的 MultiAction 和 ActionChain 入口点与现有的 builder API 进行比较,包括 with_subgraph 替代方案。完成的标准是项目拥有一个达成共识的可复用 action-graph 设计,包括任何输入/输出重映射以及验证行为。
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
@gamarin2 asks:
Hey! While working with class-based actions, I ended up creating state transitions that must logically be split in two separate actions, but where the second one must always be preceded by the first one.
In my case, it's a FormatSummarizer action that formats messages before transitioning to a Summarizer action. These two actions form what I would call an "action bundle": the second one can't be separated from the first one. For now, I have documented that requirement in my class docstring, but it would be nice to have it more strictly enforced.
I'm sure there are various ways we could achieve this, but perhaps the easiest would be to add a property to the action class where you could specify preceding/following action classes. The AppBuilder would then fail to build if you haven't added the proper transitions.
@mdrideout also suggests:
I would say that I have a very large number of use cases for this, and creating an entire sub-graph for it is painful.
To piggyback on this, I also have a very large number of use cases for running actions with high concurrency, and have been creating sub-graphs simply for the purpose of running a single action for ~10 items.
but I may be doing this as a workaround because I had a some issues trying to use MappedStates (?) with either pydantic or async.
Describe the solution you'd like
A way to have an action represent a graph.
class MultiAction:
@abc.abstractmethod
def get_graph() -> Graph:
...
class ActionChain(MultiAction):
@abc.abstractmethod
def get_actions() -> List[[Tuple[str, Union[Action, Callable]]]:
...
def get_graph() -> Graph:
named_actions = self.get_actions()
action_names = [name for name, _ in named_actions]
return GraphBuilder().with_actions(**dict(actions)).with_transitions(zip(action_name, action_names[1:]))
Describe alternatives you've considered
Could also have with_subgraph in builder, similar thing. This allows for packaging at the action level for reusability. Might also want the ability to remap inputs/outputs:
def state_maps() -> Tuple[dict, dict]:
....
Additional context
Add any other context or screenshots about the feature request here.
- 主要语言
- Python
- 星标
- 2.6k
- 派生
- 199
- 平均合并
- 3 天 10 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/burr 的其他 Issue
-
status/needs-triage
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 2 天内回复
-
Streaming Event type, type hint, should support union type可能已有人在做 @mvanhorn 于 183 天前认领。 未关闭area/streaming area/typing good first issue help wanted kind/bug priority/high
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 2 天内回复
-
Add more instructions for applying ORM migrations for S3 deployment可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area/storage area/ui help wanted kind/documentation priority/low
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
Add documentation on how to run the Burr UI server可能重新可做 @iamSerafinnn 于 122 天前认领,目前没有进行中的 PR。 未关闭area/ui good first issue kind/documentation priority/low
难度 2/5 半天 新手友好度 68/100
维护者通常 2 天内回复
-
status/needs-triage
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 2 天内回复
相似的 Issue
-
first
难度 2/5 1-3 小时 新手友好度 72/100
AcademySoftwareFoundation/rmtc#54 · 1 条评论 ·
-
feature/cohorts feature/feature-flags team/feature-flags
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
License examples/ as MIT可能已有人在做 @PGrayCS 今天认领。 未关闭documentation enhancement example good first issue
难度 2/5 1-3 小时 新手友好度 84/100
speedyk-005/yasbd-lib#383 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
interactions-py/interactions.py#1827 ·
-
Managed start can fail when OpenVMM reads its control capability before NVX writes it可能已有人在做 @ppenna 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复