marimo-batch
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "marimo-batch":https://skillpi.com/zh/skills/deepskill-afeae34bfb86f4af1408e3d6b147bfcfb98b1413e731e0f21a19445af2ce645e。安装前核对上游来源和版本:https://github.com/marimo-team/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
一个用于将 marimo 笔记本准备为可定时运行的个性化技能。
介绍来源: third_party · marimo-team · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: marimo-batch
description: An opintionated skill to prepare a marimo notebook to make it ready for a scheduled run.Pydantic is a great way to declare a source of truth for a batch job, especially for ML. You can declare something like:
from pydantic import BaseModel, Field
class ModelParams(BaseModel):
sample_size: int = Field(
default=1024 * 4, description="Number of training samples per epoch."
)
learning_rate: float = Field(default=0.01, description="Learning rate for the optimizer.")
You can fill these model params with two methods too, you can imagine a form in the UI.
el = mo.md("""
{sample_size}
{learning_rate}
""").batch(
sample_size=mo.ui.slider(1024, 1024 * 10, value=1024 * 4, step=1024, label="Sample size"),
learning_rate=mo.ui.slider(0.001, 0.1, value=0.01, step=0.001, label="Learning rate"),
).form()
el
But you can also use the CLI from marimo.
if mo.app_meta().mode == "script":
if "help" in mo.cli_args() or len(cli_args) == 0:
print("Usage: uv run git_archaeology.py --repo <url> [--samples <n>]")
print()
for name, field in ModelParams.model_fields.items():
default = f" (default: {field.default})" if field.default is not None else " (required)"
print(f" --{name:12s} {field.description}{default}")
exit()
model_params = ModelParams(
**{k.replace("-", "_"): v for k, v in mo.cli_args().items()
})
else:
model_params = ModelParams(**el.value)
The user can now run this from the command line via:
uv run notebook.py --sample-size 4096 --learning-rate 0.005
This is the best of both worlds, you can use the UI to test and iterate, and then use the CLI to run the batch job. Another benefit is that you can run the notebook with settings to make it run quickly to see if there are any bugs in the notebook.
The user wants to be able to run a notebook using this pattern, so make sure you ask the user which parameters they want to make configurable via the CLI and the proceed to make the changes to the notebook. Make sure you verify the changes with the user before making them.
Weights and Biases
It is possible that the user is interested in adding support for weights and biases. Make sure you confirm if this is the case yes/no. If that is the case, make sure these ModelParams are logged. You also want to make sure that the wandb_project and wandb_run_name are part of the ModelParams is the user wants to go down this route.
If the user is keen to start a training job for ML, make sure you use this starting point. Make sure you keep the columns intact in this notebook!
Environment Variables
You may need to read environment variables for the job. Use python-dotenv to read a .env file if it exists, but also add an EnvConfig so users may add keys manually in a ui.
from wigglystuff import EnvConfig
# With validators
config = EnvConfig({
"OPENAI_API_KEY": lambda k: openai.Client(api_key=k).models.list(),
"WANDB_API_KEY": lambda k: wandb.login(key=k, verify=True)
})
# Block until valid, useful in cell that needs the key
config.require_valid()
# Access values
config["OPENAI_API_KEY"]
config.get("OPENAI_API_KEY", "some default")
Make sure you add this EnvConfig at the top of the notebook.
Columns
It can be common for larger marimo notebooks to use the columns feature to make it easy to navigate. If that is the case, you must keep these columns intact!
@app.cell(column=0, hide_code=True)
def _(mo):
mo.md(r"""demo""")
Compute platform
When the job is ready to get some serious compute, it is important that we keep good practices in mind. Consider batch sizes for the data set and make sure that there are plenty of logs so the user can spot if issues arise.
Grid search
When the user wants to run a hyperparameter sweep, point them to this grid launcher. It works with the notebook in references/starting-point.py out of the box: it samples random combinations from a search space that matches the notebook's ModelParams fields and launches each one as a separate job.
By default the script does a dry run (uv run grid.py) so the user can inspect the combinations before spending compute. Pass --launch to actually submit jobs. The --count and --seed flags control how many combinations to sample and the RNG seed.
The reference uses Hugging Face Jobs as the compute provider, but this is just one option. The user can swap it out for Modal, RunPod, or any other provider that can run a uv script.
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供 marimo notebook 从交互式开发到批处理运行的完整解决方案
- 支持 CLI 参数配置、环境变量管理和 Weights & Biases 集成
- 面向 ML/数据科学用户的明确技术场景
亮点
- description 清晰准确,能很好反映技能核心功能
- 触发词覆盖合理,无明显边界问题
待提升项
-
缺少 When to Use 章节 原报告严重程度:轻微
文档中缺少明确的使用场景说明章节
改进建议:建议添加 When to Use 章节,说明何时使用此技能
-
缺少明确的步骤划分 原报告严重程度:轻微
文档缺少清晰的 Phase/步骤划分和出口条件
改进建议:建议将流程划分为清晰的步骤,并定义每个步骤的完成条件
亮点
- 文档整体结构清晰,包含多个功能模块
- 提供了丰富的代码示例和使用方法
待提升项
-
引用文件缺失 原报告严重程度:重大
引用了 references/starting-point.py 和 references/grid.py 文件但未确认是否存在
改进建议:请确保所有引用的外部文件都存在且可访问
亮点
- 工具来源明确,参数使用正确
- 提供了异常处理建议和确认机制
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 74 行
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。