Skip to main content

Python successor to latent-inspector for latent geometry analysis

Project description

latent-inspector-py

Python successor to latent-inspector: inspect and compare latent representations from DINOv2, I-JEPA, V-JEPA 2, and EUPE with a research-grade experiment pipeline and paper-first artifact trail.

Status: release candidate.

Validated on 2026-04-13:

  • make check passes
  • make build passes
  • make showcase passes
  • 4-model parity runs against the Rust reference are available through Rust parity mode

Rust parity mode is the release path when exact cross-implementation alignment matters:

LATENT_INSPECTOR_RUNTIME_BACKEND=rust uv run lipy compare ...

North star

Build the Python version as the fast research workbench for the same core question as the Rust tool:

how do different training objectives shape the geometry, concentration, invariances, and downstream usefulness of latent world representations?

Scope of v1

  • Same core model family as the Rust repo:
    • DINOv2
    • I-JEPA
    • V-JEPA 2
    • EUPE
  • Python-first research stack:
    • PyTorch / torchvision / timm / transformers / huggingface_hub
    • ONNX Runtime for exported inference backends
    • numpy / scipy / scikit-learn / einops / pandas / polars
    • typer + rich CLI
    • pydantic config + result schemas
    • pytest for reproducible validation
  • Dual mode execution:
    • native backend for EUPE via official weights
    • ONNX export + ONNX Runtime backend for DINOv2 / I-JEPA / V-JEPA 2
  • Outputs:
    • inspect / compare / profile / drift / dataset study commands
    • parquet/json artifacts
    • plots and paper-ready tables
    • LaTeX-ready experiment summaries

Runtime modes

  • Default runtime:
    • eupe-vit-b16 uses the native Python backend
    • ONNX-backed models use the Python runtime path and prefer the Rust bridge when available
  • Rust parity mode:
    • force all supported models through the Rust reference bridge with LATENT_INSPECTOR_RUNTIME_BACKEND=rust
    • use this for release validation, parity studies, and cross-implementation comparisons

The model catalog exposes the active runtime metadata in JSON:

uv run lipy models --format json

Quickstart

make sync
make check
make showcase

Common commands:

uv run lipy models --format json
uv run lipy inspect artifacts/showcase/dataset/scene-01-orbit.png --model eupe-vit-b16 --format json
uv run lipy compare artifacts/showcase/dataset/scene-01-orbit.png --models eupe-vit-b16,dinov2-vit-l14 --format json
uv run lipy profile --model eupe-vit-b16 --dataset artifacts/showcase/dataset --format json
uv run lipy study run artifacts/showcase/study.yaml

Handy targets

  • make sync: install locked dependencies with uv
  • make check: format, lint, typecheck, and test
  • make smoke: light CLI verification
  • make showcase: generate demo assets and run the end-to-end showcase flow
  • make build: build sdist and wheel with uv
  • make publish-testpypi: publish to TestPyPI
  • make publish: publish to PyPI

Release and publishing

Build locally:

make build

Publish with uv:

make publish-testpypi
make publish

Before publishing, run the release checklist in RELEASE_CHECKLIST.md.

Repo map

  • docs/spec/ — product, research, contracts, schedule
  • docs/rfcs/ — architecture decisions
  • paper/ — paper draft, bib, figures, notes
  • src/latent_inspector_py/ — implementation
  • tests/ — unit + integration tests
  • AUTONOMOUS-GRIND-2026-04-12/ — work queue and iteration log for today's 10-pass buildout

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

latent_inspector_py-0.1.0.tar.gz (362.9 kB view details)

Uploaded Source

Built Distribution

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

latent_inspector_py-0.1.0-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file latent_inspector_py-0.1.0.tar.gz.

File metadata

  • Download URL: latent_inspector_py-0.1.0.tar.gz
  • Upload date:
  • Size: 362.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for latent_inspector_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 92ae5ce5a5f5fa10f9f0a0e4f58c15f25b54efc4427d2df4ccf84c51cf529246
MD5 19fc541ff734701b3fd0a876b6c91c66
BLAKE2b-256 cc120f851f33e4e56a0b601da8c2b81c1c7c05cdd5eb2c4aee08a5e6c213a30f

See more details on using hashes here.

File details

Details for the file latent_inspector_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: latent_inspector_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for latent_inspector_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa68d31174e790ba559dc2ff7325c26592c6a92602d3d4d3eca3e9abe4e6c74d
MD5 14ed9115a69ece553ae6a183ded91067
BLAKE2b-256 a7dc172a81945fe565e89de4d596090b59bdb84a279faa3b0a8dfc3d7fc9063b

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