Skip to content

Commit 80767e4

Browse files
committed
fix edge prior enum and small tweak to progress bar
1 parent 4218cc0 commit 80767e4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/common_helpers.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ inline UpdateMethod update_method_from_string(const std::string& update_method)
4141
throw std::invalid_argument("Invalid update_method: " + update_method);
4242
}
4343

44-
enum EdgePrior { Stochastic_Block, Beta_Bernoulli, Bernoulli };
44+
enum EdgePrior { Stochastic_Block, Beta_Bernoulli, Bernoulli, Not_Applicable };
4545

4646
inline EdgePrior edge_prior_from_string(const std::string& edge_prior) {
4747
if (edge_prior == "stochastic-block")
@@ -53,5 +53,8 @@ inline EdgePrior edge_prior_from_string(const std::string& edge_prior) {
5353
if (edge_prior == "Bernoulli")
5454
return Bernoulli;
5555

56+
if (edge_prior == "Not Applicable")
57+
return Not_Applicable;
58+
5659
throw std::invalid_argument("Invalid edge_prior: " + edge_prior);
5760
}

src/progress_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void ProgressManager::update(size_t chainId) {
7777

7878
void ProgressManager::finish() {
7979

80-
if (progress_type == 0) return; // No progress display
80+
if (progress_type == 0 || needsToExit) return; // No progress display or user interrupt
8181

8282
// Mark all chains as complete and print one final time
8383
for (size_t i = 0; i < nChains; i++)

0 commit comments

Comments
 (0)