Skip to content

ignasa007/ML-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML-Template

This is a template for Machine Learning projects.

How to use

To instantiate your project using this template, on the template's GitHub page, click Use this template, then Create a new repository.

Otheriwse, if you already have a local git repository, run

cd <local-git-repo>
git remote add ml-template https://github.com/ignasa007/ML-Template.git
git fetch ml-template
git merge --allow-unrelated-histories ml-template/main
git remote remove ml-template

Directory Structure

  • assets - plots generated from different experiments.
  • config - configuration files for different datasets and models.
  • data - raw datasets store.
  • data_classes - Python classes to handle different datasets, and make them suitable for training.
  • model_classes - Python classes to handle different models.
  • results - results of the different runs.
    • directory structure - <dataset> -> <model> -> <run-date> -> logs and <data-split>_results
  • utils - utility functions for running the transformer experiments.
  • main.py - main file for training the models.
  • inference.py - main file for testing the models.

Setup

conda create --name <env-name> --file requirements.txt python=3.8
conda activate <env-name>

Execution

To run the transformer experiments, execute

python3 -B main.py \
    --dataset <dataset> \
    --model <model>

You can also override default configurations using the command line.

For inference, execute

python3 -B inference.py \
    --dataset <dataset> \
    --model <model> \
    --weights <path-to-weights>

Note: Make sure to set the device index to None if you do not wish to use the GPU.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages