Bug: JobConfig 手动设置 experiment_id 未同步到 environment
- Dominant language
- Python
- Stars
- 485
- Forks
- 81
- Avg merge
- 16h 12m
- Merged PRs (30d)
- 8
Description
## 问题
`rock/sdk/job/config.py` 中 `JobConfig` 仅在模型初始化后的 validator 里同步一次 `experiment_id`。
当用户先初始化 `JobConfig` / `BashJobConfig` / `HarborJobConfig`,再手动执行 `cfg.experiment_id = "..."` 时,`cfg.environment.experiment_id` 保持旧值或 `None`。后续依赖 `config.environment` 创建 sandbox 时会拿到错误的 `experiment_id`。
## 预期
手动更新顶层 `experiment_id` 后,`environment.experiment_id` 保持一致。
替换 `environment` 对象时,已有的顶层 `experiment_id` 继续传导到新的 environment。
## 验收
- 增加单元测试覆盖初始化后赋值场景
- 增加单元测试覆盖替换 environment 场景
- 保持现有冲突日志语义
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in rock/sdk/job/config.py by inspecting JobConfig and the BashJobConfig and HarborJobConfig variants, then find the existing unit tests for these configurations. Run those tests before adding coverage for updating experiment_id after initialization and replacing environment. Done means both synchronization paths work while preserving the existing conflict-log semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100