Repository navigation
[CodeStyle][task 1] enable Ruff UP032 rule with . except python/paddle/base - #57409
Merged
Merged
Conversation
Collaborator
Author
Collaborator
|
你这也没修呀 ruff check . --statistics
871 UP032 [*] Use f-string instead of `format` call |
python/paddle/base
Collaborator
Author
Collaborator
|
LGTM, 可以等 |
Collaborator
|
需要解决冲突 |
Collaborator
Author
gouzil
reviewed
Sep 21, 2023
Comment on lines
505
to
500
|
|
||
| os.environ['PADDLE_TRAINER_ID'] = '{}'.format( | ||
| host_endpoints.index(self.curr_host) | ||
| ) | ||
| os.environ[ | ||
| 'PADDLE_TRAINER_ID' | ||
| ] = f'{host_endpoints.index(self.curr_host)}' | ||
| hosts = ','.join( |
gouzil
reviewed
Sep 21, 2023
Comment on lines
-558
to
+552
| os.environ['PADDLE_TRAINER_ID'] = '{}'.format( | ||
| sorted_endpoints.index(self.curr_host) | ||
| ) | ||
| os.environ[ | ||
| 'PADDLE_TRAINER_ID' | ||
| ] = f'{sorted_endpoints.index(self.curr_host)}' |
gouzil
reviewed
Sep 21, 2023
| assert fwd_op_id in self._op_fp16_dict, "{}".format( | ||
| str(op) | ||
| ) | ||
| assert fwd_op_id in self._op_fp16_dict, f"{str(op)}" |
gouzil
reviewed
Sep 21, 2023
Comment on lines
-129
to
+137
| item_str = '{{:.{}e}}'.format( | ||
| DEFAULT_PRINT_OPTIONS.precision | ||
| ).format(np_var) | ||
| item_str = f'{{:.{DEFAULT_PRINT_OPTIONS.precision}e}}'.format( | ||
| np_var | ||
| ) | ||
| elif np.ceil(np_var) == np_var: | ||
| item_str = f'{np_var:.0f}.' | ||
| else: | ||
| item_str = '{{:.{}f}}'.format( | ||
| DEFAULT_PRINT_OPTIONS.precision | ||
| ).format(np_var) | ||
| item_str = f'{{:.{DEFAULT_PRINT_OPTIONS.precision}f}}'.format( | ||
| np_var | ||
| ) |
gouzil
reviewed
Sep 21, 2023
| "received tensor_version:{} != wrapper_version_snapshot:{}".format( | ||
| 1, 0 | ||
| ), | ||
| f"received tensor_version:{1} != wrapper_version_snapshot:{0}", |
Collaborator
|
其余LGTM,在下一个pr修改优化,@SigureMo |
Frida-a
pushed a commit
to Frida-a/Paddle
that referenced
this pull request
Oct 14, 2023
…le/base` (PaddlePaddle#57409) * update up032 * update up032 * Update api_gen.py * Update api_gen.py * Update sampcd_processor_utils.py
jiahy0825
pushed a commit
to jiahy0825/Paddle
that referenced
this pull request
Oct 16, 2023
…le/base` (PaddlePaddle#57409) * update up032 * update up032 * Update api_gen.py * Update api_gen.py * Update sampcd_processor_utils.py
danleifeng
pushed a commit
to danleifeng/Paddle
that referenced
this pull request
Nov 14, 2023
…le/base` (PaddlePaddle#57409) * update up032 * update up032 * Update api_gen.py * Update api_gen.py * Update sampcd_processor_utils.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Description
#57367 task1