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

changes in UIETask to remove mutliple schema construction #2170

Merged
merged 3 commits into from
May 16, 2022

Conversation

Spico197
Copy link
Contributor

PR types

Enhancement as discussed in issue 2165.

PR changes

  • remove import but unused os lib
  • use _schema_tree attribute to displace multiple times of schema tree construction
  • remove schema_tree arg in _multi_stage_predict
  • add early check & return in _multi_stage_predict
  • rename id var in _multi_stage_predict to idx to avoid mixing with python built-in funcs
  • change _build_tree func to python classmethod

Description

Use an attribute _schema_tree to avoid building schema tree on each call.
Local test passed.

- remove import but unused os lib
- use `_schema_tree` attribute to displace multiple times of schema tree construction
- remove `schema_tree` arg in `_multi_stage_predict`
- add early check & return in `_multi_stage_predict`
- rename `id` var in `_multi_stage_predict` to `idx` to avoid mixing with python built-in funcs
- change `_build_tree` func to python `classmethod`
@CLAassistant
Copy link

CLAassistant commented May 16, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@linjieccc linjieccc left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks a lot for your contribution!

@linjieccc linjieccc self-assigned this May 16, 2022
Copy link
Member

@ZeyuChen ZeyuChen left a comment

Choose a reason for hiding this comment

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

LGTM.
Thanks for your contributions.

@linjieccc linjieccc merged commit 9765848 into PaddlePaddle:develop May 16, 2022
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