diff --git a/dowhy/causal_model.py b/dowhy/causal_model.py index 1ce8dc95e8..805bac48e1 100755 --- a/dowhy/causal_model.py +++ b/dowhy/causal_model.py @@ -11,7 +11,6 @@ from dowhy.causal_estimator import CausalEstimate from dowhy.causal_graph import CausalGraph from dowhy.causal_identifier import CausalIdentifier -import dowhy.interpreters as interpreters from dowhy.utils.api import parse_state init_printing() # To display symbolic math symbols @@ -346,6 +345,7 @@ def interpret(self, method_name=None, **kwargs): return method_name_arr = parse_state(method_name) + import dowhy.interpreters as interpreters for method in method_name_arr: interpreter = interpreters.get_class_object(method) interpreter(self, **kwargs).interpret() diff --git a/dowhy/causal_refuter.py b/dowhy/causal_refuter.py index 082da3e806..d225b8a6a3 100644 --- a/dowhy/causal_refuter.py +++ b/dowhy/causal_refuter.py @@ -4,7 +4,6 @@ import random from dowhy.utils.api import parse_state -import dowhy.interpreters as interpreters class CausalRefuter: @@ -246,7 +245,7 @@ def interpret(self, method_name=None, **kwargs): if method_name is None: method_name = self.refuter.interpret_method method_name_arr = parse_state(method_name) - + import dowhy.interpreters as interpreters for method in method_name_arr: interpreter = interpreters.get_class_object(method) interpreter(self, **kwargs).interpret()