Skip to content

Commit fb0dcc1

Browse files
authored
Merge pull request #226 from jsimonrichard/simon/dojo-cache-option
Add build_deps option to dojo (enables caching with Dojo)
2 parents b6411d8 + 6f1d80b commit fb0dcc1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/lean_dojo/interaction/dojo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def __init__(
204204
entry: Union[Theorem, Tuple[LeanGitRepo, Path, int]],
205205
timeout: int = 600,
206206
additional_imports: List[str] = [],
207+
build_deps: bool = True,
207208
):
208209
"""Initialize Dojo.
209210
@@ -217,6 +218,7 @@ def __init__(
217218
self.entry = entry
218219
self.timeout = timeout
219220
self.additional_imports = additional_imports
221+
self.build_deps = build_deps
220222

221223
if self.uses_tactics:
222224
assert isinstance(entry, Theorem)
@@ -241,7 +243,7 @@ def __enter__(self) -> Tuple["Dojo", State]:
241243
logger.debug(f"Initializing Dojo for {self.entry}")
242244

243245
# Replace the human-written proof with a `repl` tactic.
244-
traced_repo_path = get_traced_repo_path(self.repo)
246+
traced_repo_path = get_traced_repo_path(self.repo, self.build_deps)
245247
repl_path = traced_repo_path / "Lean4Repl.lean"
246248
assert (
247249
repl_path.exists()

0 commit comments

Comments
 (0)