Skip to content

Commit

Permalink
use the same rng engine on each os
Browse files Browse the repository at this point in the history
  • Loading branch information
pzelasko committed Mar 8, 2024
1 parent 6bea42c commit 36b169d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions extensions/kaldi_align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ namespace internal {
const int replications,
const unsigned int seed)
{
std::default_random_engine rng{seed};
std::mt19937 rng{seed};
std::uniform_int_distribution<> dist{0, static_cast<int>(edit_sym_per_hyp.size()) - 1};

double wer_accum = 0.0, wer_mult_accum = 0.0;
Expand Down Expand Up @@ -209,7 +209,7 @@ namespace internal {
const int replications,
const unsigned int seed
) {
std::default_random_engine rng{seed};
std::mt19937 rng{seed};
std::uniform_int_distribution<> dist{0, static_cast<int>(edit_sym_per_hyp.size()) - 1};

double improv_accum = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_edit_distance_sclite():
}


approx = partial(pytest.approx, abs=1e-3)
approx = partial(pytest.approx, abs=3e-3)


def test_bootstrap_wer_ci_1system():
Expand Down

0 comments on commit 36b169d

Please sign in to comment.