core-dashboard-build
Build, validate, run, and troubleshoot Vizro dashboards in Python or YAML using vizro-core models and the Vizro app wrapper.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- core-dashboard-build
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Build, validate, run, and troubleshoot Vizro dashboards in Python or YAML using vizro-core models and the Vizro app wrapper.
- disable-model-invocation
- true
03 SKILL.md 正文
Core Dashboard Build
Use this sub-skill when the task is to create, validate, run, deploy, or troubleshoot a Vizro dashboard at the dashboard/page/layout level.
Route elsewhere when the task is mainly about:
- Data, controls, actions, or component wiring:
../core-components-data-actions/SKILL.md. - Chart selection or Plotly figure code:
../charts-and-figures/SKILL.md. - Agent/MCP dashboard generation:
../mcp-agent-workflows/SKILL.md. - Repository tests/build tooling:
../repo-development-testing/SKILL.md.
Fast Path: Python dashboard
from vizro import Vizro
import vizro.models as vm
page = vm.Page(
title="Overview",
components=[
vm.Card(text="Hello Vizro"),
],
)
dashboard = vm.Dashboard(pages=[page], title="My dashboard")
app = Vizro().build(dashboard) # returns the Vizro wrapper
app.run(debug=True)
Important: Vizro().build() returns the Vizro wrapper. Use app.dash for raw Dash APIs, callback maps, index_string, server integration, or app title checks.
Fast Path: YAML dashboard
YAML examples load into the same Pydantic models:
from pathlib import Path
import yaml
from vizro import Vizro
from vizro.models import Dashboard
config = yaml.safe_load(Path("dashboard.yaml").read_text(encoding="utf-8"))
dashboard = Dashboard(**config)
Vizro().build(dashboard).run()
Use scripts/validate_vizro_dashboard.py dashboard.yaml to parse and build without starting a server.
Dashboard/page rules of thumb
- Build from
vm.Dashboard(pages=[...])andvm.Page(title=..., components=[...])first; add data, filters, actions, and charts after the skeleton validates. - Keep each page title unique and human-readable. The navigation layer derives behavior from pages and routes.
- Prefer documented Vizro models over raw Dash components for normal authoring; raw Dash components are useful for custom components only after model options are exhausted.
- Use Pydantic validation errors as a guide: they usually point to a wrong model field, wrong component type, or missing required nested object.
- If a page uses external assets, pass
assets_folderintoVizro(...)rather than relying on the current working directory.
Layout guidance
- Use Vizro containers/layout models for dashboard layout rather than manual Dash CSS when possible.
- Start with simple vertical page structure and introduce grids/tabs/containers only when the user asks for specific layout behavior.
- Existing e2e-flow layout knowledge in the repository favors task-driven layouts: prioritize dashboard purpose, page hierarchy, and scan order before styling details.
Validation and smoke checks
# Installed package smoke
python scripts/probe_vizro_environment.py
# Validate a YAML or Python dashboard without running a server
python scripts/validate_vizro_dashboard.py path/to/dashboard.yaml
python scripts/validate_vizro_dashboard.py path/to/app.py
For repository edits, use package-local tests from ../repo-development-testing/SKILL.md; do not start with full browser e2e unless the task actually touches browser behavior and Chrome/Chromium is available.
Evidence anchors
vizro-core/src/vizro/_vizro.py:Vizro,build,run, Dash app handling.vizro-core/src/vizro/models/_dashboard.py,_page.py: core model validation/build behavior.vizro-core/examples/tutorial/app.py: Python dashboard example.vizro-core/examples/dev/yaml_version/{app.py,dashboard.yaml}: YAML loading pattern.vizro-core/docs/pages/user-guides/{layouts,run-deploy}.mdand existingvizro-e2e-flowdashboard/YAML/layout skills.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).