Skip to main content

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.json in 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.json or *_trajectory.json pattern

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlflow_cynex-0.1.4.tar.gz (740.1 kB view details)

Uploaded Source

Built Distribution

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

mlflow_cynex-0.1.4-py3-none-any.whl (744.7 kB view details)

Uploaded Python 3

File details

Details for the file mlflow_cynex-0.1.4.tar.gz.

File metadata

  • Download URL: mlflow_cynex-0.1.4.tar.gz
  • Upload date:
  • Size: 740.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mlflow_cynex-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c6db7dccdd2992e76764c4308e19b6bb6a6611a3586c09ead10ce91748df54c1
MD5 f3c34303b5a64404e2178d35aca5b10b
BLAKE2b-256 c476910bb8a5a5f6ada9536ebaab86541b7fdb1e64efcc20d2d6db7ec9c8c439

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlflow_cynex-0.1.4.tar.gz:

Publisher: publish-mlflow-cynex.yml on PaulHax/cynex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mlflow_cynex-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: mlflow_cynex-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 744.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mlflow_cynex-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eff064efba2d0cc8756fd1e5f9d7438bfc44cd2713047be4d91237b45d6482a9
MD5 d4bcdcd4bd2e9fd155532a6fd4ec725f
BLAKE2b-256 98b0938d55ce8ed24c80d100705ad511740e8b29e62e2b52e034d92a6e0604db

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlflow_cynex-0.1.4-py3-none-any.whl:

Publisher: publish-mlflow-cynex.yml on PaulHax/cynex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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