Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 'module object is not callable' error #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/clustervars
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import cluster_linfreq
import clustermaker
from resultserializer import Results
import util
from progressbar import progressbar
import tqdm

def _convert_assignment_to_clustering(Z, vids):
uniq_Z = set(list(Z))
Expand Down Expand Up @@ -83,7 +83,7 @@ def _launch_parallel(run_chain, args, iter_per_chain, nchains, parallel, seed):
manager = multiprocessing.Manager()
progress_queue = manager.Queue()

with progressbar(total=total, desc='Clustering variants', unit='iter', dynamic_ncols=True) as pbar:
with tqdm.tqdm(total=total, desc='Clustering variants', unit='iter', dynamic_ncols=True) as pbar:
with concurrent.futures.ProcessPoolExecutor(max_workers=parallel) as ex:
for C in range(nchains):
jobs.append(ex.submit(run_chain, *args, seed + C + 1, progress_queue))
Expand Down
4 changes: 2 additions & 2 deletions lib/pairwise.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import scipy.special
import concurrent.futures
from progressbar import progressbar
import tqdm
import itertools

from common import Models, NUM_MODELS, ALL_MODELS
Expand Down Expand Up @@ -158,7 +158,7 @@ def calc_posterior(variants, logprior, rel_type, parallel=1):
)

if parallel > 0:
with progressbar(total=len(pairs), desc='Computing %s relations' % rel_type, unit='pair', dynamic_ncols=True) as pbar:
with tqdm.tqdm(total=len(pairs), desc='Computing %s relations' % rel_type, unit='pair', dynamic_ncols=True) as pbar:
posterior, evidence =_compute(pbar)
else:
posterior, evidence =_compute(None)
Expand Down
4 changes: 2 additions & 2 deletions lib/tree_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import scipy.stats
import common
import mutrel
from progressbar import progressbar
import tqdm
import phi_fitter
import hyperparams as hparams
import math
Expand Down Expand Up @@ -599,7 +599,7 @@ def sample_trees(data_mutrel, supervars, superclusters, trees_per_chain, burnin,
# the main process to update the progress bar.
progress_queue = manager.Queue()

with progressbar(total=total, desc='Sampling trees', unit='tree', dynamic_ncols=True) as pbar:
with tqdm.tqdm(total=total, desc='Sampling trees', unit='tree', dynamic_ncols=True) as pbar:
with concurrent.futures.ProcessPoolExecutor(max_workers=parallel) as ex:
for C in range(nchains):
# Ensure each chain's random seed is different from the seed used to
Expand Down