Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
pomonam committed Jul 5, 2024
1 parent c56e285 commit c78c092
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kronfluence/computer/factor_computer.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ def fit_covariance_matrices(
total_data_examples=max_partition_examples,
)

self._reset_memory()


import gc
for obj in gc.get_objects():
try:
Expand All @@ -308,6 +311,7 @@ def fit_covariance_matrices(
except:
pass


start_time = get_time(state=self.state)
with self.profiler.profile("Fit Covariance"):
loader = self._get_dataloader(
Expand All @@ -332,7 +336,6 @@ def fit_covariance_matrices(
f"Fitted covariance matrices with {num_data_processed.item()} data points in "
f"{elapsed_time:.2f} seconds."
)
self._reset_memory()

print("Done")
import gc
Expand Down

0 comments on commit c78c092

Please sign in to comment.