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 and improvements rejection sampling generation #335

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vwxyzjn
Copy link
Collaborator

@vwxyzjn vwxyzjn commented Sep 6, 2024

No description provided.

Comment on lines -149 to +154
ds = load_dataset(dataset_args.dataset_name)
ds = load_dataset(dataset_args.dataset_name, split=dataset_args.split)
if dataset_args.sanity_check:
for key in ds:
ds[key] = ds[key].select(range(min(dataset_args.sanity_check_size, len(ds[key]))))
ds = ds.select(range(min(dataset_args.sanity_check_size, len(ds))))
if dataset_args.dataset_end_idx is None:
dataset_args.dataset_end_idx = len(ds[dataset_args.dataset_train_split])
for key in ds:
ds[key] = ds[key].select(range(dataset_args.dataset_start_idx, dataset_args.dataset_end_idx))
dataset_args.dataset_end_idx = len(ds)
ds = ds.select(range(dataset_args.dataset_start_idx, dataset_args.dataset_end_idx))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are only using ds[dataset_args.dataset_train_split]["prompt"] anyway. Might as well just select the proper split

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