Repository navigation
Add qsar-model-validation skill for judging QSAR/ADMET model reliability - #299
caliperworks wants to merge 1 commit into
Conversation
The collection covers how to drive the modelling libraries -- rdkit, deepchem, pytdc, molfeat, datamol all document their APIs and versions. Several of them also touch evaluation practice in passing: deepchem's example scripts use a scaffold split and warn that it does not eliminate all leakage, pytdc documents entity-overlap audits, and molfeat and datamol each carry a one-line warning that a random split leaks close analogues. What none of them provides is the protocol itself: how to choose the split that matches the claim being made, how to check leakage explicitly, what baseline a metric has to clear before it means anything, and how to calibrate a probability before a decision uses it. There, that practice is incidental to library documentation. This skill makes it the subject. It ships three CLIs and four references: - split_compare.py scores one fixed model on random, scaffold, time, and group splits of the same table, against a dummy baseline, and reports the leakage counts (exact duplicates, near-duplicates at a stated Tanimoto, shared scaffolds) that explain any gap between them. - applicability_domain.py marks test compounds against a training set. The similarity threshold defaults to a percentile of the training set's own nearest-neighbour distribution rather than a hardcoded constant, and with --prediction-col it scores the model separately inside and outside the domain. - calibration_report.py reports ECE, Brier, and the reliability curve, and fits a Platt or isotonic correction on rows held out from the rows it reports on. The test suite asserts direction rather than just execution: on the synthetic fixture, where activity is decided by scaffold family, the scaffold split must score worse than the random split, the random split must leak more near-duplicates, and a monotone calibrator must leave ROC-AUC unchanged. 44 tests pass; tests/_meta passes. The fixture is generated by fixtures/make_synthetic_actives.py with a fixed seed, so the provenance claim is reproducible rather than asserted. Fragments are joined through RDKit dummy atoms rather than by SMILES string substitution, which would put substituents on ring nitrogens and produce a table RDKit refuses -- the class of cleaning problem this skill is about.
|
في الجمعة، ٢ أكتوبر ٢٠٢٦، ٦:٥٠ ص caliperworks ***@***.***>
كتب:
… The collection covers how to drive the modelling libraries -- rdkit,
deepchem, pytdc, molfeat, datamol all document their APIs and versions.
Several of them also touch evaluation practice in passing: deepchem's
example scripts use a scaffold split and warn that it does not eliminate
all leakage, pytdc documents entity-overlap audits, and molfeat and datamol
each carry a one-line warning that a random split leaks close analogues.
What none of them provides is the protocol itself: how to choose the split
that matches the claim being made, how to check leakage explicitly, what
baseline a metric has to clear before it means anything, and how to
calibrate a probability before a decision uses it. There, that practice is
incidental to library documentation. This skill makes it the subject.
It ships three CLIs and four references:
- split_compare.py scores one fixed model on random, scaffold, time,
and group splits of the same table, against a dummy baseline, and reports
the leakage counts (exact duplicates, near-duplicates at a stated Tanimoto,
shared scaffolds) that explain any gap between them.
- applicability_domain.py marks test compounds against a training set.
The similarity threshold defaults to a percentile of the training set's own
nearest-neighbour distribution rather than a hardcoded constant, and with
--prediction-col it scores the model separately inside and outside the
domain.
- calibration_report.py reports ECE, Brier, and the reliability curve,
and fits a Platt or isotonic correction on rows held out from the rows it
reports on.
The test suite asserts direction rather than just execution: on the
synthetic fixture, where activity is decided by scaffold family, the
scaffold split must score worse than the random split, the random split
must leak more near-duplicates, and a monotone calibrator must leave
ROC-AUC unchanged. 44 tests pass; tests/_meta passes.
The fixture is generated by fixtures/make_synthetic_actives.py with a
fixed seed, so the provenance claim is reproducible rather than asserted.
Fragments are joined through RDKit dummy atoms rather than by SMILES string
substitution, which would put substituents on ring nitrogens and produce a
table RDKit refuses -- the class of cleaning problem this skill is about.
Summary Type of change
- New skill
- Update to an existing skill
- Tests
- Repository tooling or CI
- Documentation
- Other:
Skills touched
-
How this was tested
uv run skills-ref validate ./skills/<name>
uv run --with pytest python -m pytest tests/<name> -q
Related issues and references
------------------------------
Checklist
Drawn from the Pull Request Checklist
<https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/CONTRIBUTING.md#pull-request-checklist>
in CONTRIBUTING.md. Items that do not apply to this PR can be left
unchecked with a short note.
*Skill format*
- The skill directory name and the name frontmatter match exactly.
- The skill directory contains only SKILL.md, references/, scripts/,
and assets/ — no tests/ directory and no test_*.py files.
- SKILL.md has valid YAML frontmatter and a Markdown body.
- Only the six spec-defined top-level fields are present; everything
else lives under metadata.
- metadata is a block mapping, not single-line JSON, and scalar values
are quoted where needed.
- Any metadata.openclaw or metadata.hermes block is a nested mapping,
not a JSON string.
- metadata.version exists, is quoted, and is bumped if an existing
skill changed.
- The description says both what the skill does and when an agent
should use it.
*Validation and tests*
- uv run skills-ref validate ./skills/<name> passes.
- Tests live in tests/<skill-name>/, and any new scripts/ skill has a
[skills.<name>] entry in tests/skill-requirements.toml.
- Relevant test suites pass, or the failures are explained below.
- Security scanner results are clean or explained in this PR.
*Content and safety*
- Examples and scripts were tested, or are clearly marked as
illustrative.
- No secrets, credentials, private data, or unsafe instructions are
included.
- Credentials the skill needs are named in compatibility and declared
in metadata.openclaw.envVars.
- Relevant official documentation is linked where useful.
Notes for reviewers
------------------------------
You can view, comment on, or merge this pull request online at:
#299
Commit Summary
- 6737c57
<6737c57>
Add qsar-model-validation skill for judging QSAR/ADMET model reliability
File Changes
(13 files
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files>)
- *A* skills/qsar-model-validation/SKILL.md
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-a199b660363327d2dd198414229445429c1c9fbc3ee8f97ed9a71781cbb18784>
(203)
- *A* skills/qsar-model-validation/references/applicability-domain.md
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-ee2f01aafba8fc752b55e3a060078dac6f43f80262c35bebf62b0bdeb941285b>
(73)
- *A*
skills/qsar-model-validation/references/metrics-and-calibration.md
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-755bed95562dced367e716afee7f9a3720f73e2b4569c8f67047aedab88fb814>
(116)
- *A* skills/qsar-model-validation/references/reporting-checklist.md
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-1699730b689e6693a3a51745d347d42ed714fc7b8b783838cc049b25a4ebf896>
(99)
- *A* skills/qsar-model-validation/references/splits.md
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-925b61cd666b5a75aebaa80d20abd1c4d5b6064f6f88bd82783b7d1afa958b40>
(93)
- *A* skills/qsar-model-validation/scripts/_common.py
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-4683472fc84c707f50e592b41333e8fc45bbec6fd5737e4876f8c02039a90fe7>
(954)
- *A* skills/qsar-model-validation/scripts/applicability_domain.py
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-0959dbabeb58b76062a9e6899e1ed77d28078985be43fa36082dd7c84b344b36>
(498)
- *A* skills/qsar-model-validation/scripts/calibration_report.py
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-6ac5d9bed569d2e7ca4e5ec2179a4dea2e86648bcf4a133caa528ba7a237c8dd>
(435)
- *A* skills/qsar-model-validation/scripts/split_compare.py
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-4fee7f4d45b6a82b18b2c770cb464dd38914d6a3b8298a378c677aa05dbbe0cf>
(550)
- *A* tests/qsar-model-validation/fixtures/make_synthetic_actives.py
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-1199b778dd74cf782abcee79d3689569e2e37aecc08dedd89a928ac1ea2d94ca>
(169)
- *A* tests/qsar-model-validation/fixtures/synthetic_actives.csv
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-3e410e945676227aeac735d46deaf8deab71632431a2c592ab1fd2413712ef8d>
(222)
- *A* tests/qsar-model-validation/test_scripts.py
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-99a2fd9b96e0da93ae5554f7dc75a3c7cf2c71ef38988c2cf35b5ffc5161c6b5>
(707)
- *M* tests/skill-requirements.toml
<https://github.com/K-Dense-AI/scientific-agent-skills/pull/299/files#diff-f94f9c2b599d8bf2bf9c8a33c5609835a114ebb97bdbef0ecafbe1d2e9120622>
(3)
Patch Links:
- https://github.com/K-Dense-AI/scientific-agent-skills/pull/299.patch
- https://github.com/K-Dense-AI/scientific-agent-skills/pull/299.diff
—
Reply to this email directly, view it on GitHub
<#299?email_source=notifications&email_token=CEJ43RP6RA3M65QSF7GLVWD5R4QYBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DOMJSGQ2TSNBRGOTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/CEJ43ROV7WCBOAUB6WBPJP35R4QYBAVCNFSNUABGKJSXA33TNF2G64TZHMYTANZZGQ2TMMJYGQ5US43TOVSTWNJWG4ZDMMBSHE3DLILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/CEJ43RM66FRZTJ5PITPOEST5R4QYBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DOMJSGQ2TSNBRGOTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/CEJ43RJGM3RR4AMMA2B47MT5R4QYBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DOMJSGQ2TSNBRGOTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
SummaryAdds a The collection documents how to drive the modelling libraries -- rdkit, Type of change
Skills touched
How this was testedVerified against RDKit 2026.3.6, scikit-learn 1.9.1, pandas 3.0.6, NumPy 2.5.3, One gate not exercised locally:
Related issues and referencesThe practice this skill operationalises is independently stated in https://github.com/kjappelbaum/awesome-chemistry-datasets/blob/main/OPPORTUNITIES.md ChecklistDrawn from the Pull Request Checklist in CONTRIBUTING.md. Skill format
Validation and tests
Content and safety
Notes for reviewers
|
| @@ -0,0 +1,203 @@ | |||
| --- | |||
| name: qsar-model-validation | |||
|
Update |
The collection covers how to drive the modelling libraries -- rdkit, deepchem, pytdc, molfeat, datamol all document their APIs and versions. Several of them also touch evaluation practice in passing: deepchem's example scripts use a scaffold split and warn that it does not eliminate all leakage, pytdc documents entity-overlap audits, and molfeat and datamol each carry a one-line warning that a random split leaks close analogues.
What none of them provides is the protocol itself: how to choose the split that matches the claim being made, how to check leakage explicitly, what baseline a metric has to clear before it means anything, and how to calibrate a probability before a decision uses it. There, that practice is incidental to library documentation. This skill makes it the subject.
It ships three CLIs and four references:
The test suite asserts direction rather than just execution: on the synthetic fixture, where activity is decided by scaffold family, the scaffold split must score worse than the random split, the random split must leak more near-duplicates, and a monotone calibrator must leave ROC-AUC unchanged. 44 tests pass; tests/_meta passes.
The fixture is generated by fixtures/make_synthetic_actives.py with a fixed seed, so the provenance claim is reproducible rather than asserted. Fragments are joined through RDKit dummy atoms rather than by SMILES string substitution, which would put substituents on ring nitrogens and produce a table RDKit refuses -- the class of cleaning problem this skill is about.
Summary
Type of change
Skills touched
How this was tested
Related issues and references
Checklist
Drawn from the Pull Request Checklist in CONTRIBUTING.md. Items that do not apply to this PR can be left unchecked with a short note.
Skill format
namefrontmatter match exactly.SKILL.md,references/,scripts/, andassets/— notests/directory and notest_*.pyfiles.SKILL.mdhas valid YAML frontmatter and a Markdown body.metadata.metadatais a block mapping, not single-line JSON, and scalar values are quoted where needed.metadata.openclawormetadata.hermesblock is a nested mapping, not a JSON string.metadata.versionexists, is quoted, and is bumped if an existing skill changed.descriptionsays both what the skill does and when an agent should use it.Validation and tests
uv run skills-ref validate ./skills/<name>passes.tests/<skill-name>/, and any newscripts/skill has a[skills.<name>]entry intests/skill-requirements.toml.Content and safety
compatibilityand declared inmetadata.openclaw.envVars.Notes for reviewers