Integrations
Inferpathio is designed to layer on top of your existing ML infrastructure. These guides walk through connecting each supported tool.
MLflow
Connect MLflow artifact runs to Inferpathio governance without changing your existing training code.
mlflow_integration.py
import mlflow
import inferpathio as ifp
with mlflow.start_run() as mlflow_run:
with ifp.governance_run(model_id='fraud-detector-v2') as gov:
# Your existing MLflow training code
mlflow.log_param("n_estimators", 100)
mlflow.sklearn.log_model(model, "model")
# Link MLflow run to governance event
gov.link_mlflow_run(mlflow_run.info.run_id)
gov.set_policy("production-strict")
SageMaker
Connect SageMaker inference endpoints to Inferpathio drift monitoring via the SageMaker Data Capture feature.
sagemaker_setup.py
from inferpathio.integrations import SageMakerConnector
connector = SageMakerConnector(
endpoint_name="fraud-detector-prod",
model_id="fraud-detector-v2",
policy="production-strict"
)
# Enable data capture on your endpoint
connector.enable_monitoring(
capture_percentage=100,
s3_bucket="my-ml-data-lake"
)
GitHub Actions
Fire Inferpathio governance events from your existing GitHub Actions training workflows.
.github/workflows/retrain.yml
on:
repository_dispatch:
types: [retrain-approved]
jobs:
retrain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Train model
run: python train.py
env:
INFERPATH_KEY: ${{ secrets.INFERPATH_KEY }}
GOVERNANCE_RUN_ID: ${{ github.event.client_payload.run_id }}
Airflow
Use the Inferpathio Airflow operator to notify governance on DAG completion events.
dags/retrain_dag.py
from inferpathio.integrations.airflow import GovernanceCompleteOperator
# Add at end of retrain DAG
notify_governance = GovernanceCompleteOperator(
task_id='notify_governance',
model_id='fraud-detector-v2',
run_id='{{ ti.xcom_pull("start_governance") }}'
)