Skip to content

Commit

Permalink
Merge pull request #520 from CUQI-DTU/add_prefix_to_sampling_progress…
Browse files Browse the repository at this point in the history
…_516

Add prefix to sampling progress
  • Loading branch information
nabriis authored Sep 12, 2024
2 parents 464aa14 + d8364e3 commit f2fb340
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cuqi/experimental/mcmc/_gibbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def sample(self, Ns) -> 'HybridGibbs':
"""

for _ in tqdm(range(Ns)):
for _ in tqdm(range(Ns), "Sample: "):

self.step()

Expand All @@ -184,7 +184,7 @@ def warmup(self, Nb, tune_freq=0.1) -> 'HybridGibbs':

tune_interval = max(int(tune_freq * Nb), 1)

for idx in tqdm(range(Nb)):
for idx in tqdm(range(Nb), "Warmup: "):

self.step()

Expand Down
4 changes: 2 additions & 2 deletions cuqi/experimental/mcmc/_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def sample(self, Ns, batch_size=0, sample_path='./CUQI_samples/') -> 'Sampler':
if hasattr(self, "_pre_sample"): self._pre_sample()

# Draw samples
for _ in tqdm( range(Ns) ):
for _ in tqdm( range(Ns), "Sample: "):

# Perform one step of the sampler
acc = self.step()
Expand Down Expand Up @@ -260,7 +260,7 @@ def warmup(self, Nb, tune_freq=0.1) -> 'Sampler':
if hasattr(self, "_pre_warmup"): self._pre_warmup()

# Draw warmup samples with tuning
for idx in tqdm(range(Nb)):
for idx in tqdm(range(Nb), "Warmup: "):

# Perform one step of the sampler
acc = self.step()
Expand Down

0 comments on commit f2fb340

Please sign in to comment.