Skip to content

Commit

Permalink
pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
a.khokhulin committed Nov 23, 2024
1 parent 82fb838 commit 32b5c16
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions turbo_alignment/dataset/chat/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from itertools import accumulate
from pathlib import Path
from typing import Any, overload
from typing_extensions import Self

import numpy as np
import numpy.typing as npt
import torch
from transformers import PreTrainedTokenizerBase
from typing_extensions import Self

from turbo_alignment.common.data.io import read_jsonl
from turbo_alignment.common.logging import get_project_logger
Expand Down Expand Up @@ -375,8 +375,7 @@ def get_slice(self, start: int, end: int) -> Self:
new_instance.records = self.records[start:end]

new_instance.original_records_map = {
record['id']: self.get_original_record_by_id(record['id'])
for record in new_instance.records
record['id']: self.get_original_record_by_id(record['id']) for record in new_instance.records
}

return new_instance

0 comments on commit 32b5c16

Please sign in to comment.