Skip to content

Commit 9753eda

Browse files
authored
Merge pull request #381 from kozistr/release/v3.6.0
[Release] v3.6.0
2 parents 733f246 + 05f9baf commit 9753eda

File tree

14 files changed

+316
-262
lines changed

14 files changed

+316
-262
lines changed

docs/changelogs/v3.6.0.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
* [Towards Efficient Optimizer Design for LLM via Structured Fisher Approximation with a Low-Rank Extension](https://arxiv.org/abs/2502.07752)
99
* Implement `VSGD` optimizer. (#377, #378)
1010
* [Variational Stochastic Gradient Descent for Deep Neural Networks](https://openreview.net/forum?id=xu4ATNjcdy)
11-
* Support complex parameters. (#370, #380)
11+
* Enable training with complex parameters. (#370, #380)
12+
* will raise `NoComplexParameterError` for unsupported optimizers, due to its design or not-yet-implemented.
1213
* Support `maximize` parameter. (#370, #380)
14+
* `maximize`: maximize the objective with respect to the params, instead of minimizing.
15+
* Implement `copy_stochastic()` method. (#381)
1316

1417
### Update
1518

@@ -19,8 +22,13 @@
1922
* You can still use these variants by passing the parameters to `**kwargs`.
2023
* Notably, in case of `adanorm` variant, you need to pass `adanorm` (and `adanorm_r` for `r` option) parameter(s) to use this variant, and the name of the state will be changed from `exp_avg_norm` to `exp_avg_adanorm`.
2124
* Refactor `reset()` to `init_group()` method in the `BaseOptimizer` class. (#380)
22-
* Refactor `SAM` optimizer faimily. (#380)
25+
* Refactor `SAM` optimizer family. (#380)
26+
* Gather `AdamP`, `SGDP` things into `pytorch_optimizer.optimizer.adamp.*`. (#381)
27+
* `pytorch_optimizer.optimizer.sgdp.SGDP` to `pytorch_optimizer.optimizer.adamp.SGDP`
28+
* `pytorch_optimizer.optimizer.util.projection` to `pytorch_optimizer.optimizer.adamp.projection`
29+
* `pytorch_optimizer.optimizer.util.cosine_similarity_by_view` to `pytorch_optimizer.optimizer.adamp.cosine_similarity_by_view`
30+
* Remove `channel_view()` and `layer_view()` from `pytorch_optimizer.optimizer.util`. (#381)
2331

2432
### Fix
2533

26-
* Fix shape mismatch issues in the Galore projection for `reverse_std`, `right` and `full` projection types. (#376)
34+
* Fix shape mismatch issues in the Galore projection for `reverse_std`, `right`, and `full` projection types. (#376)

docs/util.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,10 @@
3232
:docstring:
3333
:members:
3434

35-
::: pytorch_optimizer.optimizer.utils.channel_view
36-
:docstring:
37-
:members:
38-
39-
::: pytorch_optimizer.optimizer.utils.layer_view
40-
:docstring:
41-
:members:
42-
43-
::: pytorch_optimizer.optimizer.utils.cosine_similarity_by_view
44-
:docstring:
45-
:members:
46-
4735
::: pytorch_optimizer.optimizer.utils.clip_grad_norm
4836
:docstring:
4937
:members:
5038

51-
::: pytorch_optimizer.optimizer.utils.projection
52-
:docstring:
53-
:members:
54-
5539
::: pytorch_optimizer.optimizer.utils.unit_norm
5640
:docstring:
5741
:members:
@@ -71,3 +55,7 @@
7155
::: pytorch_optimizer.optimizer.utils.reg_noise
7256
:docstring:
7357
:members:
58+
59+
::: pytorch_optimizer.optimizer.utils.copy_stochastic
60+
:docstring:
61+
:members:

poetry.lock

Lines changed: 50 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pytorch_optimizer"
3-
version = "3.5.1"
3+
version = "3.6.0"
44
description = "optimizer & lr scheduler & objective function collections in PyTorch"
55
license = "Apache-2.0"
66
authors = ["kozistr <[email protected]>"]

pytorch_optimizer/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
from pytorch_optimizer.optimizer.utils import (
169169
CPUOffloadOptimizer,
170170
clip_grad_norm,
171+
copy_stochastic,
171172
disable_running_stats,
172173
enable_running_stats,
173174
get_global_gradient_norm,

pytorch_optimizer/optimizer/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pytorch_optimizer.optimizer.adamax import AdaMax
2222
from pytorch_optimizer.optimizer.adamg import AdamG
2323
from pytorch_optimizer.optimizer.adamod import AdaMod
24-
from pytorch_optimizer.optimizer.adamp import AdamP
24+
from pytorch_optimizer.optimizer.adamp import SGDP, AdamP
2525
from pytorch_optimizer.optimizer.adams import AdamS
2626
from pytorch_optimizer.optimizer.adamw import StableAdamW
2727
from pytorch_optimizer.optimizer.adan import Adan
@@ -91,7 +91,6 @@
9191
)
9292
from pytorch_optimizer.optimizer.scion import SCION, SCIONLight
9393
from pytorch_optimizer.optimizer.sgd import ASGD, SGDW, VSGD, AccSGD, SGDSaI, SignSGD
94-
from pytorch_optimizer.optimizer.sgdp import SGDP
9594
from pytorch_optimizer.optimizer.shampoo import ScalableShampoo, Shampoo
9695
from pytorch_optimizer.optimizer.sm3 import SM3
9796
from pytorch_optimizer.optimizer.soap import SOAP

0 commit comments

Comments
 (0)