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] Remove gast.Index for compatibility of gast 0.4.0 #31358

Merged
merged 3 commits into from
Mar 4, 2021

Conversation

liym27
Copy link
Contributor

@liym27 liym27 commented Mar 2, 2021

PR types

Bug fixes

PR changes

Others

Describe

As the title
When gast>=0.4.0, gast.Index is not used, which is replaced other gast node such as gast.Constant, gast.Name, gast.UnaryOp and so on.
Considering the compatibility of gast, here use ast note to check whether the node is a num. For more details, please visit https://github.com/serge-sans-paille/gast

@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 2, 2021

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

@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 2, 2021

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@liym27 liym27 force-pushed the fix_gast_idx_version branch from a9498f0 to d11c7ae Compare March 2, 2021 06:58
@liym27 liym27 force-pushed the fix_gast_idx_version branch from 11fa61f to d8ab03e Compare March 2, 2021 09:51
@liym27 liym27 force-pushed the fix_gast_idx_version branch 2 times, most recently from e7bcfac to 0cc4f4b Compare March 3, 2021 07:06
@liym27 liym27 force-pushed the fix_gast_idx_version branch from 0cc4f4b to 8d5c843 Compare March 3, 2021 07:36
@liym27 liym27 force-pushed the fix_gast_idx_version branch from 8d5c843 to 076bbe3 Compare March 3, 2021 08:28
@liym27 liym27 force-pushed the fix_gast_idx_version branch from 076bbe3 to d63d7d8 Compare March 3, 2021 09:12
zhhsplendid
zhhsplendid previously approved these changes Mar 3, 2021
Copy link
Member

@zhhsplendid zhhsplendid 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
Member

@zhhsplendid zhhsplendid left a comment

Choose a reason for hiding this comment

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

LGTM

@liym27 liym27 changed the title Replace gast.Index with gast.Constant [Dy2Stat] Remove gast.Index for compatibility of gast 0.4.0 Mar 4, 2021
@liym27 liym27 merged commit 522c91e into PaddlePaddle:develop Mar 4, 2021
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