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

[BugFix] Fix usage of BART in HF_Text #2787

Merged
merged 8 commits into from
Jan 31, 2023
Merged

Conversation

sxjscience
Copy link
Collaborator

Issue #, if available:

Description of changes:

BART models won't support token_type_ids. This is identified via:

from transformers import AutoTokenizer

tokenizer_bart = AutoTokenizer.from_pretrained("facebook/bart-base")
print("BART: ", tokenizer_bart.model_input_names)

tokenizer_electra = AutoTokenizer.from_pretrained("google/electra-base-discriminator")
print("ELECTRA:", tokenizer_electra.model_input_names)

Output:

BART:  ['input_ids', 'attention_mask']
ELECTRA: ['input_ids', 'token_type_ids', 'attention_mask']

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link

Job PR-2787-63542a9 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2787/63542a9/index.html

predictor.fit(
train_data,
hyperparameters={
"model.hf_text.checkpoint_name": "yuchenlin/BART0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be "model.hf_text.checkpoint_name": checkpoint_name ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@zhiqiangdon Just see this.. let me fix it in a follow-up PR about fixing the TIMM custom image size.

Copy link
Contributor

@zhiqiangdon zhiqiangdon left a comment

Choose a reason for hiding this comment

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

LGTM. Left a comment about the test.

@cheungdaven cheungdaven self-requested a review January 31, 2023 05:22
Copy link
Contributor

@cheungdaven cheungdaven left a comment

Choose a reason for hiding this comment

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

LGTM

@sxjscience sxjscience merged commit d4715b4 into autogluon:master Jan 31, 2023
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.

None yet

3 participants