Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed a duplicate line #3477

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

removed a duplicate line #3477

wants to merge 1 commit into from

Conversation

gpgg
Copy link

@gpgg gpgg commented Aug 14, 2024

Why are these changes needed?

In the fastchat/train/train.py file, I found a repeated assignment of the tokenizer in the LazySupervisedDataset class.

class LazySupervisedDataset(Dataset):
    """Dataset for supervised fine-tuning."""

    def __init__(self, raw_data, tokenizer: transformers.PreTrainedTokenizer):
        super(LazySupervisedDataset, self).__init__()
        self.tokenizer = tokenizer # <<------- this is a duplicate line.

        rank0_print("Formatting inputs...Skip in lazy mode")
        self.tokenizer = tokenizer 
        self.raw_data = raw_data
        self.cached_data_dict = {}

Therefore, I removed the duplicate line.

Related issue number (if applicable)

Checks

  • I've run format.sh to lint the changes in this PR.
  • I've included any doc changes needed.
  • I've made sure the relevant tests are passing (if applicable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant