The number of grammar rules (94) is inconsistent with the pre-trained model (97)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
調査の方向性
まず fs=2 で前処理を再現し、その文法規則数を pretrained model の rule_embedding の shape と比較します。checkpoint の読み込み付近にある run.py、seq2struct/commands/infer.py、seq2struct/utils/saver.py を読みます。生成された文法と checkpoint の規則数が一致し、報告されている state_dict エラーなしで推論が読み込まれれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I find that the number of the grammar rules is 94 when I follow the instructions to preprocess the data (with the hyper-parameter fs=2). But the size of rule_embedding in the pre-trained model is 97.
Traceback (most recent call last):
File "run.py", line 104, in
main()
File "run.py", line 83, in main
infer.main(infer_config)
File "/home/yuhao/zhenwen/repair_model/gap-text2sql-main/rat-sql-gap/seq2struct/commands/infer.py", line 239, in main
model = inferer.load_model(args.logdir, args.step)
File "/home/yuhao/zhenwen/repair_model/gap-text2sql-main/rat-sql-gap/seq2struct/commands/infer.py", line 48, in load_model
last_step = saver.restore(logdir, step=step, map_location=self.device, item_keys=["model"])
File "/home/yuhao/zhenwen/repair_model/gap-text2sql-main/rat-sql-gap/seq2struct/utils/saver.py", line 122, in restore
items2restore, model_dir, map_location, step)
File "/home/yuhao/zhenwen/repair_model/gap-text2sql-main/rat-sql-gap/seq2struct/utils/saver.py", line 40, in load_checkpoint
item_dict[item_name].load_state_dict(checkpoint[item_name])
File "/home/yuhao/.conda/envs/zhenwen/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1407, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for EncDecModel:
Unexpected key(s) in state_dict: "decoder.state_update._input_dropout_mask", "decoder.state_update._h_dropout_mask".
size mismatch for decoder.rule_logits.2.weight: copying a param with shape torch.Size([97, 128]) from checkpoint, the shape in current model is torch.Size([94, 128]).
size mismatch for decoder.rule_logits.2.bias: copying a param with shape torch.Size([97]) from checkpoint, the shape in current model is torch.Size([94]).
size mismatch for decoder.rule_embedding.weight: copying a param with shape torch.Size([97, 128]) from checkpoint, the shape in current model is torch.Size([94, 128])
- 主要言語
- Python
- スター
- 109
- フォーク
- 25
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
awslabs/gap-text2sql のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
awslabs/gap-text2sql#37 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
awslabs/gap-text2sql#35 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
awslabs/gap-text2sql#34 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
awslabs/gap-text2sql#33 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
awslabs/gap-text2sql#32 ·
awslabs/gap-text2sql の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NVIDIA/flare-local-inference#90 ·
メンテナーはふだん 1 日以内に返信
-
area/streaming comp/gateway P2 platform/telegram type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#144897 ·
メンテナーはふだん 1 日以内に返信
-
request-theme
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
LizardByte/ThemerrDB#9575 ·
メンテナーはふだん 1 日以内に返信
-
author-page correction
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
acl-org/acl-anthology#10599 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zilliztech/memsearch#818 ·
メンテナーはふだん 1 日以内に返信