跳到正文

正在自动登录…

← 返回项目列表

xingjian-bai/opal

模型训练优化自动化调参

OPAL 是一个 PyTorch 优化器包装器,允许编码代理在模型训练期间重写优化器。它适用于希望自动化调整优化器超参数或更新规则的机器学习研究人员和工程师。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/22 07:21:17 · 查看原文

值得看Python库与框架
累计 Stars
125
当前热度
1 天内 · 小火
仓库创建时间
打开 GitHub ↗项目网站 ↗

选用指南

AI 根据 README 整理 · 2026/10/22 07:21:17

使用方式

通过 Python 库使用,将现有优化器包装在 opal.wrap 中,并传递目标句子和总步数。

查看 README 依据
The package is called `opal-optimizer`, because `opal` on PyPI is an unrelated web framework. Both install as `import opal`, so do not install both. ```python import torch, opal opt = torch.optim.AdamW(model.parameters(), lr=3e-4) # your optimizer, unchanged sched = torch.optim.lr_scheduler.CosineAnnealingLR(opt, T_max=steps) # your scheduler, unchanged opt = opal.wrap(opt, model, scheduler=sched, total_steps=steps, goal="ResNet-18 on CIFAR-10; judged by test accuracy after the last update",
部署要求

需要 Python 3.9 或更高版本,PyTorch 2.3 或更高版本,以及一个使用 torch.optim 优化器的训练脚本。对于代理运行,需要安装并登录 Claude Code。

查看 README 依据
The guide shows how to check the keep run against your plain run byte for byte, and how to use the Hugging Face Trainer: [Try it without an agent](docs/GUIDE.md#try-it-without-an-agent). ## Prerequisites - **A PyTorch training script** that uses `torch.optim` optimizers, on CPU, one GPU or several GPUs of one node (DDP). Python 3.9 or newer, PyTorch 2.3 or newer. - **For an agent run, Claude Code, logged in on the machine that runs rank 0.** Install [Claude Code](https://docs.claude.com/en/docs/claude-code), run `claude` once and log in with a Claude subscription
已知限制

不支持多节点、FSDP 和 DeepSpeed。代理可能使训练变差,且无法回滚训练。

查看 README 依据
Multi-node, FSDP and DeepSpeed are not supported. Accelerate works if you wrap after `accelerator.prepare`, without fp16 GradScaler or Accelerate's gradient accumulation; the HF Trainer works through `opal.hf.OpalTrainer`. Both are tested on CPU. Lightning should work through `opt.observe(loss)` but we have not tried it. The agent can make a run worse: it cannot restart or roll back training, it can only fix its programs at the next decision. ## Citation ```bibtex @misc{bai2026reactive, title = {Reactive Optimizers},

README

正在加载 README…

收录信息

仓库创建时间
2026/10/21 22:17:50
首次达标收录
2026/10/22 07:16:22
统计更新时间
2026/10/22 19:01:03

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

值得看加权总分 3.9 / 5

新颖度
4.4
实用价值
3.5
成熟度
4.2
实质含量
3.8

由 Jev 模型根据仓库描述与 README 评估,2026/10/22 07:16:22 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/10/22 16:20:54
许可证标识
MIT
Fork 数
4
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目