EM_PREDICTION = prediction[0][0] TypeError: 'float' object is not subscribable
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
Rechercherichtung
Beginnen Sie mit den angehängten MAS_PYMAS_ERROR_FLOAT.txt- und register_model.txt-Logs und verfolgen Sie anschließend den Einstiegspunkt mas.execute_module_step("slump0min", "score", ...) sowie die im Stacktrace angezeigte generierte score-Funktion. Bestimmen Sie den erwarteten Ausgabe-Vertrag für einen Skalar oder ein Array; die Aufgabe ist abgeschlossen, wenn das Scoring für einzelne und mehrere Zeilen den vorhergesagten Wert ohne TypeError zurückgibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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)
- Vorherrschende Sprache
- Python
- Sterne
- 52
- Forks
- 45
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sassoftware/python-sasctl
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
sassoftware/python-sasctl#224 ·
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
sassoftware/python-sasctl#216 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
sassoftware/python-sasctl#207 · 1 Reaktion ·
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
sassoftware/python-sasctl#202 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
sassoftware/python-sasctl#193 ·
Alle Issues in sassoftware/python-sasctl
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
fritzprix/libr-agent#2612 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage presubmit-gate
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
gke-labs/kube-agents#5001 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
simonw/sqlite-utils#928 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
colorado
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
freelawproject/juriscraper#2405 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
cline/mcp-marketplace#3576 ·