Merge pull request #58 from OpenAccess-AI-Collective/shards-fix

shard fix
This commit is contained in:
Wing Lian
2023-05-25 16:32:31 -04:00
committed by GitHub

View File

@@ -112,7 +112,7 @@ def load_tokenized_prepared_datasets(
raise Exception("unhandled dataset load")
# support for using a subset of the data
if d.shards:
ds = ds.shuffle(seed=42)["train"].shard(num_shards=cfg.shards, index=0)
ds = ds.shuffle(seed=42)["train"].shard(num_shards=d.shards, index=0)
d_type = d.type
d_type_split = d_type.split(":")
d_base_type = d_type_split[0]