project-cli-and-sessions
Create and manage Kedro projects through the CLI, project metadata, settings, sessions, packaging, notebooks, and safe diagnostics.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- project-cli-and-sessions
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Create and manage Kedro projects through the CLI, project metadata, settings, sessions, packaging, notebooks, and safe diagnostics.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/cli-reference.md8.9 KB
- 参考文档references/project-workflows.md9.4 KB
- 参考文档references/sessions-and-context.md9.2 KB
- 参考文档references/troubleshooting.md11.4 KB
- 脚本scripts/kedro_cli_probe.py3.7 KB
03 SKILL.md 正文
Project CLI and Sessions
Use this sub-skill when a task is about creating a Kedro project, identifying whether a directory is a Kedro project, using global or project-specific kedro commands, configuring project metadata/settings, bootstrapping a project for Python code, using KedroSession, packaging a project, or opening project-aware IPython/Jupyter sessions.
Route Here
- Create projects with
kedro new,--config,--tools,--example,--starter,--checkout,--directory, or--telemetry. - Diagnose CLI command availability, project detection,
pyproject.tomlmetadata, project layout, starter/template behavior, and telemetry prompts. - Use
bootstrap_project(),configure_project(),KedroSession.create(),session.load_context(), projectsettings.py,kedro package,kedro ipython, orkedro jupyter. - Prepare a packaged-project command such as
python -m <package_name>or programmatic package-mode startup.
Route Elsewhere
- Pipeline graph authoring,
node(),Pipeline,pipeline(), namespacing, tags, orkedro pipeline create/deletedesign choices: read pipelines and nodes. kedro runexecution semantics, runner selection, node slicing, resume, andKedroSession.run()filtering behavior: read runners and execution.- Catalog, credentials, parameters, config loaders, and data/config validation: read data catalog and config.
- Hooks, plugins, custom CLI commands, custom datasets, and extension entry points: read hooks and extensions.
- Inspection snapshots or optional HTTP server behavior: read inspection and server.
- Package-wide install/import or router guidance: read the Kedro root skill.
Current Facts
- Kedro version target:
1.4.0; distribution and import name:kedro; Python requirement:>=3.10. - Console script:
kedro = kedro.framework.cli:main;python -m kedrois also supported. - Global commands include
info,new, andstarter; project commands includecatalog,ipython,jupyter,package,pipeline,registry,run, andserver. KedroSession.create(project_path=None, save_on_close=True, env=None, runtime_params=None, conf_source=None)creates a one-successful-run session.bootstrap_project(project_path)reads project metadata, adds the source directory to import paths, and callsconfigure_project(package_name).configure_project(package_name, preserve_logging=False)configures settings, pipeline registry, package name, and project logging for package mode.
Reference Map
- Read CLI reference for exact global/project commands,
kedro newflags, project command routing, telemetry-safe command forms, and optional notebook dependencies. - Read project workflows for project creation, starter/template choices, metadata/layout requirements, settings defaults, packaging, and notebook/IPython workflows.
- Read sessions and context for
bootstrap_project(),configure_project(),KedroSession, context loading, runtime parameters, config source overrides, and package-mode startup. - Read troubleshooting when CLI commands are missing, project detection fails, starter creation errors, settings/session/bootstrap fails, optional dependencies are absent, or telemetry prompts block automation.
- Run kedro_cli_probe.py to perform safe
kedro --version,kedro --help, andkedro infochecks with telemetry opt-out and a read-only current-directory Kedro project probe.
Fast Patterns
- Prefer telemetry-safe probes in automated workflows:
KEDRO_DISABLE_TELEMETRY=1 kedro --version,KEDRO_DISABLE_TELEMETRY=1 kedro --help, andKEDRO_DISABLE_TELEMETRY=1 kedro info. - Create a non-interactive project with explicit choices:
KEDRO_DISABLE_TELEMETRY=1 kedro new --name="My Project" --tools=lint,test --example=n --telemetry=no. - Use starters only when Git/network access is acceptable, or use a local starter path; official aliases and remote VCS starters may invoke Cookiecutter/Git.
- Check project detection before project commands: Kedro looks for
pyproject.tomlcontaining[tool.kedro]in the current directory or a parent directory. - For Python scripts outside a project command, call
bootstrap_project(project_root)beforeKedroSession.create(project_path=project_root). - For installed package mode, call
configure_project(package_name, preserve_logging=True)when repeated configuration must not remove runtime logging handlers.
Safety Notes
kedro newwrites a new project directory; run it from the intended parent directory or pass an explicitoutput_dirthrough a config file.--starter,--tools=pyspark, or--example=yesmay fetch templates through Git/Cookiecutter; warn users before networked or remote-template workflows.kedro packagebuilds artifacts underdist/and requires packaging tools such asbuild; it also archives configuration while excludinglocal/*.yml.kedro ipythonandkedro jupyterrequire optional interactive dependencies; missing modules are an install issue, not a project-detection issue.
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).