Skip to content

Commit 92f56b4

Browse files
committed
makes sure latest version and added tests
1 parent 32705bd commit 92f56b4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

kaggle_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ torchao
130130
torchinfo
131131
torchmetrics
132132
torchtune
133+
transformers>=4.51.0
133134
triton
134135
tsfresh
135136
vtk

tests/test_transformers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import unittest
22

33
import torch
4-
from transformers import AdamW
4+
import torch.optim as optim
55
import transformers.pipelines # verify this import works
66

77

@@ -16,7 +16,7 @@ def test_adam_w(self):
1616
target = torch.tensor([0.4, 0.2, -0.5])
1717
criterion = torch.nn.MSELoss()
1818
# No warmup, constant schedule, no gradient clipping
19-
optimizer = AdamW(params=[w], lr=2e-1, weight_decay=0.0)
19+
optimizer = optim.AdamW(params=[w], lr=2e-1, weight_decay=0.0)
2020
for _ in range(100):
2121
loss = criterion(w, target)
2222
loss.backward()

0 commit comments

Comments
 (0)