inspection-and-server
Inspect Kedro projects with read-only snapshots and troubleshoot the optional HTTP server API without confusing inspection with execution.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- inspection-and-server
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Inspect Kedro projects with read-only snapshots and troubleshoot the optional HTTP server API without confusing inspection with execution.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/inspection-api.md6.4 KB
- 参考文档references/server-api.md6.1 KB
- 参考文档references/troubleshooting.md7.5 KB
03 SKILL.md 正文
Inspection and Server
Use this sub-skill when a task is about reading Kedro project structure without running the pipeline, using kedro.inspection.get_project_snapshot, interpreting snapshot dataclasses, calling the optional HTTP /snapshot API, or troubleshooting kedro server start dependency/startup failures.
Route Here
- Produce a read-only summary of project metadata, registered pipelines, nodes, datasets, and parameter keys.
- Use
from kedro.inspection import get_project_snapshotwithproject_path,env,conf_source, or precomputedmetadata. - Interpret
ProjectSnapshot,ProjectMetadataSnapshot,PipelineSnapshot,NodeSnapshot, andDatasetSnapshotfields. - Use
GET /healthorGET /snapshotfrom the optional FastAPI server, or diagnosecreate_http_server()andkedro server startsetup. - Explain server request/response schemas, strict validation, runner allowlisting, session reuse, and read-only versus run-capable endpoints.
Route Elsewhere
- Project creation, project detection, global/project CLI command availability,
bootstrap_project(),KedroSession.create(), or telemetry-safe CLI probing: read project CLI and sessions. - Actual pipeline execution through
kedro run,KedroSession.run(), runner choice, slicing, load versions, or only-missing-output behavior: read runners and execution. - Pipeline graph authoring,
node(),Pipeline, namespacing, tags, or pipeline registry design: read pipelines and nodes. - Catalog YAML, credentials, dataset factories,
OmegaConfigLoader, parameters, or config validation: read data catalog and config. - Custom hooks, plugins, custom server routes, middleware, deployment wrappers, or serving customization: read hooks and extensions.
- Package-wide install/import checks and top-level routing: read the Kedro root skill.
Current Facts
- Kedro version target:
1.4.0; distribution and import name:kedro; Python requirement:>=3.10. - Public inspection entry point:
kedro.inspection.get_project_snapshot(project_path=None, env=None, conf_source=None, metadata=None). - Inspection snapshots are read-only: they bootstrap/load project metadata, pipeline definitions, catalog configuration, and parameter keys, but do not load datasets, execute nodes, or write outputs.
- Snapshot dataclasses are
ProjectSnapshot,ProjectMetadataSnapshot,PipelineSnapshot,NodeSnapshot, andDatasetSnapshotfromkedro.inspection.models. - Optional server entry point:
from kedro.server import create_http_server; CLI command:kedro server startfrom inside a Kedro project. - The
serveroptional extra installsfastapianduvicornand depends on Kedro'spydanticextra; missing optional packages are expected if only base Kedro is installed. - Server endpoints include
GET /health,GET /snapshot, andPOST /run; only/snapshotis read-only, while/runexecutes project code.
Reference Map
- Read inspection API for
get_project_snapshot()usage, snapshot fields, environment/config-source handling, redaction behavior, and safe read-only summary patterns. - Read server API for optional dependency installation,
kedro server start,create_http_server(), endpoint schemas, session reuse, runner allowlisting, and security boundaries. - Read troubleshooting when imports fail, optional dependencies are missing, project paths or environments are invalid, snapshots return empty or failed sections, server startup fails, or
/runis accidentally used for inspection.
Fast Patterns
-
Inspect from Python without running nodes:
from kedro.inspection import get_project_snapshot snapshot = get_project_snapshot(project_path=".", env="local") print(snapshot.metadata.project_name) print([pipeline.name for pipeline in snapshot.pipelines]) -
Reuse project bootstrap metadata for repeated snapshots:
from kedro.framework.startup import bootstrap_project from kedro.inspection import get_project_snapshot metadata = bootstrap_project(".") local_snapshot = get_project_snapshot(metadata=metadata) staging_snapshot = get_project_snapshot(metadata=metadata, env="staging") -
Use a telemetry-safe optional server check only when the server extra is installed and a short-lived local service is acceptable:
KEDRO_DISABLE_TELEMETRY=1 kedro server start --host 127.0.0.1 --port 8000. -
Prefer
GET /snapshotfor HTTP inspection; avoidPOST /rununless the user explicitly wants execution and has accepted dataset/code side effects.
Safety Notes
- Snapshot APIs can import project code and read configuration files, so treat them as read-only introspection rather than a no-import static parser.
- Dataset file paths in
DatasetSnapshot.filepathmay reveal storage layout; URI credentials embedded asscheme://user:password@hostare redacted, but do not print arbitrary config values or secrets. kedro server startstarts a long-running local service and may execute pipeline code through/run; do not expose it publicly without authentication, authorization, request isolation, and network controls.- Use
KEDRO_DISABLE_TELEMETRY=1orDO_NOT_TRACK=1for automated CLI probes when telemetry must be disabled.
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).