Skip to content

Commit fe1ce51

Browse files
committed
Fixed it by removing the model from each test case after execution
1 parent d6ba0b4 commit fe1ce51

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

causal_testing/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ def run_tests_in_batches(self, batch_size: int = 100, silent: bool = False) -> L
361361
for test_case in current_batch:
362362
try:
363363
batch_results.append(test_case.execute_test())
364+
# Need to remove the model so we don't take up all the memory
365+
# Would be good to profile the execute_test() method a bit further so we don't need to do this
366+
test_case.estimator.model = None
364367
# pylint: disable=broad-exception-caught
365368
except Exception as e:
366369
if not silent:

0 commit comments

Comments
 (0)