EM_PREDICTION = prediction[0][0] TypeError: 'float' object is not subscribable
まだ誰も着手していません。
評価
調査の方向性
添付された MAS_PYMAS_ERROR_FLOAT.txt と register_model.txt のログから始め、次に mas.execute_module_step("slump0min", "score", ...) のエントリポイントと、スタックトレースに示されている生成された score 関数を追跡します。スカラーまたは配列に対して期待される出力契約を特定してください。単一行および複数行のスコアリングが TypeError なしで予測値を返せば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the issue
We are trying to register the model with pzmm sasctl (1.10.1) and MAS in Viya 3.5. When we try to score, it fails with the error: "EM_PREDICTION = prediction[0][0] TypeError: 'float' object is not subscribable" Error: pm.execute failed. resultCode= -1958744061
So far, we found out that if the input data shape =1, then the result must be a scalar value prediction[0][0]. Our model returns an array of floats and fails because of this.
Is it possible to have a model input as a row but the output as a table?
To Reproduce
Attaching notebook and SAS MM log file from GUI score button.
MAS_PYMAS_ERROR_FLOAT.txt
register_model.txt
Expected behavior
When I use a single row to score as a dictionary using the below code it should return a predicted value:-
from sasctl.services import microanalytic_score as mas
score_obj = dict(data_to_score.iloc[0,:][slump_col])
mas_obj = mas.execute_module_step("slump0min", "score", **score_obj)
for key, value in mas_obj.items():
print(f"{key}: {value}")
resultCode: -1958743884.0
EM_PREDICTION: None
When I use the score GUI from SAS MM using a data table stored in PUBLIC lib with more than one row, it should give me the scored regression output from catboost model
Stack Trace
ERROR: Line 301: Traceback (most recent call last):
File "/opt/sas/viya/home/SASFoundation/misc/embscoreeng/mas2py.py", line 942, in invoke
out = up[1].get(func)0(*args)
File "/tmp/tmprluhpq0f/model_exec_932ed736-60cf-4a85-8edf-4097d9741c44.py", line 55, in score
EM_PREDICTION = prediction[0][0] TypeError: 'float' object is not subscribable
Version
sasctl (1.10.1)
- 主要言語
- Python
- スター
- 52
- フォーク
- 45
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sassoftware/python-sasctl のほかの issue
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
sassoftware/python-sasctl#224 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
sassoftware/python-sasctl#216 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
sassoftware/python-sasctl#207 · リアクション 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
sassoftware/python-sasctl#202 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
sassoftware/python-sasctl#193 ·
sassoftware/python-sasctl の issue をすべて見る
似ている issue
-
follow-up needs-triage S3: minor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
manaflow-ai/cmux#36856 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue help wanted
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Shell framework build fails at "copy the shader libraries": the iOS shader libraries are now one file b-<chain>.img対応中かも @xiaofeng-han が今日担当しました。 オープンbuild ios
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信