recommendation-mlp
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
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: Yreus6
- License: apache-2.0
- Language: Jupyter Notebook
- Default Branch: main
- Size: 12.1 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Lightning Lab
Overview
Lightning Lab is a public template for artificial intelligence and machine learning research projects using Lightning AI's PyTorch Lightning.
The recommended way for Lightning Lab users to create new repos is with the use this template button.
You can find domain specific variations of Lightning Lab on my wiki.
The Structure
Source Module
lightninglab.cli contains code for the command line interface built with Typer.
lightninglab.components contains experiment utilities grouped by purpose for cohesion.
lightninglab.core contains code for the Lightning Module and Trainer.
lightninglab.pipeline contains code for data acquistion and preprocessing, and building a TorchDataset and LightningDataModule.
lightninglab.serve contains code for model serving APIs built with FastAPI.
lightninglab.config assists with project, trainer, and sweep configurations.
Project Root
data directory should be used to cache the TorchDataset and training splits locally if the size of the dataset allows for local storage. additionally, this directory should be used to cache predictions during HPO sweeps.
docs directory should be used for technical documentation.
logs directory contains logs generated from experiment managers and profilers.
models directory contains training checkpoints and the pre-trained production model.
notebooks directory can be used to present exploratory data analysis, explain math concepts, and create a presentation notebook to accompany a conference style paper.
requirements directory should mirror base requirements and extras found in setup.cfg. the requirements directory and requirements.txt at root are required by the basic Coverage GitHub Action.
tests module contains unit and integration tests targeted by pytest.
streamlit contains the Streamlit UI.
setup.py setup.cfg pyproject.toml and MANIFEST.ini assist with packaging the Python project.
.pre-commit-config.yaml is required by pre-commit to install its git-hooks.
Installation
Lightning Lab installs minimal requirements out of the box, and provides extras to make creating robust virtual environments easier. To view the requirements, in setup.cfg, see install_requires for the base requirements and options.extras_require for the available extras.
The recommended install is as follows:
sh
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[all, { domain extra(s) }]"
where { domain extra(s) } is one of, or some combination of (vision, text, audio, rl, forecast) e.g.
sh
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[all, vision]"
!!! warning
Do not install multiple variations of Lightning Lab into a single virtual environment. As this will override the lab CLI for each new variation that is installed.
Refactoring the Template
Lightning Lab is a great template for deep learning projects. Using the template will require some refactoring if you intend to rename src/lightninglab to something like src/textlab. You can refactor in a few simple steps in VS Code:
- Start by renaming the
src/lightninglabto something likesrc/textlaborsrc/imagenetlab. Doing so will allow VS Code to refactor all instance oflightninglabthat exists in any.pyfile. - Open the search pane in VS Code and search for
lightniglabintests/and replace those occurences with whatever you have renamed the source module to. - Next, search for
lightninglaband replace those occurences in all.toml.mdcfgfiles and string occurences in.pyfiles. - Next, search for Lightning Lab and change that to your repo name.
- Next, search for my name –
Justin Goheenand replace that with either your name or GitHub username. - Next, search once again for my name as
justingoheenand do the following:- replace the occurences in
mkdocs.ymlwith your GitHub username. - replace the occurences in
authors.ymlwith your choice of author name for your docs and blog.
- replace the occurences in
Tools and Concepts
- Hyperparameter Sweeps and experiment management with Weights and Biases
- Command Line Interfaces with Typer
- Model serving with FastAPI
- UIs with Streamlit and Plotly
- Using python-dotenv
- Documenting code with mkdocstrings and material-for-mkdocs
- Supabase's Python client
- PyTest
- Ruff
- MyPY
- Black
- GitHub Actions
- Version control as experiment management
Owner
- Name: Hieutran
- Login: Yreus6
- Kind: user
- Repositories: 1
- Profile: https://github.com/Yreus6
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: lastName
given-names: firstName
- name: "FirstName LastName"
title: "Project Title"
version: 0.0.1
date-released: 2022-08-06
license: "Apache-2.0"
repository-code: ""
keywords:
- machine learning
- deep learning
- artificial intelligence
GitHub Events
Total
Last Year
Dependencies
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- actions/cache v3 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- optuna *
- pandas *
- python-dotenv *
- pytorch-lightning *
- scikit-learn *
- supabase *
- torch *
- torch-tb-profiler *
- torchmetrics *
- wandb *
- rich *
- typer *
- bandit * development
- black * development
- coverage * development
- isort * development
- mypy * development
- pre-commit * development
- pytest * development
- ruff * development
- mkdocs-material *
- mkdocstrings *
- plotly *
- streamlit *
- build *
- setuptools *
- twine *