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

2.1.3 #553

Merged
merged 6 commits into from
Feb 9, 2023
Merged

2.1.3 #553

Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Better cleaning of databases
  • Loading branch information
mmcauliffe committed Feb 8, 2023
commit 262731d3d385b6f0dcf922c26dce18fe9296c63a
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
label: osx-64
prefix: /Users/runner/miniconda3/envs/my-env

- os: windows-latest
label: win-64
prefix: C:\Miniconda3\envs\my-env
#- os: windows-latest
# label: win-64
# prefix: C:\Miniconda3\envs\my-env

name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
Expand Down
5 changes: 4 additions & 1 deletion montreal_forced_aligner/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ def initialize_database(self) -> None:
if exist_check:
if GLOBAL_CONFIG.current_profile.clean:
self.clean_working_directory()
MfaSqlBase.metadata.drop_all(self.db_engine)
with self.db_engine.connect() as conn:
for tbl in reversed(MfaSqlBase.metadata.sorted_tables):
conn.execute(tbl.delete())
conn.commit()
else:
return

Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def temp_dir(generated_dir, global_config):
yield temp_dir


@pytest.fixture(scope="function")
@pytest.fixture(scope="session")
def db_setup(temp_dir, global_config, request):
from montreal_forced_aligner.command_line.utils import (
check_databases,
Expand Down
3 changes: 0 additions & 3 deletions tests/data/configs/basic_train_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,3 @@ training:
subset: 1000
features:
lda: true

- pronunciation_probabilities:
subset: 1000
4 changes: 0 additions & 4 deletions tests/test_acoustic_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def test_trainer(basic_dict_path, temp_dir, basic_corpus_dir):
assert a.training_configs[a.final_identifier].max_gaussians == 150000


@pytest.mark.skip("Inconsistent failing")
def test_basic_mono(
mixed_dict_path,
basic_corpus_dir,
Expand Down Expand Up @@ -51,7 +50,6 @@ def test_basic_mono(
assert os.path.exists(mono_output_directory)


@pytest.mark.skip("Inconsistent failing")
def test_pronunciation_training(
mixed_dict_path,
basic_corpus_dir,
Expand Down Expand Up @@ -101,7 +99,6 @@ def test_pronunciation_training(
)


@pytest.mark.skip("Inconsistent failing")
def test_pitch_feature_training(
basic_dict_path, basic_corpus_dir, pitch_train_config_path, db_setup
):
Expand All @@ -117,7 +114,6 @@ def test_pitch_feature_training(
assert a.get_feat_dim() == 45


@pytest.mark.skip("Inconsistent failing")
def test_basic_lda(basic_dict_path, basic_corpus_dir, lda_train_config_path, db_setup):
a = TrainableAligner(
corpus_directory=basic_corpus_dir,
Expand Down