Skip to content

Commit

Permalink
[Fix] Use no media iterator (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcz358 authored Dec 30, 2024
1 parent 0f5a010 commit e2c36ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmms_eval/api/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def build_all_requests(
if cache_requests and (not cached_instances or rewrite_requests_cache) and limit is not None:
limit = None

doc_id_docs = self.doc_iterator(rank=rank, limit=limit, world_size=world_size)
doc_id_docs = utils.create_iterator(enumerate(self.eval_docs_no_media), rank=rank, limit=int(limit) if limit else None, world_size=world_size)
doc_iterator_for_counting = itertools.islice(range(len(self.test_docs())), rank, limit, world_size) if self.has_test_docs() else itertools.islice(range(len(self.validation_docs())), rank, limit, world_size)

num_docs = sum(1 for _ in doc_iterator_for_counting)
Expand Down

0 comments on commit e2c36ea

Please sign in to comment.