Command-Line Interfaces¶
The project exposes user-facing commands through python -m src.cli.<name> and, for training, also through python -m src.training.train.
Feature generation: src.cli.process_features¶
python -m src.cli.process_features data/example/raw/psychlight_a.csv \
--output-dir data/example/processed/psychlight_a
Current outputs:
psychlight_a_descriptors.csvpsychlight_a_mordred.csvpsychlight_a_morgan.csv- optional
psychlight_a_dpk.csv - optional
psychlight_a_dpk.smi - optional
psychlight_a_deeppk_extra.csv
Defaults from the current CLI help:
--output-dir:data/processed--fingerprint-radius:3--fingerprint-bits:1024--deeppk-pred-type:admet--deeppk-poll-interval:60--deeppk-timeout:3600
Data exploration: src.cli.explore¶
python -m src.cli.explore \
--dimensionality-reduction data/example/processed/psychlight_a/psychlight_a_descriptors.csv \
--target-column Class \
--output-dir data/example/exploration
Current CLI default:
--output-dir:data/example/exploration
If you pass no action flags, _ensure_actions enables the full exploration bundle:
- class distribution
- missingness
- PCA summary
- feature importance
- feature distributions
- t-SNE
- UMAP
- variance threshold export
- mutual information
- binary activity
- outlier report
See the dedicated Data Exploration page for artifact details.
Training: src.cli.train and src.training.train¶
python -m src.cli.train --config configs/train.yaml \
--datasets psychlight_a_descriptors \
--models logisticregression
Current CLI flags:
--config--models--datasets--skip-existing
Important current behavior:
- the CLI default path is
configs/train.yaml - the CLI prints a short completion summary, not YAML
train_from_configalso writes a pipeline-steps overview CSV before training when dataset/model rows are available
Evaluation: src.cli.evaluate¶
python -m src.cli.evaluate \
--model models/example/trained_models/.../logisticregression_model_<hash>_<timestamp>.joblib \
--test-csv data/example/processed/psychlight_a/psychlight_a_descriptors.csv \
--target-col Class
Current CLI default:
--output-dir:models/evaluation
Behavior:
- accepts either a single
.joblibfile or a directory of.joblibfiles - writes one YAML metrics file per evaluated model
- when given a directory, also writes a summary CSV
- aligns feature names using the same sanitization logic as training
Prediction: src.cli.predict¶
python -m src.cli.predict \
--model models/example/trained_models/.../logisticregression_model_<hash>_<timestamp>.joblib \
--input-csv data/example/processed/psychlight_a/psychlight_a_descriptors.csv \
--target-col Class
Behavior:
- appends
predictionfor a single model - appends
<model_name>_predictionfor a directory of models - ignores
--target-colif that column is present, so labeled CSVs can be reused - defaults the output path to
<input>_predictions.csv
Quick validation commands¶
conda run -n lig-cls python -m src.cli.process_features --help
conda run -n lig-cls python -m src.cli.explore --help
conda run -n lig-cls python -m src.cli.train --help
conda run -n lig-cls python -m src.cli.evaluate --help
conda run -n lig-cls python -m src.cli.predict --help
Common failure modes¶
- Missing RDKit usually means the wrong Python environment is active.
- Missing feature columns in evaluate or predict are reported using sanitized feature names plus hints back to the original headers.
- DeepPK timeouts can be handled with
--deeppk-timeoutand--deeppk-poll-interval. - Training resume behavior depends on
models/tracking/training_runs.csv, not on the configured log directory.