Skip to content

Commit

Permalink
Skip loading model if its allready fitted
Browse files Browse the repository at this point in the history
Signed-off-by: Vibhu Jawa <[email protected]>
  • Loading branch information
VibhuJawa committed Aug 5, 2024
1 parent a6f4ac2 commit de6fb38
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions crossfit/backend/torch/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def __next__(self):

batch = {key: val[self.current_idx : end] for key, val in self.tensor_dict.items()}
if self.max_seq_len is not None:
# TODO: Check this
if self.padding_side == "right":
batch = {key: val[:, : self.max_seq_len] for key, val in batch.items()}
else:
Expand Down Expand Up @@ -162,10 +161,6 @@ def __next__(self):
for key, val in self.tensor_dict.items()
if key not in self.to_ignore
}
# TODO: Fix max_length
if self.max_seq_len is None:
self.max_seq_len = self.model.max_seq_length()

batch = clip_tokens(
token_o=batch,
max_length=self.max_seq_len,
Expand Down

0 comments on commit de6fb38

Please sign in to comment.