Keras example saves .keras ObjectStore keys but searches for keys without the extension

オープン 初心者向け
#10,216 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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' を保存します。キーの規約を 1 つ選び、両方の経路でそれを使うようにしてください。ある実行で保存されたモデルが再起動時に見つかり、keras.models.load_model で読み込まれること、およびラウンドトリップテストがその契約をカバーしていることが完了条件です。

索引モデルが issue の本文から書いたものです。

説明

priority:p2
Problem

KerasNeuralNetworkAlgorithm saves models under keys that its initialization never accepts:

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
  1. Run the example until it trains and saves a model.
  2. Restart with the same ObjectStore.
  3. The saved SPY_model.keras key does not equal the expected SPY_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分
マージ済み PR(30日)
104

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantConnect/Lean のほかの issue

QuantConnect/Lean の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。