The unlabeled shard that loses its rows
A molecular dataset inspector reports no samples when a shard has features and identifiers but no labels.
What’s going wrong
ML practice for DeepChem. This is an original teaching adaptation of documented DeepChem behavior, not execution of the upstream package.
An inspector counts dataset rows from labels. That works for supervised examples, but unlabeled molecule data still has rows and identifiers. A downstream split planner now believes these shards are empty. Repair shard_sizes.
Input is {"shards":[{"ids":["m1","m2"],"y":null}, ...]}. There are 0 to 20 shards and at most 100 identifiers per shard. Every identifier is a string of at most 64 characters; empty or repeated identifiers are valid and still denote separate rows. Each y is null or [] when labels are absent, or a numeric array with exactly one value per identifier when labels are present. Shards may mix labeled and unlabeled data. Empty shards are valid.
Print {"sizes":[...],"total":N}. sizes contains the number of rows in each shard in input order, including zero for an empty shard; total is their sum. A row exists independently of whether a label is present. Do not filter, deduplicate, or otherwise change the input records.
Expected behavior
Count all rows using each shard’s required identifiers, preserving shard order and counting unlabeled and duplicate-identifier rows.
Reproduction
{"shards":[{"ids":["m1","m2","m3"],"y":null}]}{"sizes":[3],"total":3}{"shards":[{"ids":["a","b"],"y":[0,1]}]}{"sizes":[2],"total":2}{"shards":[{"ids":["a"],"y":[1]},{"ids":["b","c"],"y":[]},{"ids":[],"y":null}]}{"sizes":[1,2,0],"total":3}Before you begin
- Lists
- Optional data
- Dataset row identity
Need a nudge?
Reveal one investigation hint at a time. Try each clue before opening the next.
Read the report, then sign in to start your investigation.