Skip to content

Commit 1ac12db

Browse files
committed
Add GC collections
1 parent 96d7292 commit 1ac12db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

econml/tests/test_causal_analysis.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,9 @@ def test_random_state(self):
692692
np.testing.assert_equal(glo.point.values, glo2.point.values)
693693
np.testing.assert_equal(glo.stderr.values, glo2.stderr.values)
694694

695+
del ca, glo, ca2, glo
696+
gc.collect()
697+
695698
def test_can_set_categories(self):
696699
y = pd.Series(np.random.choice([0, 1], size=(500,)))
697700
X = pd.DataFrame({'a': np.random.normal(size=500),
@@ -785,6 +788,9 @@ def test_invalid_inds(self):
785788
self.assertEqual(ca.untrained_feature_indices_, [(4, 'cat_limit'),
786789
(5, 'cat_limit')])
787790

791+
del ca
792+
gc.collect()
793+
788794
# Add tests that guarantee that the reliance on DML feature order is not broken, such as
789795
# Creare a transformer that zeros out all variables after the first n_x variables, so it zeros out W
790796
# Pass an example where W is irrelevant and X is confounder

0 commit comments

Comments
 (0)