(ckpt_init: str, vocab_path: str)
| 196 | |
| 197 | |
| 198 | def get_lm(ckpt_init: str, vocab_path: str) -> lm.LanguageModelInference: |
| 199 | lm.parse_gin_configuration( |
| 200 | _GIN_FILE.value, _GIN_PARAM.value, gin_paths=_GIN_SEARCH_PATHS.value |
| 201 | ) |
| 202 | |
| 203 | return lm.LanguageModelInference(vocab_path, ckpt_init, mode='beam_search') |
| 204 | |
| 205 | |
| 206 | def run_ddar(g: gh.Graph, p: pr.Problem, out_file: str) -> bool: |