Skip to main content

A hackable blueprint for training neural networks using PyTorch and Lightning.

Project description

Venturi Logo

Venturi

A hackable blueprint for training neural networks.

PyPI Python License

InstallationQuick StartExamples


A hackable blueprint for training neural networks using PyTorch and Lightning.

Venturi is a minimalist alternative to Hydra and LightningCLI. It prioritizes code transparency and flexibility. By separating experiment parameters from logic, it enables complex experiment registration without the bloat of heavy configuration frameworks.

Why Venturi?

Most configuration frameworks force you to learn their specific DSL or hide logic behind complex abstractions. Venturi takes a different approach:

  • Auditable Core: The entire package logic resides in just two files: config.py and core.py. You can read, understand, and modify the inner workings.
  • Zero-Overhead Configuration: No enforced argparse or pydantic validation by default. You instantiate Python objects directly from YAML. Validation is opt-in, not mandatory.
  • Global Context: The full YAML configuration is passed to the main classes used for training. This allows you to define complex relationships (e.g., dynamically setting model depth based on dataset size) without changing the training loop.
  • Inheritance-First Design: The experiment lifecycle is defined by classes designed to be subclassed when custom training logic is necessary.

Installation

Install the core package:

pip install venturi

To run the provided examples, install the optional dependencies:

pip install "venturi[examples]"

Quick Start

1. Scaffold a Project

Generate a standard directory structure and a default configuration file:

venturi create path/to/project

This creates a base_config.yaml file containing the default blueprints.

2. Define Your Experiment

Venturi uses a hierarchical configuration system. You load a base configuration and override it with experiment-specific YAMLs.

from venturi import Config, Experiment

# 1. Load the project defaults
args = Config("base_config.yaml")

# 2. Overlay custom experiment parameters
args.update_from_yaml("experiments/my_custom_config.yaml")

# 3. Initialize and Run
experiment = Experiment(args)
experiment.fit()

Examples

Some examples are provided in the examples directory:

Example Description
Configuration The core concept: instantiating arbitrary Python objects directly from YAML and mixing multiple config files
Basic Usage A complete image segmentation experiment setup
Base Config The reference file describing all standard Venturi parameters

Design Philosophy

Venturi is built on the principle that research code should be hackable.

  1. Transparency: You should not have to dig through a call stack of 50 internal functions to understand how your configurations are parsed.
  2. Flexibility: If you want to add Pydantic validation, you can add it before passing the config to the Experiment class. It is not baked into the core.
  3. Portability: By avoiding complex CLI dependency injection, your experiments remain standard Python scripts that are easy to debug and deploy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

venturi-0.9.2.tar.gz (70.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

venturi-0.9.2-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file venturi-0.9.2.tar.gz.

File metadata

  • Download URL: venturi-0.9.2.tar.gz
  • Upload date:
  • Size: 70.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for venturi-0.9.2.tar.gz
Algorithm Hash digest
SHA256 e1d8d723513fe8981b09b9d3da6407fdb458a9a3679db9806a29067f206f71ae
MD5 be1de9cab9154fa7e69732755c477dec
BLAKE2b-256 c832c72238f96382c95debf9547174cbfb7d81c8e794f7775ebccf2e4cb1bfc5

See more details on using hashes here.

File details

Details for the file venturi-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: venturi-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for venturi-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 12722f1ab948db4d36da335488472d7a1d6657b198f4f3e4d3038ef76c73d115
MD5 ee3b31021eac9d6deb830b86ab8b5b4d
BLAKE2b-256 924e1f40da19f46b55834d25c794c80f0a7ffc5922e75761bf6d0a130c567f1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page