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

Separates vocabularies for logging #222

Merged
merged 4 commits into from
Jul 30, 2024
Merged

Conversation

kylebgorman
Copy link
Contributor

@kylebgorman kylebgorman commented Jul 30, 2024

Current logic is such that source and target vocabularies (which are stored solely for logging and debugging purposes) are unioned together if --tied_embeddings. However, the purpose of these logging statements has nothing to do with embedding tying, so we modify them so that they are not combined except when building the actual vocabulary. We also remove the special symbols from the logging since they serve no purpose there.

Before (example with mostly-disjoint vocabulary...):

Source vocabulary: '<UNK>', '<P>', '<S>', '<E>', '1', '2', '5', '8', '9', '@', 'E', 'G', 'N', 'O', 'R', 'S', 'Z', 'a', 'b', 'd', 'e', 'f', 'g', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '§', '°', 'ø', 'ŋ', 'œ', 'œ̃', 'ɑ', 'ɑ̃', 'ɔ', 'ɔ̃', 'ə', 'ɛ', 'ɛː', 'ɛ̃', 'ɡ', 'ɥ', 'ɲ', 'ʁ', 'ʃ', 'ʒ', '‿'
Target vocabulary: '<UNK>', '<P>', '<S>', '<E>', '1', '2', '5', '8', '9', '@', 'E', 'G', 'N', 'O', 'R', 'S', 'Z', 'a', 'b', 'd', 'e', 'f', 'g', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '§', '°', 'ø', 'ŋ', 'œ', 'œ̃', 'ɑ', 'ɑ̃', 'ɔ', 'ɔ̃', 'ə', 'ɛ', 'ɛː', 'ɛ̃', 'ɡ', 'ɥ', 'ɲ', 'ʁ', 'ʃ', 'ʒ', '‿'

After (ditto; note I am hiding the special symbols):

Source vocabulary: 'a', 'b', 'd', 'e', 'f', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'v', 'w', 'y', 'z', 'ø', 'ŋ', 'œ', 'œ̃', 'ɑ', 'ɑ̃', 'ɔ', 'ɔ̃', 'ə', 'ɛ', 'ɛː', 'ɛ̃', 'ɡ', 'ɥ', 'ɲ', 'ʁ', 'ʃ', 'ʒ', '‿'
Target vocabulary: '1', '2', '5', '8', '9', '@', 'E', 'G', 'N', 'O', 'R', 'S', 'Z', 'a', 'b', 'd', 'e', 'f', 'g', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '§', '°'

Closes #212.

Current logic is such that source and target vocabularies (which are stored solely for logging and debugging purposes) are unioned together if --tied_embeddings. However, the purpose of these logging statements has nothing to do with embedding tying, so we modify them so that they are not combined except when building the actual vocabulary. We also remove the special symbols from the logging since they serve no purpose there.
@kylebgorman kylebgorman marked this pull request as ready for review July 30, 2024 14:04
@kylebgorman kylebgorman requested a review from Adamits July 30, 2024 14:04
@kylebgorman kylebgorman merged commit cea2547 into CUNY-CL:master Jul 30, 2024
7 checks passed
@kylebgorman kylebgorman deleted the tie branch July 30, 2024 14:31
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.

Better logging of vocabularies
1 participant