Fix alignment fine-tune option and alignment archive path bug#930
Open
zuazo wants to merge 2 commits intoMontrealCorpusTools:mainfrom
Open
Fix alignment fine-tune option and alignment archive path bug#930zuazo wants to merge 2 commits intoMontrealCorpusTools:mainfrom
zuazo wants to merge 2 commits intoMontrealCorpusTools:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
This PR fixes two related issues affecting the
--fine_tunefunctionality:Fine-tuning not triggered: The
PretrainedAligner.__init__()method was incorrectly assigningfine_tune_boundary_tolerancetoself.fine_tune, effectively disabling fine-tuning even when the flag was passed. This is now fixed, and a regression test ensures the fine-tuning process is properly invoked.The issue has been present since Add remap alignments functionality #912 (v3.3.5).
Incorrect alignment archive path: The construction of
.arkfile paths during fine-tuning included an unintended leading dot in the extension (..ark), which caused aFileNotFoundError.Example traceback:
This second issue remained hidden because the fine-tuning was never activated. But the test suite already fails if the
..arkbug resurfaces, so no extra assertion was added for that specific case.To confirm that fine-tuning is now active, check that the aligner prints:
These changes are minimal and maintain backward compatibility with current usage.