How ethmodlab/bimodal works
Main Components
• Data Ingestion and Preprocessing: Represent the pipeline that loads raw molecular data (from files in the “data” folder, e.g., “chembl_smiles.tar.xz”) and processes it via the scripts in the “preprocessing” directory.
• Experimental Configuration: Include the “experiments” folder that holds parameter (.ini) files for different network models and training settings.
• Model Architecture and Training:
• “model” folder components (bimodal.py, fb_rnn.py, forward_rnn.py, nade.py, etc.) as the core modules responsible for constructing various RNN architectures.
• Distinguish between training scripts such as “main_trainer.py”, “trainer.py”, and “main_fine_tuner.py” for fine-tuning.
• Evaluation and Sampling:
• “evaluation” component which handles both performance evaluation (loss plots, molecule statistics) and a sampling module (using Sampler from the “sample.py” file) for generating new SMILES.
• Supporting Utilities and Helpers: Don’t forget to note the helper files (like “one_hot_encoder.py”, “helper.py”) that provide essential functions used throughout the modules.
Relationships and Data Flow
• A flow from the saved/pre-trained models to the Sampling Component (using Sampler class in “model/sample.py”), which then generates new SMILES.
• A feedback loop from Evaluation back to Training if one wants to improve performance based on results (e.g., via fine-tuning, using “model/main_fine_tuner.py”).
Architectural Patterns and Design Principles
• Modularity: Show how clear separation exists between data preparation, model training, fine-tuning, and evaluation/sampling.
• Configuration-driven Execution: Highlight the role of the .ini files from the “experiments” directory that parameterize training, data paths, learning rate, batch size, etc.
• Reproducibility: Indicate how pre-trained models are stored and can be re-used for sampling or fine-tuning; include versioning information from the README.
Detailing Interactions
• That the “experiments” parameters are fed into the “model” training scripts.
• That the “evaluation” scripts are not only for model performance but also for quality control for the generated SMILES.
• Fine-tuning process as an overlay on the training branch – using pre-trained models from evaluation as starting points for further training.