evals with generation

This commit is contained in:
Xi Yan 2024-10-24 11:30:13 -07:00
parent 071dba8871
commit 737fcb795f
15 changed files with 385 additions and 15 deletions

View file

@ -143,11 +143,12 @@ class MetaReferenceDatasetIOImpl(DatasetIO, DatasetsProtocolPrivate):
else:
next_page_token = int(page_token)
if rows_in_page == -1:
rows = dataset_info.dataset_impl[next_page_token:]
start = next_page_token
end = min(start + rows_in_page, len(dataset_info.dataset_impl))
if rows_in_page == -1:
end = len(dataset_info.dataset_impl)
else:
end = min(start + rows_in_page, len(dataset_info.dataset_impl))
rows = dataset_info.dataset_impl[start:end]
return PaginatedRowsResult(