← Back

πŸ“‘ Contents

Cached notebook CSV writers β€” v6 hidden-output auditFindings that matter for v6Provenance / execution evidenceP β€” prvsiyan: wider-window fallback, then one `CCO`; sample IDs own the fileH β€” haideptry: global-library fallback; strict sample order and exact-25 gatesO β€” octaviograu: runtime IDs and semantic pre-write validation; bounded nearest fallbackD β€” dmitriigluzdov: runtime writer, but early sample/instrument constraintsB β€” private Bob V7 comparator: CCO padding is downstream of an unguarded empty poolAudit conclusion

Cached notebook CSV writers β€” v6 hidden-output audit


Scope (2026-09-25): static inspection of the five requested local notebook snapshots and their existing metadata. No network, notebook execution, training, submission, or production edits. Citations are zero-based cell / one-based source line, e.g. P C027:L071. For Bob's embedded ZIP, B C001:L001 β†’ member:Lnnn denotes a string literal decoded in memory only, not extracted or executed.


Findings that matter for v6


  • The supplied v6 logic has a genuine empty-list serialization path: no Β±10-ppm pool candidates β†’ baseline_ids=[]; the spectral gate <0.15 keeps only those baseline IDs; dedup cannot create a candidate; if hybrid_smiles: hybrid_smiles.extend([hybrid_smiles[0]](25-len(hybrid_smiles))) skips padding when empty; joining [] writes ''. Its sample-ID/nonblank/exact-25 assertions run after writing. This is a static failure mechanism, not proof of which hidden row or condition caused rejection.
  • Public examples differ: prvsiyan uses a wider window then one CCO; haideptry uses global library SMILES; octaviograu and dmitriigluzdov use nearest-mass candidates and validate before writing. These are distinct coverage/format policies, not evidence that any fallback ranks well.
  • Sample alignment is not runtime coverage. P and B left-join onto sample IDs and can silently discard test-only IDs; H and D instead have sample-dependent assertions that can abort. O validates against IDs built from the current test. This is a conditional hidden-data hazard if sample and replacement-test IDs diverge; this review does not establish that Kaggle actually leaves the sample unchanged.
  • Per the active audit's stored official scorer contract, 1–25 predictions and repeats are permitted. H/B exact-25 assertions, O's no-repeats assertion, and v6's exact-25 assertion are additional local policies. These sources do not prove an official exact-25 requirement.
  • B is private local comparator code, not a fifth public example. Its final CCO padding does not make its no-hit path safe: static inspection finds an earlier np.stack([]) failure.

  • Version boundary: v6 above is the behavior supplied in the assignment. Current main.py is v7 with added pre-write ID/adduct guards; it was not treated as exact v6 or used as the source of v6 claims here.


    Provenance / execution evidence


    URLs below are derived from each sibling kernel-metadata.json:L002 (id), not live-verified. Public metadata has is_private: false; B has is_private: true (L007). No exact remote version is established by these metadata; public id_no values are kernel IDs, not version IDs.


    AliasSnapshot relative to repository rootCells / code cells
    Presearch/reviews/analog-propagation-20260922-1902/raw/analog-propagation-casmi-2026-baseline.ipynb37 / 17
    Hresearch/baselines/haideptry/enveda-casmi-2026-fast-spectral-cosine-baseline.ipynb21 / 10
    Oresearch/baselines/octaviograu/enveda-molecule-evidence-ranking.ipynb16 / 8
    Dresearch/baselines/dmitriigluzdov/casmi-26-eda-search-model.ipynb85 / 25
    Bkaggle-kernel/bob-v7-baseline/bob-v7-baseline.ipynb3 / 1

  • P β€” https://www.kaggle.com/code/prvsiyan/analog-propagation-casmi-2026-baseline
  • SHA-256 3ce550ab18441573ee519a4e1df88ae03090e00e424c16671e02bc6b76214a9e

  • H β€” https://www.kaggle.com/code/haideptry/enveda-casmi-2026-fast-spectral-cosine-baseline
  • SHA-256 1b9859f924eb722f837b0b95566ac6abf12c4274107fe85ba2557c0fa0242de8

  • O β€” https://www.kaggle.com/code/octaviograu/enveda-molecule-evidence-ranking
  • SHA-256 bf984f96925f5b7c83e19b41005299a3f9c41fb026bc588cf935a5709c623f32

  • D β€” https://www.kaggle.com/code/dmitriigluzdov/casmi-26-eda-search-model
  • SHA-256 1bdaa79766fe602ec52fa14c3680824dc27a4cb25dbcec82e5c7134cc4c58dd9

  • B β€” https://www.kaggle.com/code/jamesl8/enveda-casmi26-bob-v7-baseline
  • SHA-256 05b706bf00ffc4b0e35987a30cddcbeb2a0dd49663649bac7b56c1f859929542


    All five snapshots: every code cell has execution_count: null; zero saved outputs, including zero saved exceptions. H/O/D companion .outputs.txt files are each 0 bytes. Thus neither printed [SUCCESS] statements in source nor notebook narrative establish execution, an accepted submission, or any score. Actual remote run/submission status is unknown.


    P β€” prvsiyan: wider-window fallback, then one CCO; sample IDs own the file


  • Runtime grouping: te = pq.read_table(TEST).to_pandas(); mols = list(te.groupby('molecule_id')) (C027:L010–012). Each group's finite neutral masses are median-fused, and all its spectra enter evidence (C027:L024–032: target = float(np.median(nms)), specs = [(r.ms2_mzs, r.ms2_normalized_intensities) for r in sub.itertuples()]). Unknown adducts leave neutral mass NaN (C007:L056–061: out=np.full(len(mz), np.nan)); an all-nonfinite group bypasses ranking.
  • Pool/no-hit: COCONUT plus runtime training structures (C010:L048–088); mass window uses searchsorted (C010:L041–044). PPM_WIN = 10.0, PPM_FALLBACK = 30.0 (C002:L007,L016). If the 10-ppm window is empty, retry 30 ppm (C027:L034–037); if still empty, or no finite query masses, if not smis: smis = ['CCO'] (L071). Optional PubChem expansion is inside the nonempty-pool branch (L037,L052), so it does not rescue a wholly empty local pool.
  • Serialization/width: TOPN = 25 (C002:L095); rows.append((mid, ';'.join(smis[:CFG.TOPN]))) (C027:L072). No exact-25 padding: fallback has one token and other rows can have fewer than 25.
  • Null/blank/ID weakness: samp'molecule_id'.merge(submission, on='molecule_id', how='left'), then fillna('CCO') (C027:L075–078). This fills missing values, not existing empty strings; a nonempty candidate list containing blank strings does not trigger if not smis. Training entries have dropna() (C010:L071–072), but final SMILES receive no chemistry/blank-token validation or scorer-identity dedup. The checks cover sample row count, duplicate IDs, null SMILES and maximum split count ≀25, then submission.to_csv('submission.csv', index=False) (C027:L080–084). An empty string splits to one token and is not null, so these checks alone do not exclude it. Sample-only IDs can become CCO rows while runtime-only IDs disappear; the assertions do not compare against te IDs.

  • H β€” haideptry: global-library fallback; strict sample order and exact-25 gates


  • Runtime grouping: The loop groups with te.groupby('molecule_id') (C016:L053). Each spectrum is processed; empty spectra and nonfinite neutral masses are skipped (L058–063). Evidence aggregates across spectra (C014:L031–048); COCONUT retrieval uses the median of surviving masses (C016:L087–095). IDs initially come from runtime groups, not a sample join.
  • Pool/no-hit: library and COCONUT windows are Β±0.01 Da, not v6's Β±10 ppm (C004:L001; C014:L001–004; C010:L019–023). Missing/no-hit COCONUT returns [], []. Ranked tiers are strong library hits β†’ COCONUT β†’ weak hits β†’ global fallback (C016:L021–043): for fb in list(best_smi.values())[:top_n]: followed by out.append(fb). Thus even a molecule with no usable spectral/mass evidence can get global library strings. This is not a nearest-mass or CCO policy.
  • Empty/NaN handling: ordinary push ignores falsey keys/SMILES (C016:L003–007); library mapping uses if k and s (C008:L024–028), and COCONUT uses dropna(subset=['mass', 'clean_smiles', 'inchikey14']) (L075). No final chemistry check, whitespace/string-nan rejection, or scorer-tautomer dedup is present. Tier dedup uses supplied keys, while global fallback uses string membership. Fewer than 25 available distinct fallback strings can leave a short list; there is no padding/fillna repair at serialization.
  • Output/hazards: TOPN = 25 (C004:L006), ';'.join(smis[:TOPN]) (C016:L096). Before to_csv('submission.csv', index=False) (C020:L012), assertions require sample length, elementwise sample ID order, no nulls/duplicate IDs, and exactly 25 split tokens (L003–010). Default sorted groupby order need not equal sample order even when ID sets match. A valid 1–24-candidate row under the supplied official contract would fail this notebook's stronger local width check.

  • O β€” octaviograu: runtime IDs and semantic pre-write validation; bounded nearest fallback


  • Runtime grouping: every runtime row is appended to test_queries.setdefault(str(row.molecule_id), []) (C008:L117–121). All spectra survive into each molecule's ranking input. Candidate masses use the union of per-spectrum windows, not a median (C010:L063–065; C004:L123–129). Per-spectrum evidence is combined as 0.5 np.max(scores, axis=0) + 0.5 np.mean(scores, axis=0) (C006:L121–126). No sample-submission join or ID dependency appears in this path.
  • Pool/no-hit: train plus external candidates are first selected against all query masses, chemically canonicalized, filtered and deduped by canonical key (C008:L052–067). Tolerance is max(0.008 Da, 20 ppm) (C002:L032–033; C004:L053–054). A molecule's empty local pool falls back to nearest masses from this already globally prefiltered candidate table: pool = eligible.iloc[np.argsort(distance, kind='stable')[:25]].copy(); pool['fallback'] = True (C010:L069–075). No CCO and no repeated padding. If that global table is also empty, there is no explicit final placeholder branch; ranking returns an empty results frame and downstream sorting lacks its expected columns (C010:L080–112; C012:L096). The fallback is therefore not an unconditional completion guarantee.
  • Fail-fast / blank handling: unsupported adducts raise (C004:L031–043); query_masses rejects nonfinite/nonpositive values (L116–120). Candidate identities go through Chem.MolFromSmiles(str(smiles)), tautomer canonicalization and a 14-character key check (L057–067); missing candidate identities/SMILES are dropped (C008:L058–066). It does not rely on fillna to fabricate output guesses.
  • Writer: ';'.join(scores.smiles.head(25)) (C012:L097); before submission.to_csv(output_dir / 'submission.csv', index=False) (L103), validate_submission(submission, ranker.data['test']) (L102) checks columns, nulls, unique IDs, exact runtime ID set, 1–25 tokens, valid chemical identities and no repeated canonical keys (L069–085). Empty/invalid tokens go through chemical identity validation rather than passing on split count alone. The no-repeats rule is stricter than the supplied official scorer, not a required template to copy. String-coercing IDs also lacks a separate raw-ID null/collision guard.

  • D β€” dmitriigluzdov: runtime writer, but early sample/instrument constraints


  • IDs/grouping: test and sample are read, then assert set(test["molecule_id"]) == set(sample["molecule_id"]) (C017:L010–015). Without CASMI_VALIDATION_MANIFEST, it also asserts every test instrument is timsTOF (L016–017). Later IDs are cast to strings (C080:L064), grouping is queries.groupby("molecule_id",sort=False) (L051–060), and multiple spectra contribute through best-reference/top-two/mean aggregation (L054–057). These are runtime predictions, but sample mismatch or a mixed-instrument hidden set can abort earlier.
  • Pool/no-hit: initial library search uses max(0.01 Da, 20 ppm) (C076:L023–024; C080:L019–026). A no-hit group's predictions can be [] (C080:L054–061). The later structural fallback searches up to 1,200 rows on either side of a median-mass insertion point in the mass-sorted training structure DB, sorts by mass error/NP status, and retains up to 25 canonical identities (C082:L016–036). It is not limited to the initial ppm window. Low confidence <0.50 changes protected search and mass-first slots (L037–047), unlike v6's baseline-only <0.15 branch.
  • Empty/NaN handling: scored_key explicitly rejects empty text and literal "nan", invalid RDKit parses, and exceptions (C082:L005–015); source DB rows are dropna() (L016). Combined candidates are deduped by tautomer-canonical InChIKey14 (L042–049). No CCO or padding: if both routes yield nothing, the final nonblank assertion stops the write. However, target=float(np.median([row_neutral_mass(r) for r in group.to_dict("records")])) is not finite-filtered or guarded (L023); a NaN target makes nearest-mass ranking unreliable rather than invoking a documented fallback/abort policy.
  • Output: ids=test["molecule_id"].drop_duplicates().tolist() and ";".join(predictions[mid][:TOP_K]) (C082:L050–051; TOP_K=25, C076:L029). Pre-write checks require schema/unique IDs, string length >0 and split count ≀25 (C082:L052–053); submission.to_csv(OUTPUT_DIR/"submission.csv",index=False) follows (L054). Width 1–25 is permitted; no sample reindex occurs at the final writer. The Β±1,200 cap is a candidate search cap, not a fixed test-row count.

  • B β€” private Bob V7 comparator: CCO padding is downstream of an unguarded empty pool


  • Grouping: test.sort_values("base_peak_intensity", ascending=False).drop_duplicates("molecule_id") chooses one strongest-intensity acquisition per molecule, not multi-spectrum fusion (C001:L077–080). Candidate features receive that runtime molecule_id (L083–092). This may select an unusable/adduct-unresolved representative even when another acquisition is usable.
  • No-hit before writer β€” static failure chain: embedded src/config.py:L038–039 sets 10/30 ppm; src/candidates.py:L083–092 retries 30 ppm but still returns empty indices if none hit. Embedded src/inference.py:L025–026,L058–059 then calls unpack_fp_bytes([]) because the caller supplies a non-None pool_fp_map (C001:L038,L088). Embedded src/analog.py:L085–093 builds mats=[] and calls np.stack(mats) with no empty guard. This implies a ValueError before the CSV's CCO fallback is reached; it was not executed here. Unsupported adduct/nonfinite precursor returns NaN in embedded src/adduct.py:L054–060, likewise permitting an empty mass-window path.
  • Final fallback if reached: top 25 candidate keys per query (C001:L102–105) map missing SMILES keys to "CCO". key2smiles retains only string values, but includes empty or literal "nan" strings (L039). The sample-ID left join followed by fillna("CCO") (L109–112) repairs null/missing rows, not runtime ID coverage. pad25 discards empty/whitespace-only tokens and appends CCO to 25: tokens = [t for t in str(s).split(';') if t.strip()]; tokens += ["CCO"] * (25 - len(tokens)) (L114–120). Literal "nan" and malformed nonempty SMILES are not chemically checked; repeated guesses are retained.
  • Writer/hazards: sample length/order, unique IDs, non-null strings and exact-25 counts are asserted before sub.to_csv(out_file, index=False) (C001:L123–131). The comment promising β€œall 400 test molecules” (L108) is not a literal 400-row allocation/assertion: executable shape follows the sample. It still silently loses test-only IDs under a mismatched sample, as P does. β€œFormat-Safe” is a metadata title, not verified execution evidence.

  • For reproducibility of the B call-chain citations: the ZIP literal at C001:L001 hashes to 27def1e3e6028fbc622cd1e65faeaca6a6a0d91a3343dac73b4e212795ae7ed1; decoded member SHA-256 values are:


  • src/candidates.py: 7acd3cfdd5efd613385c4949ca819959c5296d4a59a2fec50cc838ec50935085
  • src/inference.py: cd4cee6883af35b14d037351026f26faa1826f1829a41d4d774f6b303db57d44
  • src/analog.py: b7285a77ffc375e116d06ea3599ce26a12bb60d6b4f6ca4d39ee48d03cd26588
  • src/config.py: 1b4f83668d4a94b5adca59f9508ab78261ce1b4756d7b203fa9c438d54ea68ae
  • src/adduct.py: 70db44352120b74647a289a2f8e584b88f8180e492d34041f4b574ccdef775cf

  • Audit conclusion


    All five use semicolon-separated candidates and to_csv(index=False); those two features do not distinguish the suspected v6 failure. The useful differences are what supplies a candidate on no-hit, whether runtime or sample IDs define coverage, whether blank/invalid tokens are actually rejected, and whether checks occur before writing. No inspected executable writer hardcodes a 400-row test output. None of these source-only snapshots proves a successful hidden rerun, and neither filler padding nor stricter local assertions should be copied as a substitute for the stored official scoring contract.