Skip to content

ConvBERT: minor fixes for conversion script#9937

Merged
LysandreJik merged 1 commit intohuggingface:masterfrom
stefan-it:convbert-fix-clean
Feb 2, 2021
Merged

ConvBERT: minor fixes for conversion script#9937
LysandreJik merged 1 commit intohuggingface:masterfrom
stefan-it:convbert-fix-clean

Conversation

@stefan-it
Copy link
Copy Markdown
Collaborator

Hi,

the conversion script for ConvBERT throws the following error message when using it:

Traceback (most recent call last):
  File "convert_convbert_original_tf1_checkpoint_to_pytorch.py", line 19, in <module>
    from ...utils import logging
ImportError: attempted relative import with no known parent package

I fixed that error, as well as using the correct name for the configuration file argument.

Additionally, I just found that the configuration files from the YituTech organization for ConvBERT from aren't correct, because they use:

"model_type": "conv_bert",

instead of:

"model_type": "convbert",

(This currently results in a KeyError: 'conv_bert' error).

@stefan-it
Copy link
Copy Markdown
Collaborator Author

Pinging @abhishekkrthakur and @sgugger 🤗

Copy link
Copy Markdown
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

The imports are correct this way. I'll defer to @abhishekkrthakur for the other change.
Thanks for your PR!

@abhishekkrthakur
Copy link
Copy Markdown
Contributor

Weird that relative imports failed. Anyways, thanks for the PR. The model_type in hub has been fixed.

@abhishekkrthakur abhishekkrthakur self-requested a review February 2, 2021 04:57
@LysandreJik LysandreJik merged commit aa438a4 into huggingface:master Feb 2, 2021
@stefan-it stefan-it deleted the convbert-fix-clean branch February 2, 2021 15:41
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.

4 participants