What this enables: Run Arize AX experiment evaluations automatically as part of your Harness pipelines — on every PR, on a schedule, or on-demand. Catch regressions in accuracy, latency, and cost before they hit production.
Key Concepts
- Pipeline: An automated workflow defined in YAML, stored in your repo (
.harness/folder) or inline in the Harness platform. - Stages: Named groups of work. A CI pipeline uses a
CI(Build) stage type. - Steps: Individual tasks within a stage. The
Runstep executes shell commands or scripts. - Connectors: Harness integrations that connect to external systems — Git repos, Docker registries, secret managers.
- Triggers: How pipelines get kicked off — webhooks, cron schedules, or manual execution.
Prerequisites & Assumptions
This guide assumes:- A Harness account with a CI project configured. Your platform team has set up the org, project, and user access.
- A codebase connector pointing to your Git repo (GitHub, GitLab, Bitbucket). This is how Harness clones your code.
- Build infrastructure is configured. Harness Cloud (managed runners), a self-managed VM, or a Kubernetes cluster. This guide uses Harness Cloud — Python is pre-installed on those runners.
- Secrets are stored in Harness. Navigate to Project Settings → Secrets → New Secret → Secret Text and add
ARIZE_API_KEY,ARIZE_SPACE_ID, andARIZE_DATASET_ID. The pipeline YAML below references these by their secret IDs.
Coming from Jenkins? The main structural differences: pipeline config is YAML (not Groovy), triggers are defined in YAML or the Harness UI (not split across Jenkinsfile + job config), and secrets are referenced via<+secrets.getValue("ID")>(notcredentials()). The Python script that runs your experiment is identical — no changes needed.
Setting Up Your First Experiment Pipeline
Create a Pipeline YAML
You can create pipelines in the Harness Visual Editor or YAML Editor. Here’s the YAML for a CI pipeline that runs an Arize AX experiment:Breakdown
pipeline— Top-level block containing the full pipeline definition.properties.ci.codebase— Tells Harness which repo to clone.connectorRefpoints to your Git connector.<+input>means the branch/PR is resolved at runtime.stage.type: CI— Declares this as a CI (Build) stage.runtime.type: Cloud— Runs on Harness Cloud managed infrastructure. Python is pre-installed.steps— Sequential tasks.type: Runexecutes shell commands.envVariables— Injects secrets as environment variables.<+secrets.getValue("...")>pulls from the Harness secret store and masks values in logs.
Using a Docker image instead? Replace theplatformandruntimeblocks with aconnectorRefandimageon the step. You’ll need a Docker registry connector configured in Harness.
Trigger Options
Triggers in Harness can be configured in YAML or the Harness UI. They support webhooks, cron schedules, and manual execution.1. Webhook (Pull Request)
The most common setup. Harness listens for webhook events from your Git provider and runs the pipeline when a PR is opened or updated. Setup: In your Harness project, go to Triggers → New Trigger → Webhook. Select your Git connector, choose the event type (Pull Request), and optionally add file path conditions. Triggers can also be defined in YAML:Path filtering is built-in. ThechangedFilespayload condition scopes the trigger to only fire when files incopilot/are modified. This is pipeline-level filtering — unlike Jenkins’ stage-levelchangeset, the pipeline doesn’t start at all if the condition isn’t met.
2. Scheduled (Cron)
3. Manual Only
No trigger needed. Run the pipeline from the Harness UI by selecting your pipeline and clicking Run. You can also trigger via the Harness API.4. Pipeline Chaining
Use the Pipeline stage type to trigger one pipeline after another:More Mature Patterns
Once you have the basics working, here are patterns that become relevant as your experiment workflows grow.Parallel Evaluation Runs
Use astrategy.parallelism or strategy.matrix to run experiments against multiple models simultaneously:
Pipeline Templates
If multiple repos need the same experiment setup, create a Harness Pipeline Template. Templates are versioned, reusable, and can be scoped to the project, org, or account level.Notifications
Harness has built-in notification rules at the pipeline level. Add anotificationRules block to your pipeline YAML: