用途:帮助用户将 Harbor 任务或数据集发布到 registry,逐步引导并检查前置条件,执行发布命令前先确认。所有命令通过 uvx harbor 运行,无需全局安装 CLI。
前置条件:先用 uvx harbor auth status 确认已登录,未登录则运行 uvx harbor auth login。任务需在 task.toml 的 [task] 段中有形如 <org>/<name> 的名称;缺失时运行 uvx harbor task update "<path/to/task>" --org "<org>",批量可用 --scan。
发布任务:uvx harbor publish "<path/to/task>",可一次传多个路径或目录。
发布数据集:先初始化清单 uvx harbor dataset init "<org>/<dataset>" --description "<description>" --author "Jane Doe jane@example.com",需要自定义指标脚本时加 --with-metric,否则使用默认指标(任务平均奖励,缺失值按 0)。若目录中已有任务会自动加入清单。随后可用 uvx harbor add 添加本地任务、文件夹(--scan)、registry 中已发布任务或数据集、指标文件,用 uvx harbor remove 移除任务;支持 org/task@tag、@revision、@sha256:<hash> 指定版本。任务或指标有变动时运行 uvx harbor sync(--upgrade 可升级远程任务),再运行 uvx harbor publish "<path/to/dataset>",该命令会自动刷新本地任务摘要。
发布选项:-t/--tag 添加标签(可重复,始终包含 latest)、-c/--concurrency 控制上传并发、--public 设为公开(默认私有)、--no-tasks 仅数据集可用,跳过发布目录内任务。示例:uvx harbor publish "<path>" -t v1.0 --public。
发布后:可用 uvx harbor task visibility 或 uvx harbor dataset visibility 更改可见性,也可在 https://hub.harborframework.com/ 操作。运行已发布数据集:uvx harbor run -d "<org>/<dataset>@v1.0" -a "<agent>" -m "<model>"。
限制:资料未提供收费、价格、平台支持范围及具体效果等信息。