Skip to main content

MLens Proto

Protobuf schemas and generated packages for simple, fast experiment tracking. Use the prebuilt packages (npm/PyPI) or generate code for your language of choice.

What’s inside

  • Minimal, pragmatic schema (mlens.v1):
    • Experiment and Run metadata
    • Params (string key/value)
    • Scalar metrics (step, timestamp, value)
    • Append-only RunEvent stream (param_set, metric)

File layout:

  • mlens_proto/proto/common.proto
  • mlens_proto/proto/experiment.proto
  • mlens_proto/proto/events.proto

Install (prebuilt packages)

JavaScript/TypeScript:

npm i @melikbugra/mlens-proto

Python:

pip install mlens-proto

QA (pre-release) builds may be published under the next tag for npm and TestPyPI for Python.

Quick usage

TypeScript:

import { ExperimentMeta, RunMeta, RunEvent } from '@melikbugra/mlens-proto';

const exp: ExperimentMeta = { experimentId: 'exp-1', name: 'Demo', createdAt: Math.floor(Date.now()/1000) };

Python:

from mlens_proto.proto import experiment_pb2 as exp_pb

exp = exp_pb.ExperimentMeta(experiment_id='exp-1', name='Demo', created_at=1700000000)

Generate code yourself

Python:

python -m pip install grpcio-tools protobuf
python -m grpc_tools.protoc \
  -I mlens_proto/proto \
  --python_out=src \
  mlens_proto/proto/*.proto

TypeScript (ts-proto):

npm i -D ts-proto protobufjs
protoc \
  -I mlens_proto/proto \
  --ts_proto_out=src/gen \
  --ts_proto_opt=esModuleInterop=true,outputServices=none,env=node \
  mlens_proto/proto/*.proto
npm run build

Versioning and CI/CD

  • develop → QA:
    • Semantic version bump (no tag), build and publish to TestPyPI and npm with next dist-tag (if NPM_TOKEN is provided)
  • main → tag:
    • Creates a git tag (semantic version)
  • tag → Prod publish:
    • Publishes to PyPI (Trusted Publisher) and npm (latest)

Set up:

  • PyPI/TestPyPI Trusted Publisher: Link this repo to PyPI/TestPyPI via OIDC (no tokens needed).
  • NPM publish: Add NPM_TOKEN (Automation token) to repo secrets.

License

MIT

Metadata

Release files for mlens-proto 1.0.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 mlens-proto 1.0.0
File Size Uploaded Provenance Actions
mlens_proto-1.0.0.tar.gz 3.5 kB With provenance Details for mlens_proto-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mlens-proto 1.0.0
File Interpreter ABI Platform Actions
mlens_proto-1.0.0-py3-none-any.whl Python 3 none any Details for mlens_proto-1.0.0-py3-none-any.whl

Total release size: 8.6 kB

Release files / mlens_proto-1.0.0.tar.gz

Download URL mlens_proto-1.0.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8d807c12598d0c246e2d2f3a186fcef015b7c3a63840bd0a3f4433b1705a9ac2
BLAKE2b-256 checksum
How to use checksums
6a756eccd90ecc452380d1f9229254fa1e9062f7926b6d8043203cede2302c6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 18, 2025.

Transparency log

Release files / mlens_proto-1.0.0-py3-none-any.whl

Download URL mlens_proto-1.0.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd4734304eaec26d4e63977a09ebef54ea503909039e4725d6a1deae10ff3526
BLAKE2b-256 checksum
How to use checksums
534630610db13d0a5b92b6c1981598decc5c7e8ff7e6698ce83454fa3ced18fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 18, 2025.

Transparency log

Security for mlens-proto 1.0.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mlens_proto-1.0.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 Oct 18, 2025.

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

1.0.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