(self, **kwargs)
| 62 | max_solver_steps: int = 1 |
| 63 | |
| 64 | def __init__(self, **kwargs) -> None: |
| 65 | super().__init__(**kwargs) |
| 66 | |
| 67 | self.llm_model_id = self.config.model_dir |
| 68 | |
| 69 | if self.config.stop: |
| 70 | # omegaconf.listconfig.ListConfig -> list |
| 71 | self.stop = OmegaConf.to_object(self.config.stop) |
| 72 | |
| 73 | self.llm = self.create_llm() |
| 74 | self.need_value_func = self.config.need_value_func |
| 75 | |
| 76 | if self.config.mode == "sbs": |
| 77 | self.max_solver_steps = self.config.max_depth |
| 78 | elif self.config.mode == "mcts": |
| 79 | self.max_solver_steps = self.config.iterations |
| 80 | self.config.step_beam_width = 1 |
| 81 | |
| 82 | @field_validator("config") |
| 83 | def validate_config(cls, cfg: Any): |
nothing calls this directly
no test coverage detected