Skip to content

Conversation

pri-ax
Copy link
Contributor

@pri-ax pri-ax commented Jun 17, 2020

Add missing from_tf=True arg when creating the model AutoModel.from_pretrained() to avoid an OSError from loading a PyTorch model from a TF 2.0 checkpoint.

Also fixed two small typos in markdown text.

@codecov
Copy link

codecov bot commented Jun 17, 2020

Codecov Report

Merging #5085 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5085      +/-   ##
==========================================
- Coverage   77.24%   77.22%   -0.02%     
==========================================
  Files         133      133              
  Lines       22146    22146              
==========================================
- Hits        17107    17103       -4     
- Misses       5039     5043       +4     
Impacted Files Coverage Δ
src/transformers/modeling_tf_utils.py 85.86% <0.00%> (-0.78%) ⬇️
src/transformers/modeling_utils.py 90.61% <0.00%> (-0.12%) ⬇️
src/transformers/modeling_transfo_xl.py 78.81% <0.00%> (+0.19%) ⬆️
src/transformers/file_utils.py 75.40% <0.00%> (+0.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7291ea0...0092c55. Read the comment docs.

@LysandreJik
Copy link
Member

Hi, I agree with the typo change, but there's no need for the from_tf flag. bert-base-cased is available in both TensorFlow and PyTorch, so there's no need for the flag.

@pri-ax
Copy link
Contributor Author

pri-ax commented Jun 18, 2020

@LysandreJik you're right! I was getting an error unless I explicitly passed from_tf=True yesterday, but not today. Since I can't reproduce it, I'll remove that change.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@LysandreJik LysandreJik merged commit a258982 into huggingface:master Jun 18, 2020
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