Correctly specify columns for dclm and default

#15
by Payoto - opened

The columns of DCLM are a superset of the columns of the other samples so need to be made the default.

After this change the dataset can be loaded with all it's splits - test script below:

olmo_stream_dict = {}
for split in ["default", "arxiv", "dclm", "starcoder", "wiki", "pes2o", "open-web-math", "algebraic-stack"]:
    print(f"Loading split {split}...")
    if split not in olmo_stream_dict:
        olmo_stream_dict[split] = load_dataset(
            "allenai/olmo-mix-1124",
            split="train",
            name=split,
            verification_mode="no_checks",
            streaming=True,
        )
    print(f"Loaded {olmo_stream_dict[split].num_shards} items in split {split}")

    try:
        for item in olmo_stream_dict[split]:
            print(list(item.keys()))
            break
    except Exception as e:
        print(f"Error iterating over split {split}: {e}")
    try:
        for item in olmo_stream_dict[split].shuffle(seed=42):
            # This usually lands in dcml in default split - would error out
            print("succesfully iterated shuffled split")
            break
    except Exception as e:
        print(f"Error iterating over shuffled split {split}: {e}")
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment