
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
A modular, best-practice pytorch template for all your deep learning projects.
"Beauty is as important in computing as it is in painting or architecture." — Donald E. Knuth
A simple, flexible, and modular PyTorch template for kickstarting your deep learning projects. Inspired by the agent-environment interface, Canvas aims to provide a unified template for all types of ML projects.
Canvas offers unique templates to kickstart various machine learning tasks:
Supervised Learning (SL): Perfect for tasks like classification and regression, where you have labeled data.
Reinforcement Learning (RL): Designed for building agents that learn by interacting with an environment.
Self-Supervised Learning (SSL): Train models to learn representations from unlabeled data.
Canvas requires Python 3.11+. Since it's a command-line tool, we highly recommend using uv for installation.
# Recommended: with uv
uv tool install canvas-template
# Alternative: with pip
pip install canvas-template
To create a new project, run the canvas init
command and pick your template. No need to create a directory first; Canvas will do it for you.
canvas init [sl|ssl|rl]
Example: The following settings will create a project named my_project with the self-supervised learning (SSL) template.
The directory structure of your new project will look something like this (depending on the settings that you choose):
example-project/
├── Makefile # Convenient make commands
├── LICENSE # Project license
├── README.md # Your project's main README file
├── mkdocs.yml # Configuration for building documentation
├── pyproject.toml # Project metadata and dependencies
├── uv.lock # uv lock file for consistent environments
├── docs/ # Where your project's documentation lives
│ └── index.md
├── src/ # All the source code for your deep learning project
│ ├── main.py # The main entry point of your project
│ ├── config/ # Hydra configuration files for managing settings
│ │ └── config.yaml
│ ├── model/ # Your deep learning model definitions
│ │ ├── __init__.py
│ │ ├── model.py
│ │ ├── network.py
│ │ └── loss.py
│ ├── data/ # Scripts for loading and preparing your data
│ │ ├── __init__.py
│ │ ├── data.py
│ │ └── preprocess.py
│ └── algorithm/ # The core algorithm: training, evaluation
│ ├── __init__.py
│ ├── trainer.py
│ └── evaluator.py
├── dataset/ # Place your raw or processed datasets here
│ └── ...
└── outputs/ # Where experiment logs, model checkpoints, and results are saved
└── ...
Any kind of enhancement or contribution is welcome. If you have bug fixes, new features, or any improvements, I'd love your help!
FAQs
A modular, best-practice pytorch template for all your deep learning projects.
We found that canvas-template demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.