Ranger-Deep-Learning-Optimizer
Ranger-Deep-Learning-Optimizer copied to clipboard
Spelling, variables and PEP8
Hi and thanks for the code!
I am using your script for my code and while adapting it to PEP8 specs I found a few details that you may want to change. These are style changes that add clarity, but of course it is up to you whether to adhere to PEP8 recommendations or not. I could prepare a pull request as well if you like this style.
required (from torch.optim.optimizer) is not used itertools is not used
N_sma_threshhold <-- the variable name should not begin with a capital letter, also "threshold" has a typo
k <-- is an importan variable with an obscure name, perhaps something like "lookahead_steps" would be more clear?
Multi-line comments should use """comment""" Normal comments need a space after #
betas=(.95,0.999) (and others) need a space after the coma
You have commented code that is not used, perhaps it would be best to remove it altogether.
Spaces are not consistent and don't agree with PEP8.
Hi @pablogps, Excellent recommendations and feedback. I will update the code per your suggestions and check it back in. Thanks again!
Not at all, thank you for uploading your work. I will take a look when it's done to see if I can be of any help :)
@pablogps @lessw2020 PyCharm works wonders for code styling. It'll reformat all of your code to conform to PEP8 with one click under code > reformat code
@lessw2020 Could you use black or yapf to make the code into a standard format? This would also reduce many PEP8 issues.
@hiyyg - please try it now. I ran ranger.py through pylint via vscode and had a bunch of tweaks that should resolve this. Let me know if not! Thanks
Hi, and thanks for the update! I see many improvements, that's for sure! There may be a few lingering issues, though. For example, is the "required" import ever used? But most problems have been solved, so if you feel comfortable with the current version feel free to close the issue :)