MCPcopy Create free account
hub / github.com/MARIO-Math-Reasoning/Super_MARIO / get_steps

Method get_steps

mcts_math/agents/step_beam.py:151–165  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

149 self.candidate_nodes.extend(current_node.children)
150
151 def get_steps(self):
152 final_answer_states = []
153 for cur_node in self.final_answer_nodes:
154 states = {
155 "question": self.question,
156 "ground_truth": self.ground_truth,
157 "value": cur_node.value,
158 "final_answer": cur_node.state["final_answer"],
159 "solution": self.collect_partial_solution(cur_node),
160 "tag": cur_node.tag,
161 }
162 final_answer_states.append(states)
163
164 solutions = sorted(final_answer_states, key=lambda x: x['value'], reverse=True)
165 return solutions
166
167 def return_states(self) -> Dict[str, Union[Any, Dict[str, str]]]:
168 candidates = [self.root]

Callers 1

return_statesMethod · 0.95

Calls 1

Tested by

no test coverage detected