Skip to main content

Meta-Optimization Using Sequential Experiences

Warning: MOUSE is in early development and is not yet ready for use. APIs will change without notice.

mouse-core is the core library for MOUSE, a modular PyTorch stack for in-context reinforcement learning. It provides embeddings, transformer backbones, output heads, losses, and data utilities for training and deploying agents that adapt from transition history at inference time, without weight updates.

For vector environments and rollout collection, see mouse-env.

Install

pip install mouse-core

Development:

git clone https://github.com/micahr234/mouse-core.git
cd mouse-core
source scripts/install.sh

Import as mouse (PyPI package name is mouse-core).

Quick start

from mouse import load_model
from mouse.data import DatasetStore

store = DatasetStore(max_action_dim=4, max_obs_discrete_dim=1)
store.append({
    "observation_discrete": [0],
    "action": 0,
    "reward": 0.0,
    "done": 0,
    "episode_step": 0,
})
print(store)

Offline training on synthetic data (no Hub):

source .venv/bin/activate
python examples/02_train_offline.py

Documentation

All docs are Markdown in docs/ (read on GitHub or in the repo):

Doc Description
guide.md Overview, package layout, quick start
architecture.md Embedder, backbone, heads
data.md DatasetStore, batching, Hub upload
losses.md DQN, VecDQN, SP, SV
examples.md Training loops, datasets, inference
mouse_env.md mouse-core ↔ mouse-env rollout schema

API reference: Python docstrings in src/ (e.g. load_model, DatasetStore, dqn_loss).

Repo scripts: examples/ (01_collect_dataset.py, 02_train_offline.py, 03_inference.py).

Contributing

See CONTRIBUTING.md.

License

GNU General Public License v3.0 — see LICENSE.

Metadata

Release files for mouse-core 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mouse-core 0.3.0
File Size Uploaded Provenance Actions
mouse_core-0.3.0.tar.gz 58.9 kB With provenance Details for mouse_core-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mouse-core 0.3.0
File Interpreter ABI Platform Actions
mouse_core-0.3.0-py3-none-any.whl Python 3 none any Details for mouse_core-0.3.0-py3-none-any.whl

Total release size: 130.4 kB

Release files / mouse_core-0.3.0.tar.gz

Download URL mouse_core-0.3.0.tar.gz
Size 58.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7347adaee435f1ab7cd9fa54cbefbe7bbd16086d8df5226cb10d28b46df2f25f
BLAKE2b-256 checksum
How to use checksums
1437bf216d44614a78ec214ee53e6aae2f0391a6fbe94b1fc0cf8b0f0a0e47d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 23, 2026.

Transparency log

Release files / mouse_core-0.3.0-py3-none-any.whl

Download URL mouse_core-0.3.0-py3-none-any.whl
Size 71.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c34bc53ebebc12d55fbf8f58e6189102a31497716663d127dce85844894fe0a0
BLAKE2b-256 checksum
How to use checksums
d0e73d4206c76d46b15f01fc2ed2b75197105eaf2dfa4987ecfaac36f560a32e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 23, 2026.

Transparency log

Security for mouse-core 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mouse_core-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 23, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page