Skip to content

Commit 0ea49e4

Browse files
reverting act off
1 parent 409d3af commit 0ea49e4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

torchtune/training/_activation_offloading.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,9 @@ def get_num_bytes_tensor(x: torch.Tensor) -> int:
133133
def pack_tensor(activation: torch.Tensor) -> int:
134134
# activations are passed in during forward pass - from here we take over and return a unique id
135135
if self.is_first_forward_call:
136-
if len(self.tracker) == 0:
137-
raise AssertionError(
138-
"backward pass should have cleared tracker of all tensors"
139-
)
136+
assert (
137+
len(self.tracker) == 0
138+
), "backward pass should have cleared tracker of all tensors"
140139

141140
# set training phase trackers
142141
self.is_first_forward_call = False

0 commit comments

Comments
 (0)