mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
Merge commit 'b386960d78' into add-gym-frozen-lake-example
This commit is contained in:
commit
1fe7deae47
1 changed files with 6 additions and 6 deletions
|
|
@ -34,12 +34,12 @@ def grab_exact_from_heterogeneous_queue(
|
|||
max_group_size = 0
|
||||
|
||||
for item in queue:
|
||||
l = len(item["tokens"])
|
||||
lengths.append(l)
|
||||
group_sizes.append(l)
|
||||
total_tokens += l
|
||||
if l > max_group_size:
|
||||
max_group_size = l
|
||||
length = len(item["tokens"])
|
||||
lengths.append(length)
|
||||
group_sizes.append(length)
|
||||
total_tokens += length
|
||||
if length > max_group_size:
|
||||
max_group_size = length
|
||||
|
||||
if total_tokens < batch_size:
|
||||
return None, queue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue