按官方文档回溯到历史状态,代码执行报错 #3288
Unanswered
BoboOpenSource
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://java2ai.com/docs/frameworks/graph-core/examples/time-travel,参考这篇文档,编写状态回溯的代码,执行后报错。
代码如下:
执行后日志如下:
节点输出: NodeOutput{node=START, state=OverAllState{data={}, resume=false, humanFeedback=null, interruptMessage='null'}}
节点输出: NodeOutput{node=node1, state=OverAllState{data={k1=v1}, resume=false, humanFeedback=null, interruptMessage='null'}}
节点输出: NodeOutput{node=node2, state=OverAllState{data={k1=v1, k2=v2}, resume=false, humanFeedback=null, interruptMessage='null'}}
节点输出: NodeOutput{node=END, state=OverAllState{data={k1=v1, k2=v2}, resume=false, humanFeedback=null, interruptMessage='null'}}
流完成
=============使用node1这个checkpoint创建新分支==============
执行错误: java.util.NoSuchElementException: Checkpoint with id c154b23b-b9ff-4cd9-977a-522159ab6853 not found!
Exception in thread "main" java.util.NoSuchElementException: Checkpoint with id c154b23b-b9ff-4cd9-977a-522159ab6853 not found!
at com.alibaba.cloud.ai.graph.checkpoint.savers.MemorySaver.lambda$put$5(MemorySaver.java:135)
at java.base/java.util.OptionalInt.orElseThrow(OptionalInt.java:273)
at com.alibaba.cloud.ai.graph.checkpoint.savers.MemorySaver.lambda$put$6(MemorySaver.java:134)
at com.alibaba.cloud.ai.graph.checkpoint.savers.MemorySaver.loadOrInitCheckpoints(MemorySaver.java:60)
at com.alibaba.cloud.ai.graph.checkpoint.savers.MemorySaver.put(MemorySaver.java:127)
at com.alibaba.cloud.ai.graph.GraphRunnerContext.addCheckpoint(GraphRunnerContext.java:229)
at com.alibaba.cloud.ai.graph.executor.MainGraphExecutor.handleStartNode(MainGraphExecutor.java:130)
at com.alibaba.cloud.ai.graph.executor.MainGraphExecutor.execute(MainGraphExecutor.java:78)
at com.alibaba.cloud.ai.graph.GraphRunner.lambda$run$0(GraphRunner.java:56)
at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:46)
at reactor.core.publisher.Flux.subscribe(Flux.java:8891)
at reactor.core.publisher.Flux.blockLast(Flux.java:2816)
at com.alibaba.cloud.ai.graph.study.GraphStudy.main_恢复到历史状态(GraphStudy.java:159)
at com.alibaba.cloud.ai.graph.study.GraphStudy.main(GraphStudy.java:27)
Suppressed: java.lang.Exception: #block terminated with an error
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
at reactor.core.publisher.Flux.blockLast(Flux.java:2817)
... 2 more
Beta Was this translation helpful? Give feedback.
All reactions