create bucket if it doesn't exist

This commit is contained in:
Damian Stewart 2023-06-14 09:30:23 +02:00
parent bd89ad96d2
commit 8885d58efd
1 changed files with 2 additions and 0 deletions

View File

@ -125,6 +125,8 @@ class DataLoaderMultiAspect():
runts = bucket[-runt_count:]
del bucket[-runt_count:]
matching_default_bucket_key = (DEFAULT_BATCH_ID, key[1], key[2])
if matching_default_bucket_key not in buckets:
buckets[matching_default_bucket_key] = []
buckets[matching_default_bucket_key].extend(runts)
# handle remaining runts by randomly duplicating items