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.2.13 #648

Merged
merged 1 commit into from
Jun 7, 2023
Merged
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
5 changes: 5 additions & 0 deletions docs/source/changelog/changelog_2.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
2.2 Changelog
*************

2.2.13
======

- Fixes an issue in using sqlite during subset creation for training

2.2.12
======

Expand Down
3 changes: 3 additions & 0 deletions montreal_forced_aligner/command_line/mfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def mfa_cli(ctx: click.Context) -> None:
auto_server = False
else:
auto_server = getattr(GLOBAL_CONFIG.global_profile, "auto_server", True)
if "--no_use_postgres" in sys.argv or not GLOBAL_CONFIG.current_profile.use_postgres:
run_check = False
auto_server = False
if auto_server:
start_server()
elif run_check:
Expand Down
12 changes: 10 additions & 2 deletions montreal_forced_aligner/corpus/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,11 @@ def create_subset(self, subset: int) -> None:
session.query(Utterance.id)
.join(Utterance.speaker)
.filter(Speaker.dictionary_id == dict_id)
.filter(Utterance.text.op("~")(r" [^ ]+ "))
.filter(
Utterance.text.op("~")(r" [^ ]+ ")
if GLOBAL_CONFIG.current_profile.use_postgres
else Utterance.text.regexp_match(r" [^ ]+ ")
)
.filter(Utterance.ignored == False) # noqa
.order_by(Utterance.duration)
.limit(larger_subset_num)
Expand Down Expand Up @@ -1144,7 +1148,11 @@ def create_subset(self, subset: int) -> None:
# Get all shorter utterances that are not one word long
larger_subset_query = (
session.query(Utterance.id)
.filter(Utterance.text.op("~")(r"\s\S+\s"))
.filter(
Utterance.text.op("~")(r"\s\S+\s")
if GLOBAL_CONFIG.current_profile.use_postgres
else Utterance.text.regexp_match(r"\s\S+\s")
)
.filter(Utterance.ignored == False) # noqa
.order_by(Utterance.duration)
.limit(larger_subset_num)
Expand Down