Cynex trajectory viewer integration for MLflow
Project description
mlflow-cynex
Cynex trajectory viewer integration for MLflow. Adds a "View in Cynex" button to MLflow's artifact browser for trajectory JSON files.
Installation
pip install mlflow-cynex
mlflow-cynex install
Then restart your MLflow server.
Usage
Logging Trajectories
The package provides a helper function to log trajectories to MLflow:
from mlflow_cynex import log_trajectory
import mlflow
mlflow.set_tracking_uri("http://localhost:5000")
with mlflow.start_run():
trajectory = {
"blue_agent_name": "PPO",
"red_agent_name": "Meander",
"episode": 0,
"blue_actions": [...],
"red_actions": [...],
"metric_scores": [...],
"network_topology": {...}
}
log_trajectory(trajectory)
The trajectory is automatically:
- Validated against the expected schema
- Saved to
trajectories/<name>-trajectory.jsonin MLflow artifacts
Custom Naming
log_trajectory(trajectory, name="my-custom-name")
# Saved as: trajectories/my-custom-name.json
Validation Only
from mlflow_cynex import validate_trajectory, TrajectoryValidationError
try:
validate_trajectory(data)
except TrajectoryValidationError as e:
print(f"Invalid trajectory: {e}")
Trajectory Detection
The "View in Cynex" button appears for JSON files that:
- Are in a
trajectories/folder, OR - Match
*-trajectory.jsonor*_trajectory.jsonpattern
CLI Commands
mlflow-cynex install # Install Cynex viewer into MLflow
mlflow-cynex uninstall # Remove Cynex viewer from MLflow
mlflow-cynex status # Check installation status
Development
Build from source:
cd cynex/mlflow-integration
./scripts/build.sh
pip install dist/mlflow_cynex-*.whl
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 mlflow_cynex-0.1.11.tar.gz.
File metadata
- Download URL: mlflow_cynex-0.1.11.tar.gz
- Upload date:
- Size: 759.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
351d3febfccdf9760617329268ce2fe97920303be9f3cdcd3a2452475b8c856b
|
|
| MD5 |
9396c5da08c46958a910bab6a1cfcb5b
|
|
| BLAKE2b-256 |
1e0f24b970d11a71fc00c82046895b380706a995513cfae4bb31a1e7f85ffc4d
|
Provenance
The following attestation bundles were made for mlflow_cynex-0.1.11.tar.gz:
Publisher:
publish-mlflow-cynex.yml on PaulHax/cynex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlflow_cynex-0.1.11.tar.gz -
Subject digest:
351d3febfccdf9760617329268ce2fe97920303be9f3cdcd3a2452475b8c856b - Sigstore transparency entry: 1288511134
- Sigstore integration time:
-
Permalink:
PaulHax/cynex@d859740c81b8fffed8f65f42dc6297297e4bce4b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PaulHax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mlflow-cynex.yml@d859740c81b8fffed8f65f42dc6297297e4bce4b -
Trigger Event:
push
-
Statement type:
File details
Details for the file mlflow_cynex-0.1.11-py3-none-any.whl.
File metadata
- Download URL: mlflow_cynex-0.1.11-py3-none-any.whl
- Upload date:
- Size: 764.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70a2b4e0fe090d243e11aeb3aae5defc7dddcd9f320edfe095e9152fd04a680b
|
|
| MD5 |
08d04d07fa48c0d6b5709d373b1cd7fe
|
|
| BLAKE2b-256 |
52333216a8518799488c759c661b752ddc2b32108ef6f354e50cec1fb5aa9a28
|
Provenance
The following attestation bundles were made for mlflow_cynex-0.1.11-py3-none-any.whl:
Publisher:
publish-mlflow-cynex.yml on PaulHax/cynex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlflow_cynex-0.1.11-py3-none-any.whl -
Subject digest:
70a2b4e0fe090d243e11aeb3aae5defc7dddcd9f320edfe095e9152fd04a680b - Sigstore transparency entry: 1288511224
- Sigstore integration time:
-
Permalink:
PaulHax/cynex@d859740c81b8fffed8f65f42dc6297297e4bce4b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PaulHax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mlflow-cynex.yml@d859740c81b8fffed8f65f42dc6297297e4bce4b -
Trigger Event:
push
-
Statement type: