MLens Protobuf schemas generated Python package
Project description
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.protomlens_proto/proto/experiment.protomlens_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
nextdist-tag (if NPM_TOKEN is provided)
- Semantic version bump (no tag), build and publish to TestPyPI and npm with
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlens_proto-1.0.0.tar.gz.
File metadata
- Download URL: mlens_proto-1.0.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d807c12598d0c246e2d2f3a186fcef015b7c3a63840bd0a3f4433b1705a9ac2
|
|
| MD5 |
ac9381ed57f34fbb92cb536741893beb
|
|
| BLAKE2b-256 |
6a756eccd90ecc452380d1f9229254fa1e9062f7926b6d8043203cede2302c6e
|
Provenance
The following attestation bundles were made for mlens_proto-1.0.0.tar.gz:
Publisher:
publish-on-tag.yml on melikbugra/mlens-proto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlens_proto-1.0.0.tar.gz -
Subject digest:
8d807c12598d0c246e2d2f3a186fcef015b7c3a63840bd0a3f4433b1705a9ac2 - Sigstore transparency entry: 620867910
- Sigstore integration time:
-
Permalink:
melikbugra/mlens-proto@41366a473dcdc2250d4cb97f08dd1507a533975b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/melikbugra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-on-tag.yml@41366a473dcdc2250d4cb97f08dd1507a533975b -
Trigger Event:
push
-
Statement type:
File details
Details for the file mlens_proto-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mlens_proto-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd4734304eaec26d4e63977a09ebef54ea503909039e4725d6a1deae10ff3526
|
|
| MD5 |
9299a7e02b16d063dcff7f9728005f2b
|
|
| BLAKE2b-256 |
534630610db13d0a5b92b6c1981598decc5c7e8ff7e6698ce83454fa3ced18fc
|
Provenance
The following attestation bundles were made for mlens_proto-1.0.0-py3-none-any.whl:
Publisher:
publish-on-tag.yml on melikbugra/mlens-proto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlens_proto-1.0.0-py3-none-any.whl -
Subject digest:
cd4734304eaec26d4e63977a09ebef54ea503909039e4725d6a1deae10ff3526 - Sigstore transparency entry: 620867920
- Sigstore integration time:
-
Permalink:
melikbugra/mlens-proto@41366a473dcdc2250d4cb97f08dd1507a533975b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/melikbugra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-on-tag.yml@41366a473dcdc2250d4cb97f08dd1507a533975b -
Trigger Event:
push
-
Statement type: