Manajit's picture Protolaw's picture
Archive original USPTO-SynPlanner data and add extraction-retained final dataset (#3)
8f9d356
|
Raw History Blame Contribute Delete
3.34 kB

Datasets and preparation conventions

The code repository tracks acquisition notes, file identities, and import settings. The Hugging Face artifact repository contains these raw data paths:

  • absynth/raw/absynth_full_filtered_classed.csv: the supplied AbSynth export.
  • uspto_mit/raw/molecular_transformer_data.zip: the original archive from MolecularTransformerData.
  • uspto_synplan/: uspto_synplan_old archives the original 973,640 reactions and historical metadata; uspto_synplan_final contains 851,479 source reactions retained after SynPlanner extraction filtering and template popularity ≥3. See its README for selection details and counts.

artifacts.json records sizes, SHA-256 hashes, and known acquisition sources. uspto_mit supports existing Chemformer pickles. The historical uspto_synplanner and absynth import recipes still need source-specific validation. No downloads happen implicitly. The raw data remains ignored in the code repository.

Place inputs under <dataset>/raw/ and generated files under <dataset>/prepared/. Both are ignored. Pass source/destination paths explicitly to the CLI.

dataset.yaml has an import mapping with:

Setting Meaning
input_mode reactants (ignore reagents) or separated (preserve them)
reaction_column Column containing reactants>reagents>products or reactants>>products
reactant_column, product_column Supply both to use separate columns
reagent_column Required for separated mode with separate SMILES columns
split_column Existing train/validation/test labels; defaults to set
default_split Explicit assignment if the split column is absent; otherwise null
id_column Optional source identifier retained in the row map
separator Input delimiter for text tables
remove_atom_maps Defaults to true

RDKit-molecule pickles are recognized through reactants_mol and products_mol. Separated mode also requires reagents_mol. Blank reagents are valid; unparsable nonempty reagents are rejected. No fallback changes the selected input mode.

Preparation normalizes validation aliases (valid, validation) to val and preserves supplied membership. Invalid splits are rejected. Training data without splits must be assigned explicitly; this refactor does not invent or silently randomize dataset splits. For custom evaluation only, predict defaults missing splits to test and predicts all supplied valid rows.

The prepared pickle contains reactants_mol, products_mol, set, and optionally reagents_mol. Sidecar .rows.csv maps every original positional row to a prepared row or rejection reason, preserving optional source IDs. .report.json stores the source SHA-256, import settings, and split/rejection counts. Keep these sidecars with their associated predictions.

Before claiming a new dataset is supported, document its source/release/usage terms, inspect representative exports, configure columns, preserve its published splits, and validate input-mode semantics. The small original capivasertib reaction list is retained under examples/; its generated predictions are not tracked.