LogoLogo
Python SDKSlack
  • Documentation
  • Cookbooks
  • Self-Hosting
  • Release Notes
  • Reference
  • Arize AI
  • Quickstarts
  • โœจArize Copilot
  • Arize AI for Agents
  • Concepts
    • Agent Evaluation
    • Tracing
      • What is OpenTelemetry?
      • What is OpenInference?
      • Openinference Semantic Conventions
    • Evaluation
  • ๐ŸงชDevelop
    • Quickstart: Experiments
    • Datasets
      • Create a dataset
      • Update a dataset
      • Export a dataset
    • Experiments
      • Run experiments
      • Run experiments with code
        • Experiments SDK differences in AX vs Phoenix
        • Log experiment results via SDK
      • Evaluate experiments
      • Evaluate experiment with code
      • CI/CD with experiments
        • Github Action Basics
        • Gitlab CI/CD Basics
      • Download experiment
    • Prompt Playground
      • Use tool calling
      • Use image inputs
      • Replay spans
      • Compare prompts side-by-side
      • Load a dataset into playground
      • Save playground outputs as an experiment
      • โœจCopilot: prompt builder
    • Playground Integrations
      • OpenAI
      • Azure OpenAI
      • AWS Bedrock
      • VertexAI
      • Custom LLM Models
    • Prompt Hub
  • ๐Ÿง Evaluate
    • Online Evals
      • Run evaluations in the UI
      • Run evaluations with code
      • Test LLM evaluator in playground
      • View task details & logs
      • โœจCopilot: Eval Builder
      • โœจCopilot: Eval Analysis
      • โœจCopilot: RAG Analysis
    • Experiment Evals
    • LLM as a Judge
      • Custom Eval Templates
      • Arize Templates
        • Agent Tool Calling
        • Agent Tool Selection
        • Agent Parameter Extraction
        • Agent Path Convergence
        • Agent Planning
        • Agent Reflection
        • Hallucinations
        • Q&A on Retrieved Data
        • Summarization
        • Code Generation
        • Toxicity
        • AI vs Human (Groundtruth)
        • Citation
        • User Frustration
        • SQL Generation
    • Code Evaluations
    • Human Annotations
  • ๐Ÿ”ญObserve
    • Quickstart: Tracing
    • Tracing
      • Setup tracing
      • Trace manually
        • Trace inputs and outputs
        • Trace function calls
        • Trace LLM, Retriever and Tool Spans
        • Trace prompt templates & variables
        • Trace as Inferences
        • Send Traces from Phoenix -> Arize
        • Advanced Tracing (OTEL) Examples
      • Add metadata
        • Add events, exceptions and status
        • Logging Latent Metadata
        • Add attributes, metadata and tags
        • Send data to a specific project
        • Get the current span context and tracer
      • Configure tracing options
        • Configure OTEL tracer
        • Mask span attributes
        • Redact sensitive data from traces
        • Instrument with OpenInference helpers
      • Query traces
        • Filter Traces
          • Time Filtering
        • Export Traces
        • โœจAI Powered Search & Filter
        • โœจAI Powered Trace Analysis
        • โœจAI Span Analysis & Evaluation
    • Tracing Integrations
      • OpenAI
      • OpenAI Agents SDK
      • LlamaIndex
      • LlamaIndex Workflows
      • LangChain
      • LangGraph
      • Hugging Face smolagents
      • Autogen
      • Google GenAI (Gemini)
      • Model Context Protocol (MCP)
      • Vertex AI
      • Amazon Bedrock
      • Amazon Bedrock Agents
      • MistralAI
      • Anthropic
      • Agno
      • LangFlow
      • Haystack
      • LiteLLM
      • CrewAI
      • Groq
      • DSPy
      • Guardrails AI
      • Prompt flow
      • Vercel AI SDK
      • Pydantic AI
      • Portkey
      • Mastra
      • Llama
      • Together AI
      • OpenTelemetry (arize-otel)
      • BeeAI
    • Evals on Traces
    • Guardrails
    • Sessions
    • Dashboards
      • Dashboard Widgets
      • Tracking Token Usage
      • โœจCopilot: Dashboard Widget Creation
    • Monitors
      • Integrations: Monitors
        • Slack
          • Manual Setup
        • OpsGenie
        • PagerDuty
      • LLM Red Teaming
    • Custom Metrics & Analytics
      • Arize Query Language Syntax
        • Conditionals and Filters
        • All Operators
        • All Functions
      • Custom Metric Examples
      • โœจCopilot: ArizeQL Generator
  • ๐Ÿ“ˆMachine Learning
    • Machine Learning
      • User Guide: ML
      • Quickstart: ML
      • Concepts: ML
        • What Is A Model Schema
        • Delayed Actuals and Tags
        • ML Glossary
      • How To: ML
        • Upload Data to Arize
          • Pandas SDK Example
          • Local File Upload
            • File Upload FAQ
          • Table Ingestion Tuning
          • Wildcard Paths for Cloud Storage
          • Troubleshoot Data Upload
          • Sending Data FAQ
        • Monitors
          • ML Monitor Types
          • Configure Monitors
            • Notifications Providers
          • Programmatically Create Monitors
          • Best Practices for Monitors
        • Dashboards
          • Dashboard Widgets
          • Dashboard Templates
            • Model Performance
            • Pre-Production Performance
            • Feature Analysis
            • Drift
          • Programmatically Create Dashboards
        • Performance Tracing
          • Time Filtering
          • โœจCopilot: Performance Insights
        • Drift Tracing
          • โœจCopilot: Drift Insights
          • Data Distribution Visualization
          • Embeddings for Tabular Data (Multivariate Drift)
        • Custom Metrics
          • Arize Query Language Syntax
            • Conditionals and Filters
            • All Operators
            • All Functions
          • Custom Metric Examples
          • Custom Metrics Query Language
          • โœจCopilot: ArizeQL Generator
        • Troubleshoot Data Quality
          • โœจCopilot: Data Quality Insights
        • Explainability
          • Interpreting & Analyzing Feature Importance Values
          • SHAP
          • Surrogate Model
          • Explainability FAQ
          • Model Explainability
        • Bias Tracing (Fairness)
        • Export Data to Notebook
        • Automate Model Retraining
        • ML FAQ
      • Use Cases: ML
        • Binary Classification
          • Fraud
          • Insurance
        • Multi-Class Classification
        • Regression
          • Lending
          • Customer Lifetime Value
          • Click-Through Rate
        • Timeseries Forecasting
          • Demand Forecasting
          • Churn Forecasting
        • Ranking
          • Collaborative Filtering
          • Search Ranking
        • Natural Language Processing (NLP)
        • Common Industry Use Cases
      • Integrations: ML
        • Google BigQuery
          • GBQ Views
          • Google BigQuery FAQ
        • Snowflake
          • Snowflake Permissions Configuration
        • Databricks
        • Google Cloud Storage (GCS)
        • Azure Blob Storage
        • AWS S3
          • Private Image Link Access Via AWS S3
        • Kafka
        • Airflow Retrain
        • Amazon EventBridge Retrain
        • MLOps Partners
          • Algorithmia
          • Anyscale
          • Azure & Databricks
          • BentoML
          • CML (DVC)
          • Feast
          • Google Cloud ML
          • Hugging Face
          • LangChain ๐Ÿฆœ๐Ÿ”—
          • MLflow
          • Neptune
          • Paperspace
          • PySpark
          • Ray Serve (Anyscale)
          • SageMaker
            • Batch
            • RealTime
            • Notebook Instance with Greater than 20GB of Data
          • Spell
          • UbiOps
          • Weights & Biases
      • API Reference: ML
        • Python SDK
          • Pandas Batch Logging
            • Client
            • log
            • Schema
            • TypedColumns
            • EmbeddingColumnNames
            • ObjectDetectionColumnNames
            • PromptTemplateColumnNames
            • LLMConfigColumnNames
            • LLMRunMetadataColumnNames
            • NLP_Metrics
            • AutoEmbeddings
            • utils.types.ModelTypes
            • utils.types.Metrics
            • utils.types.Environments
          • Single Record Logging
            • Client
            • log
            • TypedValue
            • Ranking
            • Multi-Class
            • Object Detection
            • Embedding
            • LLMRunMetadata
            • utils.types.ModelTypes
            • utils.types.Metrics
            • utils.types.Environments
        • Java SDK
          • Constructor
          • log
          • bulkLog
          • logValidationRecords
          • logTrainingRecords
        • R SDK
          • Client$new()
          • Client$log()
        • Rest API
    • Computer Vision
      • How to: CV
        • Generate Embeddings
          • How to Generate Your Own Embedding
          • Let Arize Generate Your Embeddings
        • Embedding & Cluster Analyzer
        • โœจCopilot: Embedding Summarization
        • Similarity Search
        • Embedding Drift
        • Embeddings FAQ
      • Integrations: CV
      • Use Cases: CV
        • Image Classification
        • Image Segmentation
        • Object Detection
      • API Reference: CV
Powered by GitBook

Support

  • Chat Us On Slack
  • support@arize.com

Get Started

  • Signup For Free
  • Book A Demo

Copyright ยฉ 2025 Arize AI, Inc

On this page
  • Creating a Dashboard Using a Template
  • Create an Empty Dashboard
  • Add a Distribution Widget
  • Add a Time Series Widget
  • Add a Drift Widget
  • Add a Monitor Widget
  • Add a Statistic Widget
  • Add a Text Widget
  • Examples

Was this helpful?

  1. Machine Learning
  2. Machine Learning
  3. How To: ML
  4. Dashboards

Programmatically Create Dashboards

For most users, the Arize platformโ€™s user interface (UI) offers the optimal experience for creating dashboards. The UI provides a live preview of your dashboard, making it easy to visualize changes as you add widgets. Moreover, with Arizeโ€™s customizable dashboard templates, you can quickly tailor dashboards to suit your specific requirements.

However, there are scenarios where programmatically creating dashboards might better serve your needs.If you aim to replicate a particular set of widgets across various dashboards, efficiently clone an entire dashboard, or integrate dashboard creation into your automated onboarding workflows, programmatic creation provides exceptional flexibility. This method allows you to handle custom and repeatable dashboard requirements effectively, providing a scalable solution for complex environments.

Creating a Dashboard Using a Template

Programmatically create a dashboard using one of our predefined templates, streamlining the setup process for common use cases

mutation create(
  $name:String!
  $modelId:ID!
  $template:DashboardTemplates!
  $postiveClass: String!
){
  createDashboardFromTemplate(input:
  {
    name:$name
    modelId:$modelId
    template: $template
    positiveClass: $postiveClass
  }
  ){
    dashboard{
      id
    }
  }
}

variables

{
  "name": "dashboard-name",
  "modelId": "model_id",
  "template": "templateName", 
  "postiveClass": "fraud"
}

Create an Empty Dashboard

When creating a new custom dashboard, you first need to create an empty state dashboard to add widgets to:

mutation createDashTest($name: String!, $spaceId: ID!) {
  createDashboard(input: { name: $name, spaceId: $spaceId }) {
    dashboard {
      id
    }
  }
}

This will return the dashboard id to use in mutations to add widgets.

Add a Distribution Widget

To visualize data variations and overall distribution patterns on your dashboard, use the createBarChartWidget mutation.

mutation createBarChartWidget(
  $title:String!
  $dashboardId:ID!
  $plots:[BarChartPlotInputInput!]!
){
  createBarChartWidget(
    input:
  {
    title:$title
    dashboardId: $dashboardId 
    plots: $plots
  }
  ){
    barChartWidget{
      id
    }
  }
}

variable

{
  "title": "widget-title",
  "dashboardId": "dashboard_id",
  "plots": [
    {
      "title": "plot-title",
      "position": 1,
      "modelId": "model_id",
      "dimension": {
        "id": "dimension_id",
        "name": "dimension_name",
        "dataType": "STRING"
      },
      "dimensionCategory": "featureLabel",
      "filters": [],
      "modelVersionIds": []
    }
  ]
}

Add a Time Series Widget

Use the createLineChartWidget to add a time series widget to your dashboard, which is perfect for visualizing performance over time, data quality, and analyzing trends with options to add multiple lines or split data by specific criteria.

mutation createLineChartWidget(
  $title:String!
  $dashboardId:ID!
  $plots:[LineChartPlotInputInput!]!
  $timeSeriesMetricType: TimeSeriesMetricCategory!
){
  createLineChartWidget(
    input:
  {
    title:$title
    timeSeriesMetricType: $timeSeriesMetricType
    dashboardId: $dashboardId 
    plots: $plots
    widgetType: lineChartWidget
  }
  ){
    lineChartWidget{
      id
    }
  }
}

variables

{
  "title": "widget-name",
  "dashboardId": "model_id",
  "timeSeriesMetricType": "evaluationMetric",
  "plots": {
    "modelId": "model_id",
    "modelVersionIds": [],
    "dimensionCategory": "prediction",
    "metric": "auc",
    "positiveClass": "fraud",
    "title": "AUC Over Time",
    "position": 1,
    "modelEnvironmentName": "production",
    "filters": []
    }
}
mutation createLineChartWidget(
  $title:String!
  $dashboardId:ID!
  $plots:[LineChartPlotInputInput!]!
  $timeSeriesMetricType: TimeSeriesMetricCategory!
){
  createLineChartWidget(
    input:
  {
    title:$title
    timeSeriesMetricType: $timeSeriesMetricType
    dashboardId: $dashboardId 
    plots: $plots
    widgetType: lineChartWidget
  }
  ){
    lineChartWidget{
      id
    }
  }
}

variables

{
  "title": "widget-name",
  "dashboardId": "dashboard_id",
  "timeSeriesMetricType": "evaluationMetric",
  "plots": {
    "modelId": "model_id",
    "modelVersionIds": [],
    "dimensionCategory": "featureLabel",
    "metric": "percentEmpty",
    "dimension": {
      "id": "dimension_id",
      "name": "dimension_name",
      "dataType": "STRING"
      },
    "title": "plot-title",
    "position": 1,
    "modelEnvironmentName": "production",
    "filters": []
  }
}
mutation createLineChartWidget(
  $title:String!
  $dashboardId:ID!
  $plots:[LineChartPlotInputInput!]!
  $timeSeriesMetricType: TimeSeriesMetricCategory!
){
  createLineChartWidget(
    input:
  {
    title:$title
    timeSeriesMetricType: $timeSeriesMetricType
    dashboardId: $dashboardId 
    plots: $plots
    widgetType: lineChartWidget
  }
  ){
    lineChartWidget{
      id
    }
  }
}

variables

{
  "title": "widget-name",
  "dashboardId": "dashboard_id",
  "timeSeriesMetricType": "evaluationMetric",
  "plots": [{
    "modelId": "model_id",
    "modelVersionIds": [],
    "dimensionCategory": "prediction",
    "metric": "auc",
    "positiveClass": "fraud",
    "title": "plot-1-title",
    "position": 1,
    "modelEnvironmentName": "production",
    "filters": []
  },
    {
    "modelId": "model_id",
    "modelVersionIds": [],
    "dimensionCategory": "prediction",
    "metric": "count",
    "positiveClass": "fraud",
    "title": "plot-2-title",
    "position": 2,
    "modelEnvironmentName": "production",
    "filters": []
    
  }
  ]
}
mutation createLineChartWidget(
  $title:String!
  $dashboardId:ID!
  $plots:[LineChartPlotInputInput!]!
  $timeSeriesMetricType: TimeSeriesMetricCategory!
){
  createLineChartWidget(
    input:
  {
    title:$title
    timeSeriesMetricType: $timeSeriesMetricType
    dashboardId: $dashboardId 
    plots: $plots
    widgetType: lineChartWidget
  }
  ){
    lineChartWidget{
      id
    }
  }
}

variables

{
  "title": "split-by-widget",
  "dashboardId": "dashboard_id",
  "timeSeriesMetricType": "evaluationMetric",
  "plots": [{
    "modelId": "model_id",
    "modelVersionIds": [],
    "dimensionCategory": "prediction",
    "metric": "auc",
    "positiveClass": "fraud",
    "title": "plot-name",
    "position": 1,
    "modelEnvironmentName": "production",
    "filters": [],
    "splitByEnabled": true,
    "splitByDimension": "state",
    "splitByDimensionCategory": "featureLabel",
    "cohorts": [
                    "state='CA'",
                    "state='CO'",
                    "state='NY'"
                  ]
  }
  ]
}

Add a Drift Widget

To effectively monitor data drift, utilize the createLineChartWidget mutation with the widgetType input set to driftLineChartWidget. Below is an example that demonstrates using the PSI. You also have the flexibility to opt for other statistical methods such as Jensen-Shannon distance (JS) or Kullback-Leibler (KL) divergence, depending on your analysis needs.

mutation createDriftWidget(
$title:String!
  $dashboardId:ID!
  $plots:[LineChartPlotInputInput!]!
  $timeSeriesMetricType: TimeSeriesMetricCategory!
){
  createLineChartWidget(
    input:
  {
    title:$title
    timeSeriesMetricType: $timeSeriesMetricType
    dashboardId: $dashboardId 
    plots: $plots
    widgetType: driftLineChartWidget
  }
  ){
    lineChartWidget{
      id
    }
  }
}

variables

{
  "title": "drift-widget-title",
  "dashboardId": "dashbaord_id",
  "timeSeriesMetricType": "evaluationMetric",
  "plots": [{
    "modelId": "model_id",
    "modelVersionIds": [],
    "dimensionCategory": "prediction",
    "metric": "psi",
    "title": "drift-plot-title",
    "position": 1,
    "modelEnvironmentName": "production",
    "filters": [],
    "comparisonDatasetModelBaselineId": "baseline_id" 
  }
  ]
}

To get your baselineId you can query your model:

query getBaseline($modelID:ID!){
  node(id: $modelID) {
    ... on Model {
      modelPrimaryBaseline{
        id
      }
    }
  }
}

Add a Monitor Widget

Visualize your monitors using a monitor widget.

mutation createMonitorChartWidget(
  $title:String!
  $dashboardId:ID!
  $monitorId: ID!
){
  createLineChartWidget(
    input:
  {
    title:$title
    timeSeriesMetricType: evaluationMetric
    dashboardId: $dashboardId 
    monitorId: $monitorId
    widgetType: monitorLineChartWidget
  }
  ){
    lineChartWidget{
      id
    }
  }
}

variables

{
  "title": "widget-title",
  "dashboardId": "dashboard_id",
  "monitorId": "monitor_id"
}

Add a Statistic Widget

Add a statistics widget that displays key metrics, tailored to focus on either performance indicators or data quality metrics. This widget provides a quick overview and valuable insights at a glance.

mutation createStatWidget(
  $title:String!
  $dashboardId:ID!
  $timeSeriesMetricType: TimeSeriesMetricCategory!
  $modelId:ID!
  $performanceMetric: PerformanceMetric
  $positiveClass:String!
  $filters: [StatisticWidgetFilterItemInput!]!
){
  createStatisticWidget(
    input:
  {
    dashboardId: $dashboardId
    title:$title
    timeSeriesMetricType:$timeSeriesMetricType
    modelId:$modelId
    performanceMetric:$performanceMetric
    positiveClass: $positiveClass
    filters:$filters
    modelVersionEnvironmentMetadataIds:[]
    modelVersionIds:[]
  })
  {
    statisticWidget{
      id
    }
  }
}

variables

{
  "title": "widget-title",
  "dashboardId": "dashboard_id",
  "timeSeriesMetricType": "modelDataMetric",
  "modelId": "model_id",
  "aggregation":"DQ Metric",
  "dimension":{
    "id":"dimension_id"
    "name": "dimension_name",
    "dataType": "dimension_datatype"
  },
  "dimensionCategory": "prediction",
  "filters": []
}
mutation createStatWidget(
  $title:String!
  $dashboardId:ID!
  $timeSeriesMetricType: TimeSeriesMetricCategory!
  $modelId:ID!
  $aggregation: DataQualityMetric
  $dimension:DimensionInput
  $dimensionCategory: DimensionCategory
  $filters: [StatisticWidgetFilterItemInput!]!

){
  createStatisticWidget(
    input:
  {
    dashboardId: $dashboardId
    title:$title
    timeSeriesMetricType:$timeSeriesMetricType
    modelId:$modelId
    aggregation:$aggregation
    dimensionCategory:$dimensionCategory
    dimension:$dimension
    filters:$filters
    creationStatus:published
    modelVersionEnvironmentMetadataIds:[]
    modelVersionIds:[]
  })
  {
    statisticWidget{
      id
    }
  }
}

variables

{
  "title": "widget-title",
  "dashboardId": "dashboard_id",
  "timeSeriesMetricType": "modelDataMetric",
  "modelId": "model_id",
  "aggregation":"count",
  "dimension":{
    "id":"dimension_id",
    "name": "dimesnion_name",
    "dataType": "dimension_datatype"
  },
  "dimensionCategory": "prediction",
  "filters": []
}

Add a Text Widget

Add a text widget to your dashboard to offer explanatory text, headings, or contextual information, enriching the dashboard's narrative and usability.

mutation createTextWidget(
  $title:String!
  $dashboardId:ID!
  $content:String!

){
  createTextWidget(
    input:
  {
    dashboardId: $dashboardId
    title:$title
    content: $content
    creationStatus:published
    
  })
  {
    textWidget{
      id
    }
  }
}

variables

{
  "title": "text-widget-title",
  "dashboardId": "dashboard_id",
  "content": "content for the text widget"
}

Examples

Use case
Example Colab

Create a custom dashboard

Copy an existing dashboard

Last updated 1 year ago

Was this helpful?

๐Ÿ“ˆ
Colab
Colab