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

Do not output empty alignments #963

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Do not output empty alignments #963

wants to merge 1 commit into from

Conversation

eu9ene
Copy link
Collaborator

@eu9ene eu9ene commented Dec 17, 2024

It pollutes the log and I think it also causes issues with the W&B parser

@eu9ene eu9ene requested a review from a team as a code owner December 17, 2024 19:52
@@ -104,13 +104,16 @@ def build_dataset_tsv(
empty_alignments = []

for src_line, trg_line, aln_line in zip(src_lines, trg_lines, aln_lines):
if not aln_line:
if aln_line.strip():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not understanding this patch from the description of the changes compared to the code change. The only real behavior change I'm seeing is that the alignment line is stripped first to see if it's blank. The rest is just code refactoring.

It's also still outputting the a sample of the alignments.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did the trick. Marian used to complain without outputting the sample, so I assume there are some newlines or something else that made it not empty: https://firefox-ci-tc.services.mozilla.com/tasks/JQuHsJS2R6-RuPR-O9XMXQ/runs/0/logs/public/logs/live.log

@gregtatum gregtatum self-requested a review December 18, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants