Skip to content

Fix load config for UIE #4271

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

Merged
merged 2 commits into from
Dec 29, 2022
Merged

Conversation

linjieccc
Copy link
Contributor

PR types

Others

PR changes

APIs

Description

@paddle-bot
Copy link

paddle-bot bot commented Dec 28, 2022

Thanks for your contribution!

@linjieccc linjieccc requested a review from sijunhe December 28, 2022 13:44
@linjieccc linjieccc self-assigned this Dec 28, 2022
@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Merging #4271 (89fc797) into develop (520cb09) will decrease coverage by 0.00%.
The diff coverage is 10.00%.

@@             Coverage Diff             @@
##           develop    #4271      +/-   ##
===========================================
- Coverage    36.35%   36.34%   -0.01%     
===========================================
  Files          419      419              
  Lines        59169    59172       +3     
===========================================
- Hits         21513    21509       -4     
- Misses       37656    37663       +7     
Impacted Files Coverage Δ
paddlenlp/taskflow/information_extraction.py 8.10% <10.00%> (-0.08%) ⬇️
paddlenlp/utils/downloader.py 52.45% <0.00%> (-0.41%) ⬇️
paddlenlp/transformers/unimo/modeling.py 82.58% <0.00%> (-0.29%) ⬇️
paddlenlp/transformers/mbart/modeling.py 81.76% <0.00%> (-0.18%) ⬇️
paddlenlp/transformers/bart/modeling.py 85.30% <0.00%> (-0.14%) ⬇️
paddlenlp/transformers/codegen/modeling.py 89.03% <0.00%> (-0.11%) ⬇️
paddlenlp/transformers/t5/modeling.py 85.28% <0.00%> (ø)
paddlenlp/transformers/ernie/tokenizer.py 41.93% <0.00%> (ø)
paddlenlp/transformers/ernie_m/modeling.py 90.65% <0.00%> (ø)
paddlenlp/transformers/bert/configuration.py 100.00% <0.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

self._check_task_files()
with open(os.path.join(self._task_path, "model_config.json")) as f:
self._init_class = json.load(f)["init_class"]
# TODO: compatible with the model fine-tuned without PretrainedConfig
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里应该已经向后兼容了吧,对于之前使用model_config.json的模型,这里也能加载进来。所以说TODO已经实现了?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已更新comment

Copy link
Collaborator

@sijunhe sijunhe left a comment

Choose a reason for hiding this comment

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

ok

@linjieccc linjieccc merged commit 91ab453 into PaddlePaddle:develop Dec 29, 2022
@linjieccc linjieccc deleted the fix-load-config branch December 29, 2022 03:43
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