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

Fix typo #808

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/data_prep/convert_dataset_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def build_hf_dataset(
else:
if not isinstance(tokenizer, PreTrainedTokenizerBase):
raise ValueError(
f'{tokenizer=} must be of type PreTrainedTokenizerBase')
f'{tokenizer} must be of type PreTrainedTokenizerBase')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a typo, python format strings have some nice functionality :)

In [2]: f'{a=} blah'
Out[2]: 'a=1 blah'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, sorry I didn't know about that trick haha! One of my byod tests failed here, that's how I noticed it. Will close it.

if max_length is None:
raise ValueError(f'max_length must be set.')
if bos_text + eos_text == '':
Expand Down
Loading