A machine learning project at Technical University of TUM.
Jupyter Notebook
0
3 commits
updated Sep 18, 2024
This repository contains code for building, training, and evaluating a neural network model for predicting gene expression profiles from DNA sequences using PyTorch Lightning and Hydra for configuration management.
To install the required dependencies, use the provided environment.yml file and run:
conda env create -f environment.yml
conda activate regulate-me
Note: If you are using a GPU, you will need to install the appropriate version of PyTorch for your CUDA version.
Move saccharomyces_cerevisiae to a new folder data in the root directory of the project.
Needs to be done only once. Run the following command to preprocess the data:
python scripts/preprocess_data.py
You will need to login to wandb to use the sweep functionality. You can do this by running the following command and following the instructions:
wandb login
To run training using the config file config.yaml in the configs folder, use the following command:
python scripts/train_model.py --config-name config
There are 3 differnet configuration files for 3 different models:
config.yaml for the baseline BPNet modellora.yaml for the SpeciesLM model with a 1D convolutional prediction headllm_bpnet.yaml for the SpeciesLM model with BPNet prediction headLora is used by defualt in both the lora.yaml and llm_bpnet.yaml configuration files. To toggle Lora on or off, set the use_lora parameter to True or False respectively. This illustreates also how other parameters can be changed from the command line.
python scripts/train_model.py --config-name lora model.use_lora=False
To run hyperparameter optimization using sweep.yaml in the configs folder, use the following command. Needs to be defnied per model in the sweep.yaml file.
python scripts/run_sweep.py --config-name llm_bpnet
The notebooks folder contains a Jupyter notebook for interpreation of the model results and also for final model evaluation as well as a notebook for interactive training of the model.
interpretation_bpnet.ipynb for interpretation of the BPNet model resultsinterpretation_lora.ipynb for interpretation of the SpeciesLM model resultsfinal_evaluation.ipynb for final model evaluation on the test setA machine learning project at Technical University of TUM.
Jupyter Notebook
0
3 commits
updated Sep 18, 2024
This repository contains code for building, training, and evaluating a neural network model for predicting gene expression profiles from DNA sequences using PyTorch Lightning and Hydra for configuration management.
To install the required dependencies, use the provided environment.yml file and run:
conda env create -f environment.yml
conda activate regulate-me
Note: If you are using a GPU, you will need to install the appropriate version of PyTorch for your CUDA version.
Move saccharomyces_cerevisiae to a new folder data in the root directory of the project.
Needs to be done only once. Run the following command to preprocess the data:
python scripts/preprocess_data.py
You will need to login to wandb to use the sweep functionality. You can do this by running the following command and following the instructions:
wandb login
To run training using the config file config.yaml in the configs folder, use the following command:
python scripts/train_model.py --config-name config
There are 3 differnet configuration files for 3 different models:
config.yaml for the baseline BPNet modellora.yaml for the SpeciesLM model with a 1D convolutional prediction headllm_bpnet.yaml for the SpeciesLM model with BPNet prediction headLora is used by defualt in both the lora.yaml and llm_bpnet.yaml configuration files. To toggle Lora on or off, set the use_lora parameter to True or False respectively. This illustreates also how other parameters can be changed from the command line.
python scripts/train_model.py --config-name lora model.use_lora=False
To run hyperparameter optimization using sweep.yaml in the configs folder, use the following command. Needs to be defnied per model in the sweep.yaml file.
python scripts/run_sweep.py --config-name llm_bpnet
The notebooks folder contains a Jupyter notebook for interpreation of the model results and also for final model evaluation as well as a notebook for interactive training of the model.
interpretation_bpnet.ipynb for interpretation of the BPNet model resultsinterpretation_lora.ipynb for interpretation of the SpeciesLM model resultsfinal_evaluation.ipynb for final model evaluation on the test set