setup-python-env
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSet Up Python Environment
设置 Python 环境
Bootstrap only. Direct packages this turn: , ,
, and plain . Skore supplies as a
mandatory dependency. Other stage libraries go through
.
ruffipythonipykernelskoreskore-skillsadd-python-package仅用于引导初始化。本轮直接安装的软件包:、、
和普通 。Skore 会将 作为
必需依赖提供。其他阶段性库通过
添加。
ruffipythonipykernelskoreskore-skillsadd-python-packageHuman-facing prose
面向用户的表述
Details: .
Ask which manager to use and whether we manage the env in
plain language. Do not name , skill ids, or the
wrapper CLI to the user. Do not mention .
setup-workspacereferences/human_facing_prose.mdG-ENV-MGRskore-skills详情: 。
用通俗语言询问使用哪个管理器,以及是否由我们管理该环境。
不要向用户提及 、skill ID 或 wrapper CLI。
不要提及 。
setup-workspacereferences/human_facing_prose.mdG-ENV-MGRskore-skillsLookup
查询
Run and first. Take the first row that
matches, then run Sequence steps 3–6 only where the row says ask
or continue. Do not stop after reading the table.
env detectstatus| Caller | | | Manager question | Managed question |
|---|---|---|---|---|
| dispatched | set | | skip | skip |
| dispatched | set | | skip | ask |
| dispatched | unset | | ask when detect is | skip |
| dispatched | unset | | ask when detect is | ask |
| standalone | any | any | ask when detect is | ask |
A standalone turn still asks when a manager is only recorded and
nothing is on disk yet ( is ). After the
questions this row allows: false stops at step 5;
runs step 6 (, , with
no , ).
env_manager"none"env.managedtrueenv initenv syncenv add-skore--modeenv verify首先运行 和 。找到第一个匹配的行,
然后仅按该行中标注为“询问”或“继续”的情况执行“顺序”
部分的第 3–6 步。不要在读取表格后直接停止。
env detectstatus| 调用方 | | | 管理器选择问题 | 环境托管问题 |
|---|---|---|---|---|
| 已调度 | 已设置 | | 跳过 | 跳过 |
| 已调度 | 已设置 | | 跳过 | 询问 |
| 已调度 | 未设置 | | 当 detect 为 | 跳过 |
| 已调度 | 未设置 | | 当 detect 为 | 询问 |
| 独立调用 | 任意 | 任意 | 当 detect 为 | 询问 |
即使仅记录了管理器且磁盘上尚无任何内容( 为
),独立调用轮次仍需询问。完成该行允许的询问后:
为 false 时在第 5 步停止;为 true 时执行第 6 步
(、、不带 的 、
)。
env_manager"none"env.managedenv initenv sync--modeenv add-skoreenv verifyNot this skill
不适用此 skill
A request to add a package outside , , ,
and plain is not bootstrap. Do not and do not
. Hand that package to the package-install step and
stop. The close names the package and that step in plain language.
Do not write the catalog id.
ruffipythonipykernelskoreenv initpixi add请求添加 、、 和普通 之外的
软件包不属于引导初始化。不要执行 ,也不要执行
。将该软件包交给软件包安装步骤并停止。
结束回复时,用通俗语言说明该软件包和对应步骤。
不要写入目录 ID。
ruffipythonipykernelskoreenv initpixi addSequence
顺序
-
and
python -m skore_skills env detect.status -
Whendispatched this turn, skip each question on its own.
setup-ml-projectset → do not ask which manager.policy.env_managerpolicy.env.managedortrue→ do not ask whether we manage the env. A recorded manager withfalsestill null still asks that one question. A recordedenv.managedwith noenv.manageddoes not reopen the managed question. A standalone request still asks, including when a manager is only recorded and nothing is on disk yet (policy.env_managerisenv_manager)."none" -
G-ENV-MGR. Skip when step 2 skipped it. Otherwise read the JSON fields, not sentinel strings: ask whenis
env_manager,"none"is true, orambiguousis true. Usemismatchas the ask order. PATH is not permission. Do notrecommended.curl | sh -
Skip when step 2 skipped it. Otherwise ask whether we manage the env (default yes). Persistor
python -m skore_skills policy set env.managed true.false -
Unmanaged: stop. Name ruff / ipython / ipykernel / skore; do not init. Do not mentionto the user.
skore-skills -
Managed:when it is not already recorded, then
policy set env_manager <manager>bashpython -m skore_skills env init --manager <manager> python -m skore_skills env sync --execute python -m skore_skills env add-skore --execute python -m skore_skills env verify --executeDo not pass. Omitting it installs for a recorded--modeorhubdestination, and plain Skore otherwise.mlflowIf the selected manager is pixi andalready exists, skippixi.toml; preserve that manifest and continue withenv init. Never replace it or try to addenv sync --executeto[tool.pixi].pyproject.tomlDo not hand-edit TOML. Do not run. Do not createpixi init. Do not ask where reports go. Plain Skore is the early install when no destination is recorded;src/upgrades it for Hub or MLflow after that choice is recorded. Do not passadd-python-package. If verify reports missing--mode localorskore, rerunskore_skillsthe same way; never addenv add-skore --executedirectly. If verify reports missing agent tools, loadskore-skillsfor ruff / ipython / ipykernel (agent feature) when that skill is installed, not a secondadd-python-package. Ifenv initis not installed, name ruff / ipython / ipykernel and stop.add-python-package
-
运行和
python -m skore_skills env detect。status -
当本轮由调度时,逐个跳过已有答案的 询问。
setup-ml-project已设置 → 不询问使用哪个管理器。policy.env_manager为policy.env.managed或true→ 不询问是否由我们 管理环境。已记录管理器但false仍为 null 时,仍需询问 该问题。已记录env.managed但没有env.managed时, 不重新询问托管问题。独立调用请求仍需询问,包括仅记录了 管理器且磁盘上尚无任何内容的情况(policy.env_manager为env_manager)。"none" -
G-ENV-MGR。 如果第 2 步已跳过本项,则跳过。否则读取 JSON 字段,而不是哨兵字符串:当为
env_manager、"none"为 true 或ambiguous为 true 时询问。 使用mismatch确定询问顺序。PATH 不是授权依据。 不要执行recommended。curl | sh -
如果第 2 步已跳过本项,则跳过。否则询问是否由我们管理 该环境(默认为“是”)。持久化或
python -m skore_skills policy set env.managed true。false -
未托管:停止。说明 ruff / ipython / ipykernel / skore; 不要初始化。不要向用户提及。
skore-skills -
托管:当尚未记录时执行,然后
policy set env_manager <manager>bashpython -m skore_skills env init --manager <manager> python -m skore_skills env sync --execute python -m skore_skills env add-skore --execute python -m skore_skills env verify --execute不要传入。省略该参数时,为已记录的--mode或hub目标安装,否则安装普通 Skore。mlflow如果选择的管理器是 pixi 且已存在,则跳过pixi.toml;保留该清单并继续执行env init。 绝不替换该清单,也不要尝试向env sync --execute添加pyproject.toml。[tool.pixi]不要手动编辑 TOML。不要运行。不要创建pixi init。 不要询问报告存放在哪里。未记录目标时,普通 Skore 是早期 安装项;记录该选择后,src/会将其升级为 Hub 或 MLflow 版本。不要传入add-python-package。 如果 verify 报告缺少--mode local或skore,以相同方式 重新运行skore_skills;绝不直接添加env add-skore --execute。如果 verify 报告缺少 Agent 工具,则在skore-skillsskill 已安装时加载它,以添加 ruff / ipython / ipykernel(Agent 功能),而不是第二次执行add-python-package。如果env init尚未安装,则说明 ruff / ipython / ipykernel 并停止。add-python-package
Return and close
返回与结束
When dispatched by , return to that caller after
verification. Standalone, run
. If JSON
is , load only if
is true and stop; that skill
returns to triage. If persist is missing, name the pending
paths and stop. Otherwise load only if
is true; else stop.
setup-ml-projectpython -m skore_skills git end-turn --stage setupactioninvokepersist-ml-gitstatus.skills.persist-ml-gitstagedtriage-ml-taskstatus.skills.triage-ml-task当由 调度时,验证后返回该调用方。独立调用时,
运行 。如果 JSON
的 为 ,仅当 为 true
时加载 并停止;该 skill 会返回分流环节。
如果缺少 persist,则列出待处理的 路径并停止。否则,仅当
为 true 时加载 ;
否则停止。
setup-ml-projectpython -m skore_skills git end-turn --stage setupactioninvokestatus.skills.persist-ml-gitpersist-ml-gitstagedstatus.skills.triage-ml-tasktriage-ml-taskThree environments
三种环境
Agent context only; do not narrate to the user.
skore-skills- default — project runtime; bootstrap installs plain , which supplies
skore, when the report destination is unset orskore-skills. A recordedlocalorhubdestination uses that install instead.mlflow - agent — ruff, ipython, ipykernel.
- dev — default + agent. Every later command uses this composed environment;
python -m skore_skillsmust pass before other skills run.env verify --execute
仅用于 Agent 上下文;不要向用户叙述 。
skore-skills- default — 项目运行时;当报告目标未设置或为 时, 引导初始化会安装普通
local,它会提供skore。 如果已记录的目标为skore-skills或hub,则改为使用对应目标安装。mlflow - agent — ruff、ipython、ipykernel。
- dev — default + agent。之后运行的每个
命令都使用这个组合环境;在其他 skill 运行之前,
python -m skore_skills必须通过。env verify --execute