Skip to content

Commit

Permalink
Tweak progressbar total
Browse files Browse the repository at this point in the history
The ma-match progress bar never completes the stated total because we match the total num ancestors minus 1 (we don't count the "virtual root-like ancestor). This produces a red bar when using the tqdm notebook output.
  • Loading branch information
hyanwong authored and mergify[bot] committed Mar 11, 2024
1 parent fa6c364 commit d9e58cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tsinfer/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,9 @@ def match_ancestors(self):
logger.info(
f"Starting ancestor matching for {len(self.ancestor_grouping)} groups"
)
self.match_progress = self.progress_monitor.get("ma_match", self.num_ancestors)
self.match_progress = self.progress_monitor.get(
"ma_match", self.num_ancestors - 1
)
if self.use_dask:
logger.info("Using dask for ancestor matching")
delayed_recombination = dask.delayed(self.recombination, pure=True)
Expand Down

0 comments on commit d9e58cc

Please sign in to comment.