reinvent_test_scoring_component
Smoke-test a REINVENT4 scoring plugin on sample SMILES to verify it returns valid numerical scores before running reinforcement learning.
Instructions
Smoke-test a comp_*.py plugin on sample SMILES without running RL.
Loads the plugin (catching import errors), instantiates the tagged component, calls it on a mix of valid + invalid SMILES, and asserts the REINVENT4 plugin contract (returns ComponentResults with np.ndarray of floats, correct length, NaN for invalid inputs).
Use this after manually editing a comp_*.py, or to re-verify with custom SMILES / parameters. For freshly generated files, the smoke test is already auto-run by reinvent_custom_scoring_component.
Args: file_path: Absolute path to the comp_*.py file (must live under .../reinvent_plugins/components/ so relative imports resolve). test_smiles: SMILES to score. Defaults to a built-in mix of valid + invalid + edge cases. params: Per-endpoint parameter values, e.g. {"threshold": 0.5}. class_name: Component class name. Auto-detected when omitted.
Returns: dict with status (pass/fail), errors, warnings, per-SMILES scores, timing_ms_per_mol, and ready_for_rl flag.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | ||
| file_path | Yes | ||
| class_name | No | ||
| test_smiles | No |