Skip to content

Commit

Permalink
removed collect_results for efficiency (fixed error)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsexton2 committed Feb 9, 2025
1 parent b9585c2 commit 5b82fae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions basicrta/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ def get_taus(self):
"""
from basicrta.util import get_bars

with (Pool(nproc, initializer=tqdm.set_lock,
initargs=(Lock(),)) as p):
try:
for _ in tqdm(p.istarmap(self._single_residue, inarr),
total=len(dirs), position=0,
desc='overall progress'):
pass
except KeyboardInterrupt:
pass

taus = []
for res in tqdm(self.residues, total=len(self.residues)):
taus.append(res.tau)
Expand Down

0 comments on commit 5b82fae

Please sign in to comment.