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

[Dy2stat] Change the Global Switch Name of ProgramTranslator for API 2.0 #27203

Merged

Conversation

zhhsplendid
Copy link
Member

@zhhsplendid zhhsplendid commented Sep 9, 2020

PR types

Others

PR changes

APIs

Describe

Change ProgramTranslator.enable_declarative to ProgramTranslator.enable_to_static to meet API 2.0

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 9, 2020

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

liym27
liym27 previously approved these changes Sep 10, 2020
lanxianghit
lanxianghit previously approved these changes Sep 10, 2020
Copy link
Contributor

@lanxianghit lanxianghit left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -300,16 +300,17 @@ def __call__(self, *args, **kwargs):
"""

# 1. call dygraph function directly if not enable `declarative`
if not self._program_trans.enable_declarative:
if not self._program_trans.enable_static:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe enable_to_static is better? keep consistent with paddle.jit.to_static

because we have paddle.disable_static, users may be confused whether it is related to enable_static here

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@zhhsplendid zhhsplendid dismissed stale reviews from lanxianghit and liym27 via 702d8e8 September 14, 2020 06:25
Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

@zhhsplendid zhhsplendid merged commit d4b4357 into PaddlePaddle:develop Sep 17, 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.

6 participants