Skip to content

Fix per-feature OOV index shift in FeatureEmbeddingLayer#613

Draft
mkolodner-sc wants to merge 1 commit intomainfrom
mkolodner-sc/fix_feature_embedding_oov
Draft

Fix per-feature OOV index shift in FeatureEmbeddingLayer#613
mkolodner-sc wants to merge 1 commit intomainfrom
mkolodner-sc/fix_feature_embedding_oov

Conversation

@mkolodner-sc
Copy link
Copy Markdown
Collaborator

Replace the global __plus_one flag with a per-feature __feature_plus_one dict so that the +1 index shift is only applied to features with a single OOV bucket (int_domain.min == -1). With multiple OOV buckets, TFT assigns OOV indices starting at vocab_size (min == 0), so applying +1 would push the max OOV index out of bounds.

Scope of work done

Where is the documentation for this feature?: N/A

Did you add automated tests or write a test plan?

Updated Changelog.md? NO

Ready for code review?: NO

Replace the global __plus_one flag with a per-feature __feature_plus_one
dict so that the +1 index shift is only applied to features with a single
OOV bucket (int_domain.min == -1). With multiple OOV buckets, TFT assigns
OOV indices starting at vocab_size (min == 0), so applying +1 would push
the max OOV index out of bounds.
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.

1 participant