Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
425 commits
Select commit Hold shift + click to select a range
789246f
Update diffgrad.py (#118)
carefree0910 May 17, 2020
67883ed
Bump flake8 from 3.7.9 to 3.8.1
dependabot-preview[bot] May 12, 2020
3ea1937
Add python3.8 to setup.py
jettify May 17, 2020
374de1f
Bump flake8-quotes from 3.0.0 to 3.2.0
dependabot-preview[bot] May 17, 2020
e651c15
Make tests less flaky (#119)
jettify May 17, 2020
2b8531c
Add read the docs badge
jettify May 17, 2020
423749e
Bump pytest-cov from 2.8.1 to 2.9.0
dependabot-preview[bot] May 25, 2020
2ae1c8d
Bump flake8 from 3.8.1 to 3.8.2
dependabot-preview[bot] May 25, 2020
f778614
Refresh docs (#122)
jettify May 25, 2020
cb3e0bf
Bump sphinx from 3.0.3 to 3.0.4
dependabot-preview[bot] May 27, 2020
4f1a899
Expose shampoo properly
jettify May 30, 2020
c3d2e4d
Add project URLs
jettify May 30, 2020
1fe9eb3
Fix linter.
jettify May 30, 2020
fb68f13
Add doc string and reformat code.
jettify Jun 1, 2020
9c7f6a5
Bump pytest from 5.4.2 to 5.4.3
dependabot-preview[bot] Jun 3, 2020
94afdc9
Bump numpy from 1.18.4 to 1.18.5
dependabot-preview[bot] Jun 4, 2020
5ee4ce0
Bump mypy from 0.770 to 0.780
dependabot-preview[bot] Jun 4, 2020
ce56734
Bump ipython from 7.14.0 to 7.15.0
dependabot-preview[bot] Jun 4, 2020
c418367
Prepare lookahead optimizer for release.
jettify Jun 7, 2020
781329d
Add lookagead optimizer to the README. (#128)
jettify Jun 8, 2020
6813ac9
Bump sphinx from 3.0.4 to 3.1.0
dependabot-preview[bot] Jun 9, 2020
a162ce5
Bump flake8 from 3.8.2 to 3.8.3
dependabot-preview[bot] Jun 9, 2020
eac9489
Bump sphinx from 3.1.0 to 3.1.1
dependabot-preview[bot] Jun 15, 2020
8476cdb
Bump pytest-cov from 2.9.0 to 2.10.0
dependabot-preview[bot] Jun 15, 2020
c55f911
Add documentation reference to the README.
jettify Jun 16, 2020
d027d22
Bump matplotlib from 3.2.1 to 3.2.2
dependabot-preview[bot] Jun 18, 2020
69ea297
Bump torch from 1.5.0 to 1.5.1
dependabot-preview[bot] Jun 19, 2020
5318313
Bump torchvision from 0.6.0 to 0.6.1
dependabot-preview[bot] Jun 19, 2020
f321f53
Bump mypy from 0.780 to 0.781
dependabot-preview[bot] Jun 22, 2020
300350e
Bump sphinx-autodoc-typehints from 1.10.3 to 1.11.0
dependabot-preview[bot] Jun 22, 2020
a37ebcc
Bump mypy from 0.781 to 0.782
dependabot-preview[bot] Jun 23, 2020
3f38dc1
Add AdamP optimizer (#133)
yohann84L Jun 24, 2020
2ea3dd4
Bump ipdb from 0.13.2 to 0.13.3
dependabot-preview[bot] Jun 24, 2020
f939ae2
Bump ipython from 7.15.0 to 7.16.1
dependabot-preview[bot] Jun 29, 2020
3b18b9c
Bump numpy from 1.18.5 to 1.19.0
dependabot-preview[bot] Jun 29, 2020
a7c617e
Add SGDP optimizer (#145)
yohann84L Jul 9, 2020
feb2461
Fix numpy version (#148)
jettify Jul 9, 2020
7d2a28e
Bump sphinx from 3.1.1 to 3.1.2
dependabot-preview[bot] Jul 9, 2020
a9c25da
Bump version
jettify Jul 13, 2020
ebbd5e9
Bump dev version
jettify Jul 14, 2020
9e57e4a
Bump matplotlib from 3.2.2 to 3.3.0
dependabot-preview[bot] Jul 17, 2020
1fd079a
Add aggmo optimizer (#153)
jettify Jul 29, 2020
03e86af
Bump pytest from 5.4.3 to 6.0.0
dependabot-preview[bot] Jul 29, 2020
bf3ae01
Bump torchvision from 0.6.1 to 0.7.0
dependabot-preview[bot] Jul 29, 2020
c97991b
More robust setup.py and bump numpy version (#157)
jettify Jul 30, 2020
d2f4510
Bump pytest from 6.0.0 to 6.0.1
dependabot-preview[bot] Jul 31, 2020
b4cfa39
Add aggmo to the readme (#159)
jettify Aug 1, 2020
cc1a564
Reformat code and sort imports (#160)
jettify Aug 3, 2020
786ea0c
Fix pytorch 1.6.0 compatibility (#162)
jettify Aug 3, 2020
e0bad6e
Fix warnings in lamb optimizer (#163)
jettify Aug 3, 2020
2673d94
Resolve warnings in pid optimizer (#164)
jettify Aug 5, 2020
aff161e
Fix warning in novograd optimizer. (#165)
jettify Aug 6, 2020
462e88f
Fix warning in radam (#166)
jettify Aug 8, 2020
1138fe6
Fix warnings in qhm (#167)
jettify Aug 9, 2020
9e0ecd5
Fix warnings in sgdw (#168)
jettify Aug 9, 2020
62e3dab
Bump sphinx from 3.1.2 to 3.2.0
dependabot-preview[bot] Aug 10, 2020
7f40a46
bump version
jettify Aug 11, 2020
7ffcde8
Fix warnings in adamod (#172)
jettify Aug 12, 2020
eada604
Fix warnings in yogi optimizer. (#173)
jettify Aug 13, 2020
2348c07
Bump matplotlib from 3.3.0 to 3.3.1
dependabot-preview[bot] Aug 14, 2020
be7fd14
Fix warnings in accsgd (#175)
jettify Aug 15, 2020
398fefd
Fix warnings in shampoo (#176)
jettify Aug 16, 2020
cd0cad8
Fix missed warnings in case weight_decay specified (#177)
jettify Aug 16, 2020
166b32d
Bump sphinx from 3.2.0 to 3.2.1
dependabot-preview[bot] Aug 17, 2020
edca273
Bump pytest-cov from 2.10.0 to 2.10.1
dependabot-preview[bot] Aug 17, 2020
2d2aa31
Add SWATS optimizer (#178)
jettify Aug 17, 2020
425c3fc
Add swats to the readme (#181)
jettify Aug 19, 2020
4b44d04
Fix warnings in qhadam (#182)
jettify Aug 22, 2020
677871c
Bump black from 19.10b0 to 20.8b1
dependabot-preview[bot] Aug 27, 2020
76a518e
Fix warnings in adabound (#184)
jettify Aug 28, 2020
eff0dd4
Fix warnings in sgdp
jettify Aug 29, 2020
358ab8b
Fix warnign in adamp
jettify Aug 30, 2020
55210fa
Merge pull request #186 from jettify/fix-warning-in-sgdp-and-adamp
jettify Aug 30, 2020
dfc5c46
Add adafactor implementation
jettify Sep 5, 2020
b80dd2c
Add adafactor tests
jettify Sep 6, 2020
4531711
Add adafactor to the readme.
jettify Sep 6, 2020
0f9726b
Merge pull request #189 from jettify/add-adafactor-optimizer
jettify Sep 6, 2020
73153e9
Update docs with new optimizers.
jettify Sep 7, 2020
4bcbc69
Merge pull request #190 from jettify/update-dock-with-new-optimizers
jettify Sep 7, 2020
5761c82
yogi doc fix
matech96 Sep 8, 2020
b75c0ce
Merge pull request #191 from matech96/patch-1
jettify Sep 9, 2020
3d3d23e
Add adafactor test case. (#192)
jettify Sep 10, 2020
1185dc9
Bump numpy from 1.19.1 to 1.19.2
dependabot-preview[bot] Sep 11, 2020
2048a30
Bump pytest from 6.0.1 to 6.0.2
dependabot-preview[bot] Sep 14, 2020
7aa9d51
Bump matplotlib from 3.3.1 to 3.3.2
dependabot-preview[bot] Sep 15, 2020
f6233eb
Bump pytest from 6.0.2 to 6.1.0 (#197)
dependabot-preview[bot] Oct 4, 2020
1bddcac
Add a2grad optimizer (#199)
jettify Oct 5, 2020
dd858a8
Bump pytest from 6.1.0 to 6.1.1
dependabot-preview[bot] Oct 5, 2020
9598d97
Bump flake8 from 3.8.3 to 3.8.4
dependabot-preview[bot] Oct 5, 2020
aeb8012
Bump ipdb from 0.13.3 to 0.13.4
dependabot-preview[bot] Oct 5, 2020
84303fd
Bump hyperopt from 0.2.4 to 0.2.5
dependabot-preview[bot] Oct 7, 2020
1228f01
Add A2GradInc and A2GradExp optimizers. (#203)
jettify Oct 11, 2020
f1ac8ef
Update readme with a2grad optimizers (#204)
jettify Oct 11, 2020
711889f
Bump sphinx-autodoc-typehints from 1.11.0 to 1.11.1
dependabot-preview[bot] Oct 13, 2020
b059ec0
Update CONTRIBUTING.rst (#207)
thisiseshan Oct 16, 2020
0bf988e
Add adabelief optimizer (#209)
jettify Oct 18, 2020
7388508
Add adabelief to the readme. (#210)
jettify Oct 20, 2020
59e92d6
bump version
jettify Oct 20, 2020
8dfcec2
Correct links to the A2Grad paper (#211)
muupan Oct 23, 2020
37b8117
Bump torch from 1.6.0 to 1.7.0
dependabot-preview[bot] Oct 28, 2020
4266132
Bump torchvision from 0.7.0 to 0.8.1
dependabot-preview[bot] Oct 28, 2020
2cc62f0
Bump pytest from 6.1.1 to 6.1.2
dependabot-preview[bot] Oct 29, 2020
00bdcff
Bump numpy from 1.19.2 to 1.19.3 (#216)
dependabot-preview[bot] Oct 31, 2020
2c50eb9
Bump mypy from 0.782 to 0.790
dependabot-preview[bot] Oct 31, 2020
8edf5fc
Merge branch 'master' of github.com:jettify/pytorch-optimizer
jettify Oct 31, 2020
4de629e
Add apollo optimizer implemenation
jettify Oct 31, 2020
3d9c9ee
Add apollo optimizer test
jettify Oct 31, 2020
a2344a5
Add apollo optimizer to the readme (#218)
jettify Nov 1, 2020
c60c9a7
Bump sphinx from 3.2.1 to 3.3.0
dependabot-preview[bot] Nov 3, 2020
f135b4c
Bump numpy from 1.19.3 to 1.19.4
dependabot-preview[bot] Nov 3, 2020
8571eee
Add optimizer selection warning (#222)
jettify Nov 7, 2020
25e0c53
Bump matplotlib from 3.3.2 to 3.3.3
dependabot-preview[bot] Nov 12, 2020
29ae6ad
Bump sphinx from 3.3.0 to 3.3.1
dependabot-preview[bot] Nov 13, 2020
1aeb204
Better test of lr value validation.
jettify Nov 14, 2020
b682606
More test coverage for params validation. Add weight decay validaiotn…
jettify Nov 15, 2020
c015bc7
Move to GitHub actions (#228)
jettify Nov 26, 2020
012a35b
Add deploy workflow (#230)
jettify Nov 27, 2020
1d4b5cb
Better deploy workflow
jettify Nov 27, 2020
15fe22b
Update package classifiers in setup.py
jettify Nov 29, 2020
b5e8d6b
Bump flake8-bugbear from 20.1.4 to 20.11.1
dependabot-preview[bot] Dec 1, 2020
cb072d9
Bump wheel from 0.35.1 to 0.36.0
dependabot-preview[bot] Dec 1, 2020
e80b3c7
Create codeql-analysis.yml (#232)
jettify Dec 3, 2020
48442a7
Bump bandit from 1.6.2 to 1.6.3
dependabot-preview[bot] Dec 7, 2020
6efeaa5
added Adahessian optimizer
amirgholami Dec 13, 2020
ed138ed
Bump bandit from 1.6.3 to 1.7.0
dependabot-preview[bot] Dec 14, 2020
0ddbb2b
modify default eps value for adabelief (#240)
sidml Dec 14, 2020
49bf784
Bump torch from 1.7.0 to 1.7.1 (#237)
dependabot-preview[bot] Dec 15, 2020
5c48e2d
Bump pytest from 6.1.2 to 6.2.1
dependabot-preview[bot] Dec 16, 2020
efc6562
Merge branch 'adahessian' of https://github.com/amirgholami/pytorch-o…
jettify Dec 20, 2020
a59278d
Add tests
jettify Dec 22, 2020
9632e3c
Bump sphinx from 3.3.1 to 3.4.0 (#246)
dependabot-preview[bot] Dec 22, 2020
881bf97
Bump wheel from 0.36.0 to 0.36.2 (#241)
dependabot-preview[bot] Dec 22, 2020
0f7e98f
Bump torchvision from 0.8.1 to 0.8.2 (#238)
dependabot-preview[bot] Dec 22, 2020
4bced83
update ranger paper references (#248)
jwuphysics Dec 22, 2020
2f18ae8
add random seed for adahessian
amirgholami Dec 23, 2020
633ce23
resolve README conflict with upstream
amirgholami Dec 23, 2020
9dbf93c
resolve style errors
amirgholami Dec 23, 2020
9da7738
Merge branch 'master' into adahessian
jettify Dec 24, 2020
9fddd8f
adahessian seed should be set in constructor
amirgholami Dec 24, 2020
04c3643
set default seed as none
amirgholami Dec 26, 2020
43c0039
Fix apollo in case of .backward(create_graph = True) (#251)
jettify Dec 29, 2020
41236a4
Fix README and adahess formatting
jettify Dec 29, 2020
3ee1188
Merge branch 'amirgholami-adahessian'
jettify Dec 30, 2020
c61ebdf
Fix README reference
jettify Dec 30, 2020
17045b7
Bump sphinx from 3.4.0 to 3.4.1 (#250)
dependabot-preview[bot] Dec 30, 2020
384933f
Bump twine from 3.2.0 to 3.3.0 (#249)
dependabot-preview[bot] Dec 30, 2020
ce9bfe2
Bump version
jettify Jan 1, 2021
f865795
Bump sphinx from 3.4.1 to 3.4.2
dependabot-preview[bot] Jan 5, 2021
0503ca6
Bump numpy from 1.19.4 to 1.19.5
dependabot-preview[bot] Jan 6, 2021
b9306f8
Preserve mem format (#255)
jettify Jan 7, 2021
97413e8
Bump sphinx from 3.4.2 to 3.4.3
dependabot-preview[bot] Jan 8, 2021
e0566fb
Preserve mem format in more places (#258)
jettify Jan 13, 2021
166fb6f
Preserve mem format in more places (#259)
jettify Jan 14, 2021
b70161b
Update mnist.py
jettify Jan 14, 2021
719720c
Bump minimum supported torch version (#260)
jettify Jan 17, 2021
77973f8
Preserve mem foramt in more places (#261)
jettify Jan 17, 2021
41f8b43
Bump pytest-cov from 2.10.1 to 2.11.0
dependabot-preview[bot] Jan 18, 2021
a11792a
Bump pytest-cov from 2.11.0 to 2.11.1
dependabot-preview[bot] Jan 21, 2021
15d5fa1
Bump mypy from 0.790 to 0.800
dependabot-preview[bot] Jan 25, 2021
b87f30c
Bump pytest from 6.2.1 to 6.2.2
dependabot-preview[bot] Jan 26, 2021
7ea0418
Bump matplotlib from 3.3.3 to 3.3.4
dependabot-preview[bot] Jan 28, 2021
7f89c49
Bump sphinx from 3.4.3 to 3.5.0
dependabot-preview[bot] Feb 15, 2021
8d336b7
Bump sphinx from 3.5.0 to 3.5.1
dependabot-preview[bot] Feb 17, 2021
c1007c3
Bump pyroma from 2.6 to 2.6.1
dependabot-preview[bot] Feb 17, 2021
67ec6e3
Bump mypy from 0.800 to 0.812
dependabot-preview[bot] Feb 22, 2021
e5f567e
No need for ipython in dev dependencies.
jettify Mar 1, 2021
23ee51c
Bump ipdb from 0.13.4 to 0.13.5
dependabot-preview[bot] Mar 3, 2021
904b704
Bump pyroma from 2.6.1 to 3.0.1
dependabot-preview[bot] Mar 3, 2021
76781f6
Bump flake8-bugbear from 20.11.1 to 21.3.1
dependabot-preview[bot] Mar 4, 2021
f016e8e
Bump torchvision from 0.8.2 to 0.9.0
dependabot-preview[bot] Mar 5, 2021
4c88744
Bump torch from 1.7.1 to 1.8.0
dependabot-preview[bot] Mar 5, 2021
ef4bc19
Bump pyroma from 3.0.1 to 3.1
dependabot-preview[bot] Mar 8, 2021
f778f2c
Bump sphinx from 3.5.1 to 3.5.2
dependabot-preview[bot] Mar 8, 2021
9f33ce7
Bump ipdb from 0.13.5 to 0.13.6
dependabot-preview[bot] Mar 9, 2021
417e86e
Bump flake8-bugbear from 21.3.1 to 21.3.2
dependabot-preview[bot] Mar 9, 2021
e933a1d
Bump flake8 from 3.8.4 to 3.9.0
dependabot-preview[bot] Mar 15, 2021
baf8cd5
Bump twine from 3.3.0 to 3.4.0
dependabot-preview[bot] Mar 16, 2021
106dfed
Bump ipdb from 0.13.6 to 0.13.7
dependabot-preview[bot] Mar 16, 2021
dab7d4e
Bump twine from 3.4.0 to 3.4.1
dependabot-preview[bot] Mar 17, 2021
bbb29ae
Bump sphinx from 3.5.2 to 3.5.3
dependabot-preview[bot] Mar 22, 2021
ccce8c6
Bump torch from 1.8.0 to 1.8.1
dependabot-preview[bot] Mar 26, 2021
5fd8aee
Bump torchvision from 0.9.0 to 0.9.1
dependabot-preview[bot] Mar 26, 2021
55b025f
Bump matplotlib from 3.3.4 to 3.4.0
dependabot-preview[bot] Mar 26, 2021
2147365
Bump matplotlib from 3.4.0 to 3.4.1
dependabot-preview[bot] Mar 31, 2021
2db5207
Bump flake8-bugbear from 21.3.2 to 21.4.3
dependabot-preview[bot] Apr 2, 2021
01bbe67
Bump pytest from 6.2.2 to 6.2.3
dependabot-preview[bot] Apr 5, 2021
bbc7668
Bump sphinx from 3.5.3 to 3.5.4
dependabot-preview[bot] Apr 12, 2021
296950d
Bump sphinx-autodoc-typehints from 1.11.1 to 1.12.0
dependabot-preview[bot] Apr 15, 2021
724652c
Bump flake8 from 3.9.0 to 3.9.1
dependabot-preview[bot] Apr 16, 2021
18737b1
Bump black from 20.8b1 to 21.4b0
dependabot-preview[bot] Apr 26, 2021
3cb7671
Bump black from 21.4b0 to 21.4b1
dependabot-preview[bot] Apr 28, 2021
45ea2ca
Bump black from 21.4b1 to 21.4b2
dependabot-preview[bot] Apr 29, 2021
71933ea
Bump pytest from 6.2.3 to 6.2.4
dependabot-preview[bot] May 5, 2021
08e617c
Bump black from 21.4b2 to 21.5b0
dependabot-preview[bot] May 5, 2021
cb38230
Bump flake8 from 3.9.1 to 3.9.2
dependabot-preview[bot] May 10, 2021
0c189b3
Bump sphinx from 3.5.4 to 4.0.0
dependabot-preview[bot] May 10, 2021
6ce8066
Bump matplotlib from 3.4.1 to 3.4.2
dependabot-preview[bot] May 10, 2021
237be66
Bump black from 21.5b0 to 21.5b1
dependabot-preview[bot] May 11, 2021
746638c
Bump sphinx from 4.0.0 to 4.0.1
dependabot-preview[bot] May 11, 2021
a65a34c
Bump pytest-cov from 2.11.1 to 2.12.0
dependabot-preview[bot] May 17, 2021
0e292d2
Bump sphinx from 4.0.1 to 4.0.2
dependabot-preview[bot] May 21, 2021
1be2a04
Bump ipdb from 0.13.7 to 0.13.8
dependabot-preview[bot] May 27, 2021
98df834
Bump black from 21.5b1 to 21.5b2
dependabot-preview[bot] Jun 1, 2021
12858a6
Bump pytest-cov from 2.12.0 to 2.12.1
dependabot-preview[bot] Jun 2, 2021
e546b1c
Bump ipdb from 0.13.8 to 0.13.9
dependabot-preview[bot] Jun 3, 2021
6b4c578
Bump mypy from 0.812 to 0.901
dependabot-preview[bot] Jun 9, 2021
d31b444
Bump mypy from 0.901 to 0.902
dependabot-preview[bot] Jun 11, 2021
9dc8f59
Bump black from 21.5b2 to 21.6b0
dependabot-preview[bot] Jun 11, 2021
8c2c2ea
Bump torchvision from 0.9.1 to 0.10.0
dependabot-preview[bot] Jun 16, 2021
bf9e259
Bump torch from 1.8.1 to 1.9.0
dependabot-preview[bot] Jun 16, 2021
7e7e5ce
Upgrade to GitHub-native Dependabot (#310)
dependabot-preview[bot] Jun 20, 2021
02dee34
Add MADGRAD optimizer (#299)
vinnik-dmitry07 Jun 20, 2021
575689c
Fix error messages for madgrad (#332)
jettify Jun 20, 2021
c0357d4
Fix typo in the readme example
jettify Jun 20, 2021
146fb8c
Update testing matrix. (#277)
jettify Jun 20, 2021
8580407
Bump numpy from 1.19.5 to 1.20.3 (#334)
dependabot[bot] Jun 26, 2021
1d0fc8e
Bump numpy from 1.20.3 to 1.21.0 (#338)
dependabot[bot] Jul 6, 2021
922ad0b
Bump mypy from 0.902 to 0.910 (#336)
dependabot[bot] Oct 2, 2021
485196e
#349 bugfix Lookahead does not call super init (#350)
chenkins Oct 2, 2021
409c75f
Bump testing dependencies. (#362)
jettify Oct 2, 2021
fa5b2f4
Add citation file. (#363)
jettify Oct 2, 2021
ecaf0ad
Add citation section. (#364)
jettify Oct 2, 2021
e9fd980
Bump sphinx from 4.0.2 to 4.2.0 (#359)
dependabot[bot] Oct 2, 2021
a7790ab
fix flaky test (#368)
crawlingcub Oct 3, 2021
90e3819
Fixing flaky tests (#369)
crawlingcub Oct 5, 2021
d69412c
Update lookahead.py (#371)
ryancinsight Oct 5, 2021
0bc5cad
Run CI on schedule each week. (#374)
jettify Oct 9, 2021
77c575c
Add LARS optimizer (#373)
jettify Oct 9, 2021
8faead1
Bump dependencies. (#376)
jettify Oct 12, 2021
a385d4d
Drop radam optimizer. (#377)
jettify Oct 12, 2021
aac06c4
Bump flake8 from 4.0.0 to 4.0.1 (#378)
dependabot[bot] Oct 19, 2021
d8005ef
Bump isort. (#379)
jettify Oct 19, 2021
3e2a4e2
Do not inclue tests as package. (#386)
jettify Oct 26, 2021
75eab6c
Bump version.
jettify Oct 26, 2021
604d2a9
Fix deploy workflow.
jettify Oct 26, 2021
fc6441d
Bump version.
jettify Oct 26, 2021
df73ca3
Bump torch from 1.9.1 to 1.10.0 (#381)
dependabot[bot] Oct 26, 2021
681ef05
Bump numpy from 1.21.2 to 1.21.3 (#383)
dependabot[bot] Oct 26, 2021
360897a
Bump flake8-quotes from 3.3.0 to 3.3.1 (#382)
dependabot[bot] Oct 26, 2021
1eb083b
Bump torchvision from 0.10.1 to 0.11.1 (#380)
dependabot[bot] Oct 26, 2021
6f45608
Revert "Drop radam optimizer. (#377)" (#388)
jettify Oct 31, 2021
4962203
Bump version.
jettify Oct 31, 2021
9c022fb
Deprecate RAdam optimizer properly. (#389)
jettify Oct 31, 2021
46205e2
Fix grammar in README (#394)
goliney Nov 11, 2021
1db5212
Minor grammar in README (#505)
jona-sassenhagen Jun 20, 2023
93cfaf6
Add Lion optimizer (#504)
jona-sassenhagen Jun 20, 2023
b35ba0b
Reformat codebase with more default black. (#506)
jettify Jun 20, 2023
63932f2
Bump dependencies to address security alerts.
jettify Jun 20, 2023
1319ca6
Bump torch from 1.10.0 to 1.13.1 in /examples (#507)
dependabot[bot] Jun 20, 2023
ff06ef0
Checking for requires_grad
Jul 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version = 1

test_patterns = ["tests/test_*.py"]

exclude_patterns = [
"tests/test_optimizer.py",
"docs/conf.py",
"tests/utils.py",
"examples/*"
]

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
day: "monday"
time: "10:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: numpy
versions:
- 1.20.0
- 1.20.1
- dependency-name: isort
versions:
- 5.7.0
- dependency-name: ipython
versions:
- 7.19.0
- 7.20.0
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '39 10 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
71 changes: 71 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CI

on:
push:
branches:
- master
tags: [ 'v*' ]
pull_request:
branches:
- master
schedule:
- cron: '0 6 * * 1' # Weekly Mon 6AM UTC build


jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install codecov
pip install -r requirements-dev.txt
- name: Lint
run: |
make lint
make checkbuild

- name: Test
run: |
make cov
codecov

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: test
# Run only on pushing a tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run:
python -m pip install -U pip wheel twine
- name: Make dists
run:
python setup.py sdist bdist_wheel
- name: PyPI upload
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/*
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ target/
.coverage.*
coverage
.mypy_cache/
.DS_Store
tags
cscope.*
TODO
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

21 changes: 20 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
Changes
-------

0.0.1 (YYYY-MM-DD)
0.3.1 (YYYY-MM-DD)
------------------
* Deprecate RAdam optimizer.

0.3.0 (2021-10-30)
------------------
* Revert for Drop RAdam.

0.2.0 (2021-10-25)
------------------
* Drop RAdam optimizer since it is included in pytorch.
* Do not include tests as installable package.
* Preserver memory layout where possible.
* Add MADGRAD optimizer.

0.1.0 (2021-01-01)
------------------
* Initial release.
* Added support for A2GradExp, A2GradInc, A2GradUni, AccSGD, AdaBelief,
AdaBound, AdaMod, Adafactor, Adahessian, AdamP, AggMo, Apollo,
DiffGrad, Lamb, Lookahead, NovoGrad, PID, QHAdam, QHM, RAdam, Ranger,
RangerQH, RangerVA, SGDP, SGDW, SWATS, Shampoo, Yogi.
9 changes: 9 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Novik
given-names: Mykola
orcid: https://orcid.org/0000-0002-0890-1159
title: "torch-optimizer -- collection of optimization algorithms for PyTorch."
version: 1.0.1
date-released: 2020-01-11
53 changes: 53 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Contributing
============

Running Tests
-------------

.. _GitHub: https://github.com/jettify/pytorch-optimizer
.. _PyTorch: https://github.com/pytorch/pytorch

Thanks for your interest in contributing to ``pytorch-optimizer``, there are multiple
ways and places you can contribute.

First of all just clone repository::

$ git clone git@github.com:jettify/pytorch-optimizer.git

Create virtualenv with python3.5 (older version are not supported). For example
using *virtualenvwrapper* commands could look like::

$ cd pytorch-optimizer
$ mkvirtualenv --python=`which python3.7` pytorch-optimizer


After that please install libraries required for development::

$ pip install -r requirements-dev.txt
$ pip install -e .

Congratulations, you are ready to run the test suite::

$ make cov

To run individual use following command::

$ py.test -sv tests/test_basic.py -k test_name


Reporting an Issue
------------------
If you have found issue with `pytorch-optimizer` please do
not hesitate to file an issue on the GitHub_ project. When filing your
issue please make sure you can express the issue with a reproducible test
case.

When reporting an issue we also need as much information about your environment
that you can include. We never know what information will be pertinent when
trying narrow down the issue. Please include at least the following
information:

* Version of `pytorch-optimizer`, `python`.
* Version PyTorch_ if installed.
* Version or CUDA if installed.
* Platform you're running on (OS X, Linux).
5 changes: 3 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ include LICENSE
include CHANGES.rst
include README.rst
include Makefile
graft torch_inspect
graft torch_optimizer
graft tests
global-exclude *.pyc
prune docs/_build
include examples/mnist.py
global-exclude *.py[cod]
27 changes: 23 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Some simple testing tasks (sorry, UNIX only).

FILES := torch_optimizer tests examples setup.py



flake:
flake8 torch_optimizer tests examples setup.py
flake8 ${FILES}

test: flake
pytest -sv
Expand All @@ -20,12 +23,22 @@ bandit:
bandit -r ./torch_optimizer

mypy:
mypy torch_optimizer --ignore-missing-imports --strict
mypy torch_optimizer --ignore-missing-imports

cov cover coverage: flake checkrst pyroma bandit
checkbuild:
python setup.py sdist bdist_wheel
twine check dist/*

cov cover coverage:
pytest -sv -vv --cov=torch_optimizer --cov-report=term --cov-report=html ./tests
@echo "open file://`pwd`/htmlcov/index.html"

checkfmt:
isort --profile black --check-only --diff $(FILES)
black -l 79 --check $(FILES)

lint: flake checkrst pyroma bandit checkfmt

clean:
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
Expand All @@ -40,12 +53,18 @@ clean:
rm -rf build
rm -rf cover
rm -rf dist
rm -rf docs/_build

doc:
make -C docs html
@echo "open file://`pwd`/docs/_build/html/index.html"

black:
black -S -l 79 setup.py torch_optimizer/ tests/ examples/
black -l 79 setup.py torch_optimizer/ tests/ examples/

fmt:
isort --profile black ${FILES}
black -l 79 ${FILES}


.PHONY: all flake test vtest cov clean doc
Loading