Skip to content

Commit

Permalink
Merge pull request #75 from euclidgame/time_out
Browse files Browse the repository at this point in the history
Fix Missing `TimeoutError` by Replacing with `DojoTacticTimeoutError`
  • Loading branch information
yangky11 authored Jan 30, 2025
2 parents b5c1e5b + 4f71dd1 commit fd6d99c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions prover/proof_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
LeanGitRepo,
TacticState,
LeanError,
TimeoutError,
ProofFinished,
ProofGivenUp,
DojoInitError,
Expand Down Expand Up @@ -256,7 +255,7 @@ def _run_tactic(
result_node = ProofFinishedNode(response)
elif type(response) in (
LeanError,
TimeoutError,
DojoTacticTimeoutError,
ProofGivenUp,
):
result_node = ErrorNode(response)
Expand Down Expand Up @@ -295,7 +294,7 @@ def check_invariants(self):
assert self.root.status == Status.PROVED
elif type(response) in (
LeanError,
TimeoutError,
DojoTacticTimeoutError,
ProofGivenUp,
):
assert isinstance(node, ErrorNode)
Expand Down
4 changes: 2 additions & 2 deletions prover/search_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from lean_dojo import (
TacticState,
LeanError,
TimeoutError,
DojoTacticTimeoutError,
ProofGivenUp,
ProofFinished,
)
Expand Down Expand Up @@ -52,7 +52,7 @@ class ProofFinishedNode(Node):

@dataclass
class ErrorNode(Node):
inner: Union[LeanError, TimeoutError, ProofGivenUp]
inner: Union[LeanError, DojoTacticTimeoutError, ProofGivenUp]
status = Status.FAILED
distance_to_proof = math.inf
is_terminal = True
Expand Down

0 comments on commit fd6d99c

Please sign in to comment.