rapidx

A toolbox that integrates with PyTorch-Lightning which helps in running and managing multiple codebases

https://github.com/pranftw/rapidx

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

hyperparameter-tuning python pytorch pytorch-lightning research toolbox
Last synced: 6 months ago · JSON representation ·

Repository

A toolbox that integrates with PyTorch-Lightning which helps in running and managing multiple codebases

Basic Info
  • Host: GitHub
  • Owner: pranftw
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 14.6 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
hyperparameter-tuning python pytorch pytorch-lightning research toolbox
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

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 LightningModule that brings uniformity
  • All configs handled through argparse and args specific to a particular module can be specified
  • Logging through TensorBoardLogger
  • A single run.py file to interface with all the codebases
  • multiple_screens.py allows 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 LightningModule module that is present either as lgt_module.py file or lgt_module package
  • 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 LightningModule child implements a get_parser() static method which helps parse arguments related to the module
  • Implement a method to return the dataloaders in data.py corresponding to the name of the module
  • Outputs of all *_step in LightningModule needs to be returned as a dict

Code Structure

  • data.py - Contains the dataloaders
  • run.py - Main file which is used to execute modules
  • utils.py - Helper functions
  • Each module in modules dir contains either lgt_module.py or lgt_module package which will be utilized by run.py to 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

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

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 9
  • Total Committers: 1
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 9
  • Committers: 1
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
pranav p****i@g****m 9

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

modules/mnist/requirements.txt pypi
  • torchvision *
requirements.txt pypi
  • lightning *
  • tensorboard *
  • torch *