rapidx
A toolbox that integrates with PyTorch-Lightning which helps in running and managing multiple codebases
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.8%) to scientific vocabulary
Keywords
Repository
A toolbox that integrates with PyTorch-Lightning which helps in running and managing multiple codebases
Basic Info
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
rapidx
rapidx - A toolbox that integrates with PyTorch Lightning which helps in running and managing multiple codebases
Docs/comments will be added soon. Please bear until then. Highly recommended to play around and customize it even more according to your needs.
Motivation
Suppose you've embarked on a PyTorch based deep learning research project that involves experimenting with ideas from multiple papers with each of them having their own separate codebases. Each of these codebases usually have their own set of requirements that needs to be managed through activating the right virtual environment during execution, their own way of logging metrics, separate set of commandline arguments, different code structure, training pipelines and whatnot. Managing all these is a messy affair. Hence in order to streamline the entire process, rapidx was created which stands for Rapid Experimentation(it's lame, ik, but ehh).
Features
- Manage multiple virtual environments, each with its own set of requirements and activated dynamically while a particular module is being executed.
- Streamlines logging metrics
- Training pipeline implemented through
LightningModulethat brings uniformity - All configs handled through
argparseand args specific to a particular module can be specified - Logging through
TensorBoardLogger - A single
run.pyfile to interface with all the codebases multiple_screens.pyallows you to run a module with different configs in parallel within a TMUX session. Useful for testing multiple experiment configs or hyperparameter tuning
Installation
bash
git clone https://github.com/pranftw/rapidx.git
cd rapidx
python -m venv venv # create a virtual environment
source venv/bin/activate # activate the virtual environment
pip install -r requirements.txt # install requirements
Example
A basic MNIST example is provided for reference. ```bash cd modules/mnist python -m venv mnistvenv # create a virtual environment for this module source mnistvenv/bin/activate # activate the virtual environment pip install -r requirements.txt # install requirements deactivate cd ../.. source venv/bin/activate # activate the common virtual environment python run.py --module_path modules/mnist
running multiple configs. make sure you're in a TMUX session with only window 0 present
cd scripts python run_mnist.py ```
Instructions/Notes
- Create a subdir with the module name in
modules - If the original codebase' training pipeline is in plain PyTorch, convert it to PyTorch-Lightning yourself or ask copilot to do it haha
- Within each module implement a PyTorch-Lightning
LightningModulemodule that is present either aslgt_module.pyfile orlgt_modulepackage - Each module might've its own requirements that needs to be installed, so make sure that it is done
- Currently only virtual env is supported for each module (conda environment might be supported in the future if required)
- Ensure that each
LightningModulechild implements aget_parser()static method which helps parse arguments related to the module - Implement a method to return the dataloaders in
data.pycorresponding to the name of the module - Outputs of all *_step in
LightningModuleneeds to be returned as a dict
Code Structure
data.py- Contains the dataloadersrun.py- Main file which is used to execute modulesutils.py- Helper functions- Each module in
modulesdir contains eitherlgt_module.pyorlgt_modulepackage which will be utilized byrun.pyto execute the module
If you use this software in your work, please cite it using the following BibTeX
@software{Sastry_rapidx_2023,
author = {Sastry, Pranav},
month = nov,
title = {{rapidx - A toolbox that integrates with PyTorch-Lightning which helps in running and managing multiple codebases}},
url = {https://github.com/pranftw/rapidx},
version = {0.0.1},
year = {2023}
}
Owner
- Name: pranav
- Login: pranftw
- Kind: user
- Location: Bengaluru
- Website: pranavsastry.com
- Repositories: 2
- Profile: https://github.com/pranftw
Deep learner.
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Sastry" given-names: "Pranav" orcid: "https://orcid.org/0000-0003-2091-3790" title: "rapidx - A toolbox that integrates with PyTorch-Lightning which helps in running and managing multiple codebases" version: 0.0.1 date-released: 2023-11-06 url: "https://github.com/pranftw/rapidx"
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Issues and Pull Requests
Last synced: about 2 years ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- torchvision *
- lightning *
- tensorboard *
- torch *