Keras example saves .keras ObjectStore keys but searches for keys without the extension
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
从 Algorithm.Python/KerasNeuralNetworkAlgorithm.py 开始:initialize(大约第 34-40 行)将 ObjectStore 的键与 f'{symbol}_model' 比较,而 on_end_of_algorithm(大约第 58-64 行)保存 f'{symbol}_model.keras'。选择一种键的约定,并让两条路径都使用它。当某次运行中保存的模型在重启时能被找到并由 keras.models.load_model 加载,且有往返测试覆盖该契约时,即完成。
由索引模型根据 Issue 内容生成。
描述
Problem
KerasNeuralNetworkAlgorithm saves models under keys that its initialization never accepts:
initializecompares each ObjectStore key withf'{symbol}_model'.on_end_of_algorithmsavesf'{symbol}_model.keras'.
Consequently, restarting with models saved by the example skips keras.models.load_model for every saved model. The extension was added to the saving path in #8658, but not to the loading comparison.
Reproduction and evidence
- Run the example until it trains and saves a model.
- Restart with the same ObjectStore.
- The saved
SPY_model.keraskey does not equal the expectedSPY_model, so initialization continues without restoring it.
Evaluating the actual key-assignment AST expressions from the current source with symbol='SPY' produces:
initialize: SPY_model
on_end_of_algorithm: SPY_model.keras
This verifies the key mismatch independently of TensorFlow execution; a complete training/restart run was not performed.
Required result
A model saved by the example must be discovered and restored on the next run, using a compatible Keras filename and preserving its trained weights. Add a round-trip regression test for the save/load key contract.
- 主要语言
- C#
- 星标
- 22.6k
- 派生
- 5.4k
- 平均合并
- 11 小时 39 分钟
- 30 天内合并 PR
- 104
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
QuantConnect/Lean 的其他 Issue
-
priority:p2
难度 2/5 1-3 小时 新手友好度 78/100
QuantConnect/Lean#10206 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 85/100
QuantConnect/Lean#10199 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 76/100
QuantConnect/Lean#10198 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 78/100
QuantConnect/Lean#10197 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 82/100
QuantConnect/Lean#10191 · 1 条评论 ·
维护者通常 1 天内回复
查看 QuantConnect/Lean 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
dotnet-outdated/dotnet-outdated#871 ·
维护者通常 1 天内回复
-
triage/untriaged
难度 2/5 1-3 小时 新手友好度 78/100
unoplatform/uno#26676 ·
维护者通常 1 天内回复
-
.NET bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
jhaizhou-ops/S2Arm#2177 · 3 条评论 ·
维护者通常 1 天内回复
-
area-CodeGen-coreclr untriaged
难度 2/5 1-3 小时 新手友好度 65/100
dotnet/runtime#138181 · 1 条评论 ·
维护者通常 1 天内回复