Skip to content

Commit e7bc96e

Browse files
authored
Fix version issues for MCore container (#40)
* Fix version issues for MCore container Signed-off-by: Boxiang Wang <[email protected]> * Fix lint Signed-off-by: Boxiang Wang <[email protected]> * Update readme Signed-off-by: Boxiang Wang <[email protected]> --------- Signed-off-by: Boxiang Wang <[email protected]>
1 parent beacaab commit e7bc96e

File tree

5 files changed

+368
-74
lines changed

5 files changed

+368
-74
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Emerging Optimizers is a research project focused on understanding and optimizin
1111

1212
### Prerequisites
1313

14-
- Python 3.12 or higher
14+
- Python 3.10 or higher, 3.12 is recommended
1515
- PyTorch 2.0 or higher
1616

1717
### Install from Source

emerging_optimizers/orthogonalized_optimizers/orthogonalized_optimizer.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
from typing import Any, Callable, override
15+
from typing import Any, Callable
16+
17+
18+
# TODO(@boxiangw): remove this once bump to python 3.12
19+
try:
20+
from typing import override
21+
except ImportError:
22+
from typing_extensions import override
1623

1724
import torch
1825
import torch.optim as optim

emerging_optimizers/soap/soap.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
from itertools import chain
16-
from typing import Callable, Iterable, List, Optional, Tuple, Union, override
16+
from typing import Callable, Iterable, List, Optional, Tuple, Union
17+
18+
19+
# TODO(@boxiangw): remove this once bump to python 3.12
20+
try:
21+
from typing import override
22+
except ImportError:
23+
from typing_extensions import override
1724

1825
import torch
1926
import torch.optim as optim

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dynamic = [
2020
]
2121
description = "A research project for emerging optimizers other than AdamW"
2222
license = {file = "LICENSE"}
23-
requires-python = ">=3.12"
23+
requires-python = ">=3.10"
2424
authors = [{ name = "NVIDIA", email = "[email protected]" }]
2525
maintainers = [{ name = "NVIDIA", email = "[email protected]" }]
2626
keywords = [
@@ -57,7 +57,7 @@ classifiers = [
5757
dependencies = [
5858
"torch",
5959
"absl-py",
60-
"megatron-core>=0.14.0a0,<0.16.0",
60+
"typing-extensions",
6161
]
6262

6363
[build-system]

0 commit comments

Comments
 (0)