Skip to main content

Foundation types and mesh registry for the SuperInstance ecosystem

Project description

plato-core

Foundation types and mesh registry for the SuperInstance ecosystem.

Zero external dependencies. Everything else builds on top.

What's Here

  • TypesTrainingTile, TileType, TileLifecycle, LamportClock, TrainingConfig, TrainingMetrics, AdapterConfig, content_hash()
  • Mesh Registry — Auto-discovery of ecosystem packages via Python entry_points

Install

pip install -e .

Usage

Types

from plato_core import TrainingTile, TileType, content_hash, LamportClock

tile = TrainingTile(
    tile_id="chk-001",
    tile_type=TileType.CHECKPOINT,
    name="my-model-v1",
)

clock = LamportClock()
tile.lamport = clock.tick()

h = content_hash(b"some weights data")

Mesh Registry

The registry auto-discovers all installed SuperInstance packages:

from plato_core import MeshRegistry

registry = MeshRegistry()
matchers = registry.get_matchers()      # from plato-matcher
compressors = registry.get_compressors()  # from plato-compress
trainers = registry.get_trainers()       # from plato-training

Registering a Plugin

Any package can join the ecosystem:

  1. Add plato-core as a dependency
  2. Declare an entry point in pyproject.toml:
[project.entry-points."superinstance.plugins"]
my-plugin = "my_package._mesh:register"
  1. Implement the register function:
# my_package/_mesh.py
def register(registry):
    registry.register("matchers", "my_matcher", lambda: MyMatcher)

Done. The mesh registry discovers it automatically.

Architecture

plato-core (this)       ← base types + registry
  ├── plato-training    ← training rooms, micro models
  ├── plato-matcher     ← semantic matching
  ├── plato-compress    ← compression/quantization
  └── ...               ← any future SuperInstance package

Each package is standalone. They communicate through shared types from plato-core and auto-discover each other via the mesh registry.

Development

pip install -e ".[dev]"
pytest tests/ -v

License

MIT

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

plato_core-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

plato_core-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plato_core-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for plato_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a05ddf90641c91340f41a4698a0b8755d871cb967d68f3a97feed9f48eb64e5f
MD5 aced3665e04c82fa459773a7a7755afb
BLAKE2b-256 098d00f291bf1a33762f724681da6446e69a81995a1c2f464e4c3a004035f665

See more details on using hashes here.

File details

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

File metadata

  • Download URL: plato_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for plato_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1da6f50e64b302c3d61a911b9e54d850b7db6f41eadb4108a6feb0ffeb0f7a68
MD5 c36ccaedcfe46985d7414c0e742d9523
BLAKE2b-256 8673413e80c952ad6bf7e0c4d3f7382d1f79e5944056a6f1f2b514c9cecf8c23

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