diff --git a/check_data.py b/check_data.py index ba3c790..ccd125f 100644 --- a/check_data.py +++ b/check_data.py @@ -1,6 +1,7 @@ """ Sanity checks on the data. """ + import os from hashlib import md5 diff --git a/common.py b/common.py index 56726b0..4744f79 100644 --- a/common.py +++ b/common.py @@ -1,6 +1,7 @@ """ Some utility functions. """ + import re import torch import random diff --git a/preprocess_ruletaker.py b/preprocess_ruletaker.py index 07105fc..0b89b0e 100644 --- a/preprocess_ruletaker.py +++ b/preprocess_ruletaker.py @@ -1,6 +1,7 @@ """ Preprocess the RuleTaker dataset into a format similar to EntailmentBank. """ + from common import * from glob import glob from lark import Lark @@ -190,9 +191,9 @@ def main() -> None: "context": context, "proofs": proofs, "answer": answer, - "depth": question["QDep"] - if answer != "Unknown" - else None, + "depth": ( + question["QDep"] if answer != "Unknown" else None + ), } ) diff --git a/prover/datamodule.py b/prover/datamodule.py index 2893c20..c04ee22 100644 --- a/prover/datamodule.py +++ b/prover/datamodule.py @@ -1,6 +1,7 @@ """ Dataloading for EntailmentBank and RuleTaker. """ + from copy import deepcopy from common import * from prover.proof import Proof, InvalidProofStep diff --git a/prover/evaluate.py b/prover/evaluate.py index 7b903ad..3c74344 100644 --- a/prover/evaluate.py +++ b/prover/evaluate.py @@ -1,6 +1,7 @@ """ Utilities for evaluation. """ + from common import * import argparse import itertools diff --git a/prover/proof.py b/prover/proof.py index af8d798..5237715 100644 --- a/prover/proof.py +++ b/prover/proof.py @@ -1,6 +1,7 @@ """ Proof steps and proof trees. """ + from common import * import itertools diff --git a/prover/search.py b/prover/search.py index 2878494..dd7f552 100644 --- a/prover/search.py +++ b/prover/search.py @@ -1,6 +1,7 @@ """ Proof graph for proof search. """ + from common import * from prover.proof import ProofStep import networkx as nx