Skip to content
Projets

Erlemar/pytorch_tempest

Voir sur GitHub

À propos

My repo for training neural nets using pytorch-lightning and hydra

IA et apprentissage automatique

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

PyTorch-Tempest

DeepSource

This repository has my pipeline for training neural nets.

Main frameworks used:

The main ideas of the pipeline:

  • all parameters and modules are defined in configs;
  • prepare configs beforehand for different optimizers/schedulers and so on, so it is easy to switch between them;
  • have templates for different deep learning tasks. Currently, image classification and named entity recognition are supported;

Setup

Recommended (with uv):

brew install uv          # or see https://docs.astral.sh/uv/getting-started/installation/
uv sync                  # creates .venv from pyproject.toml + uv.lock

Then prefix commands with uv run, e.g. uv run python train.py ..., or source .venv/bin/activate to use the env directly.

Alternative (pip):

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

Running

This will run training on MNIST (data will be downloaded):

uv run python train.py --config-name mnist_config model.encoder.params.to_one_channel=True

Running on MPS (M1 macbook)

uv run python train.py --config-name mnist_config model.encoder.params.to_one_channel=True trainer.accelerator=mps +trainer.devices=1 optimizer=adan training.lr=0.001

Running on MPS (M1 macbook) with schedule free optimizer https://github.com/facebookresearch/schedule_free/tree/main

uv run python train.py --config-name mnist_config model.encoder.params.to_one_channel=True trainer.accelerator=mps trainer.devices=1 optimizer=adamwschedulefree training.lr=0.001 scheduler.params.patience=100

The default run:

uv run python train.py

The default version of the pipeline is run on imagenette dataset. To do it, download the data from this repository: https://github.com/fastai/imagenette unzip it and define the path to it in conf/datamodule/image_classification.yaml path

Explorer des projets similaires

Chargement…