Skip to content

Commit

Permalink
simplified progress bar in terahac loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Philipp Reising committed May 30, 2024
1 parent 1936dce commit 9875907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astrocast/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -2680,7 +2680,7 @@ def run_terahac(self, similarity_matrix: np.ndarray,

# Collect merges in sub graphs
merges = []
if not parallel:
if not parallel or len(sub_graphs) < 2:
for subgraph in sub_graphs:
merges.extend(self.subgraph_hac(subgraph))
else:
Expand Down Expand Up @@ -2733,7 +2733,7 @@ def run_terahac(self, similarity_matrix: np.ndarray,
break

counter += 1
pbar.update(-len(to_prune) - len(merges))
pbar.update(len(to_prune) + len(merges))

if counter >= stop_after:
tqdm.write(f"Prematurely stopped run after {counter} iterations.")
Expand Down

0 comments on commit 9875907

Please sign in to comment.