-
-
Notifications
You must be signed in to change notification settings - Fork 654
Format small #1512
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
Format small #1512
Conversation
…format_small, added missing f
This reverts commit 003956e.
|
It is returning this error: for this code in /ignite/ignite/engine/engine.py: Here is the original: |
|
It's mypy complains about how you split the string. Annotation warnings.warn(
"Data iterator can not provide data anymore but required total number of "
"iterations to run is not reached. "
f"Current iteration: {self.state.iteration} vs Total iterations to run : {self.state.epoch_length * self.state.max_epochs}" # type: ignore[operator]
) |
Thanks. I have that locally, and my commit on github shows it that way. I believe it is the "autopep8 fix" which is formatting it that way for some reason. |
Yeah, I saw that... Can you find out who does that: autopep8 or black ? |
|
It is autopep8 If I concat it, wouldn't it show up as a string? |
|
Here is what I was thinking about : msg = f"Current iteration: {self.state.iteration} vs Total iterations to run : {self.state.epoch_length * self.state.max_epochs}" # type: ignore[operator]
warnings.warn(
"Data iterator can not provide data anymore but required total number of "
f"iterations to run is not reached. {msg}"
) |
|
Very clever, I'll give it a shot! # |
|
autopep8 is unmercy :( total_iters = self.state.epoch_length * self.state.max_epochs # type: ignore[operator]
msg = f"Current iteration: {self.state.iteration} vs Total iterations to run : {total_iters}"
warnings.warn(
"Data iterator can not provide data anymore but required total number of "
f"iterations to run is not reached. {msg}"
) |
|
Yeah it's brutal! Giving it a shot. |
|
OK, done. |
vfdev-5
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @uribgp !
Related to #1496
Description: Breaking up large pull
Check list: