neurogen
neurogen is a CLI-based machine learning framework for forecasting outcomes
from text corpora over time. It began life as a citation-impact predictor, but
nothing in the pipeline is specific to academic papers: embed a text dataset,
track it across time windows, train, and evaluate.
The core training loop and data pre-processing are driven entirely by the CLI
and integrate with MLflow to track experiments. Each experiment is a single
self-contained Python module that instantiates its own models, datasets,
samplers, DataLoaders, strategy, tracker, and checkpoint processor, and every
app runs either locally or on Modal GPUs with one --runtime flag.
Install
neurogen installs as one top-level package with a neurogen console script.
PyTorch is not a core dependency; it arrives through one of the mutually
exclusive cpu, cuda126, or cuda130 extras.
pip install neurogen # CLI only; no torch
pip install "neurogen[cpu]" # CPU PyTorch
pip ignores [tool.uv.sources], so select the PyTorch build with its index
explicitly:
# CPU
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install "neurogen[cpu]"
# CUDA 12.6 (use cuda130 and the whl/cu130 index for CUDA 13.0)
pip install torch --index-url https://download.pytorch.org/whl/cu126
pip install "neurogen[cuda126]"
With uv, the extras resolve the matching index for you:
uv add "neurogen[cpu]" # or [cuda126] / [cuda130]
Python 3.12 and 3.13 are supported (requires-python = ">=3.12,<3.14").
Quick start
Create a project, then train its generated example for one local step:
neurogen init demo
cd demo
neurogen train -e example --name demo --no-gpu
neurogen init [NAME] writes a real importable package and refuses to
overwrite existing files unless --force is passed. It runs no git init and
no pip install. The generated layout is:
demo/
├── neurogen.toml # project marker and manifest
├── pyproject.toml # project name, dependencies, [tool.neurogen]
├── config.toml # [env], [source], and [runtime] defaults
├── .gitignore
├── README.md
└── demo/
├── __init__.py
├── config/example.py # project instance config for the example
├── experiments/example.py # the importable example experiment
├── models/tiny.py
├── datasets/tiny.py
├── strategies/__init__.py
└── tokenisers/__init__.py
Local runs and direct imports
A project declares itself with a neurogen.toml marker or a [tool.neurogen]
table in pyproject.toml. The CLI walks up from the working directory to find
one, prepends the project root to sys.path, and imports the experiment
directly as <package>.experiments.<name>. There is no plugin registry and no
editable install: drop a module under demo/models/ and import it from an
experiment module. Project instance configs live under demo/config/; the
generated example imports demo.config.example, and --config-file can
override that module for a single run.
--project PATH overrides discovery. -e/--experiment accepts four forms:
| Input | Resolution |
|---|---|
name |
<project package>.experiments.name |
pkg.mod.name |
that dotted module |
neurogen:name |
a builtin experiment in neurogen.experiments |
path/to/file.py |
load from the file path |
Builtin experiments run with no project at all:
neurogen -e neurogen:rhlm train -s smoke --no-gpu
Dependencies declared in the project pyproject.toml are yours to install;
third-party packages already in the environment are importable because the CLI
runs in that environment.
Machine settings
Machine settings ([env], [source], [runtime], [models]) are read from
config.toml at the project root — the directory holding the
neurogen.toml marker or the [tool.neurogen] table. A project that predates
the 0.1 layout may keep the file at config/config.toml instead. With no
project marker, discovery finds nothing and the library defaults apply
(sqlite:///mlflow.db for tracking, /tmp/artifacts for artifacts, no
[runtime.modal] section), so a Modal run needs a project. config/config.example.toml
in this repository is the reference for the accepted keys; copy it to
<project>/config.toml and edit it there.
Builtins
Builtin models, datasets, strategies, tokenisers, losses, and experiments ship
with the package and resolve from it. neurogen init copies a minimal example
into the project for editing; the builtin set itself does not change in 0.1.
Deploy to Modal
neurogen deploy builds a builtin-only Modal image from a locally built
neurogen wheel and shells out to the Modal CLI. Install the optional extra
and authenticate once:
pip install "neurogen[modal]" # or: uv add "neurogen[modal]"
modal token new
neurogen deploy
Preprocess, describe, and engineer dispatch to the deployed app by name; train
and eval spawn ephemeral jobs. Train jobs are spawned fire-and-forget: the CLI
prints the MLflow run id and Modal FunctionCall id and returns immediately.
Block until done with modal FunctionCall.from_id(<id>).get(), or watch the run
in the MLflow UI.
The image carries the builtin framework and pinned torch only. Packaging a
user project into the image is not part of 0.1; that is the subject of the
custom-code-on-Modal plan. A project
experiment still runs locally
(--runtime local). Re-deploy after changing neurogen itself; a project code
change does not reach the builtin image. --wheel PATH installs a prebuilt
neurogen wheel instead of building one from the checkout.
Repository layout
neurogen/
├── pyproject.toml
├── config/
│ └── config.example.toml # example machine settings
├── src/
│ └── neurogen/
│ ├── cli.py # root Typer app
│ ├── api.py # public protocol hub
│ ├── __init__.py # lazy __getattr__, __version__
│ ├── __main__.py # python -m neurogen
│ ├── apps/ # Typer CLI apps (train, eval, preprocess, ...)
│ ├── builders/
│ ├── config/ # schemas, loader, env/runtime config
│ ├── data/ # sources, pipelines, datasets, samplers
│ ├── experiments/ # builtin experiments (neurogen:<name>)
│ ├── models/
│ ├── runtime/ # local and Modal backends
│ ├── training/ # engine, strategies, losses, tracking
│ └── utils/
├── plans/
│ ├── legacy/ # archived pre-0.1 plans
│ └── releases/ # feature plans; shipped plans move to archive/
└── tests/
Tech stack
- Core. Python 3.12-3.13 and PyTorch.
- MLOps. MLflow for tracking, Modal for GPUs, scikit-learn for metrics.
- Data. Polars for predicate-pushdown loading and multi-worker serving.
- Validation. Pydantic for typed config schemas.
- Tooling. Typer for the CLI and Rich for logging.
Documentation
- ROADMAP.md — the post-0.1 line.
- CHANGELOG.md — releases, starting at 0.1.0.
- docs/ — apps, experiments, data pipeline, and training internals.
- plans/releases/archive/0.1.md - the 0.1.0 release plan.
- docs/legacy-changelog.md — pre-0.1 history.
Metadata
Release files for neurogen 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| neurogen-0.3.0.tar.gz | 351.2 kB | Without provenance | Details for neurogen-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neurogen-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for neurogen-0.3.0-py3-none-any.whl |
Total release size: 656.9 kB
Release files / neurogen-0.3.0.tar.gz
| Download URL | neurogen-0.3.0.tar.gz |
|---|---|
| Size | 351.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9914dedf65f9e741d9b994dbc78dfdf1b7e863920e49c36f98d0373dac822cf
|
|
BLAKE2b-256 checksum How to use checksums |
8160c715bfc05c88c850be8830480f9f535057c1d59377706a3c9b1aa1fd3072
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / neurogen-0.3.0-py3-none-any.whl
| Download URL | neurogen-0.3.0-py3-none-any.whl |
|---|---|
| Size | 305.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e8045875746a0c4ccda707ef667293123c2be1d6b52e9c016a45ca84183da8d
|
|
BLAKE2b-256 checksum How to use checksums |
25df6dfed85caf68e388ce6ca4e4948364bd3112ae328688749bd93d0fe3959b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for neurogen 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.