Skip to content

Commit 6397d56

Browse files
authored
Merge pull request #368 from kozistr/release/v3.5.0
[Release] v3.5.0
2 parents e2f356e + 02320fa commit 6397d56

File tree

7 files changed

+179
-75
lines changed

7 files changed

+179
-75
lines changed

docs/changelogs/v3.5.0.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [Improving Training Stability for Large Language Model Pretraining](https://arxiv.org/abs/2502.11034)
1010
* Implement `Simplified-Ademamix` optimizer. (#364, #366)
1111
* [Connections between Schedule-Free Optimizers, AdEMAMix, and Accelerated SGD Variants](https://arxiv.org/abs/2502.02431)
12+
* Support `Ackley` function for testing optimization algorithms.
1213

1314
### Update
1415

poetry.lock

+147-45
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

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

pytorch_optimizer/optimizer/lomo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(
4141
self.clip_grad_norm = clip_grad_norm
4242
self.clip_grad_value = clip_grad_value
4343

44-
self.local_rank: int = int(os.environ.get('LOCAL_RANK', 0))
44+
self.local_rank: int = int(os.environ.get('LOCAL_RANK', '0'))
4545

4646
self.gather_norm: bool = False
4747
self.grad_norms: List[torch.Tensor] = []
@@ -256,7 +256,7 @@ def __init__(
256256
self.grad_norms: List[torch.Tensor] = []
257257
self.clip_coef: Optional[float] = None
258258

259-
self.local_rank: int = int(os.environ.get('LOCAL_RANK', 0))
259+
self.local_rank: int = int(os.environ.get('LOCAL_RANK', '0'))
260260
self.zero3_enabled: bool = is_deepspeed_zero3_enabled()
261261

262262
self.grad_func: Callable[[Any], Any] = self.fuse_update_zero3() if self.zero3_enabled else self.fuse_update()

pytorch_optimizer/optimizer/muon.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def __init__(
7373
adamw_params = self.get_parameters(adamw_params) if adamw_params is not None else []
7474
params.extend(adamw_params)
7575

76-
self.world_size: int = int(os.environ.get('WORLD_SIZE', 1))
77-
self.rank: int = int(os.environ.get('RANK', 0))
76+
self.world_size: int = int(os.environ.get('WORLD_SIZE', '1'))
77+
self.rank: int = int(os.environ.get('RANK', '0'))
7878

7979
defaults: DEFAULTS = {
8080
'lr': lr,

requirements-dev.txt

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
--extra-index-url https://download.pytorch.org/whl/cpu
22

3-
black==24.8.0 ; python_version < "3.9" and python_version >= "3.8"
3+
black==24.8.0 ; python_version == "3.8"
44
black==25.1.0 ; python_version >= "3.9"
55
click==8.1.8 ; python_version >= "3.8"
66
colorama==0.4.6 ; python_version >= "3.8" and (sys_platform == "win32" or platform_system == "Windows")
7-
coverage[toml]==7.6.1 ; python_version >= "3.8"
7+
coverage[toml]==7.6.1 ; python_version == "3.8"
8+
coverage[toml]==7.6.12 ; python_version >= "3.9"
89
exceptiongroup==1.2.2 ; python_version < "3.11" and python_version >= "3.8"
9-
filelock==3.16.1 ; python_version >= "3.8" and python_version < "3.9"
10-
filelock==3.17.0 ; python_version >= "3.9"
11-
fsspec==2025.2.0 ; python_version >= "3.8"
10+
filelock==3.16.1 ; python_version == "3.8"
11+
filelock==3.18.0 ; python_version >= "3.9"
12+
fsspec==2025.3.0 ; python_version >= "3.8"
1213
iniconfig==2.0.0 ; python_version >= "3.8"
13-
isort==5.13.2 ; python_version < "3.9" and python_version >= "3.8"
14+
isort==5.13.2 ; python_version == "3.8"
1415
isort==6.0.1 ; python_version >= "3.9"
15-
jinja2==3.1.5 ; python_version >= "3.8"
16-
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "3.9"
16+
jinja2==3.1.6 ; python_version >= "3.8"
17+
markupsafe==2.1.5 ; python_version == "3.8"
1718
markupsafe==3.0.2 ; python_version >= "3.9"
1819
mpmath==1.3.0 ; python_version >= "3.8"
1920
mypy-extensions==1.0.0 ; python_version >= "3.8"
20-
networkx==3.1 ; python_version >= "3.8" and python_version < "3.9"
21+
networkx==3.1 ; python_version == "3.8"
2122
networkx==3.2.1 ; python_version >= "3.9"
22-
numpy==1.24.4 ; python_version < "3.9" and python_version >= "3.8"
23+
numpy==1.24.4 ; python_version == "3.8"
2324
numpy==2.0.2 ; python_version >= "3.9"
2425
packaging==24.2 ; python_version >= "3.8"
2526
pathspec==0.12.1 ; python_version >= "3.8"
2627
platformdirs==4.3.6 ; python_version >= "3.8"
2728
pluggy==1.5.0 ; python_version >= "3.8"
2829
pytest-cov==5.0.0 ; python_version >= "3.8"
29-
pytest==8.3.4 ; python_version >= "3.8"
30-
ruff==0.9.9 ; python_version >= "3.8"
31-
setuptools==75.8.2 ; python_version >= "3.12"
30+
pytest==8.3.5 ; python_version >= "3.8"
31+
ruff==0.11.0 ; python_version >= "3.8"
32+
setuptools==76.0.0 ; python_version >= "3.12"
3233
sympy==1.13.1 ; python_version >= "3.9"
33-
sympy==1.13.3 ; python_version < "3.9" and python_version >= "3.8"
34+
sympy==1.13.3 ; python_version == "3.8"
3435
tomli==2.2.1 ; python_full_version <= "3.11.0a6" and python_version >= "3.8"
35-
torch==2.4.1+cpu ; python_version < "3.9" and python_version >= "3.8"
36+
torch==2.4.1+cpu ; python_version == "3.8"
3637
torch==2.6.0+cpu ; python_version >= "3.9"
3738
typing-extensions==4.12.2 ; python_version >= "3.8"

requirements.txt

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
--extra-index-url https://download.pytorch.org/whl/cpu
22

3-
filelock==3.16.1 ; python_version >= "3.8" and python_version < "3.9"
4-
filelock==3.17.0 ; python_version >= "3.9"
5-
fsspec==2025.2.0 ; python_version >= "3.8"
6-
jinja2==3.1.5 ; python_version >= "3.8"
7-
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "3.9"
3+
filelock==3.16.1 ; python_version == "3.8"
4+
filelock==3.18.0 ; python_version >= "3.9"
5+
fsspec==2025.3.0 ; python_version >= "3.8"
6+
jinja2==3.1.6 ; python_version >= "3.8"
7+
markupsafe==2.1.5 ; python_version == "3.8"
88
markupsafe==3.0.2 ; python_version >= "3.9"
99
mpmath==1.3.0 ; python_version >= "3.8"
10-
networkx==3.1 ; python_version >= "3.8" and python_version < "3.9"
10+
networkx==3.1 ; python_version == "3.8"
1111
networkx==3.2.1 ; python_version >= "3.9"
12-
numpy==1.24.4 ; python_version < "3.9" and python_version >= "3.8"
12+
numpy==1.24.4 ; python_version == "3.8"
1313
numpy==2.0.2 ; python_version >= "3.9"
14-
setuptools==75.8.2 ; python_version >= "3.12"
14+
setuptools==76.0.0 ; python_version >= "3.12"
1515
sympy==1.13.1 ; python_version >= "3.9"
16-
sympy==1.13.3 ; python_version < "3.9" and python_version >= "3.8"
17-
torch==2.4.1+cpu ; python_version < "3.9" and python_version >= "3.8"
16+
sympy==1.13.3 ; python_version == "3.8"
17+
torch==2.4.1+cpu ; python_version == "3.8"
1818
torch==2.6.0+cpu ; python_version >= "3.9"
1919
typing-extensions==4.12.2 ; python_version >= "3.8"

0 commit comments

Comments
 (0)