EM_PREDICTION = prediction[0][0] TypeError: 'float' object is not subscribable
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
Línea de trabajo
Comience con los logs adjuntos MAS_PYMAS_ERROR_FLOAT.txt y register_model.txt, y luego rastree el punto de entrada mas.execute_module_step("slump0min", "score", ...) y la función score generada que se muestra en el stack trace. Determine el contrato de salida esperado para un escalar o un array; se considera terminado cuando el scoring de una sola fila y de varias filas devuelve el valor predicho sin TypeError.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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)
- Lenguaje dominante
- Python
- Estrellas
- 52
- Forks
- 45
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sassoftware/python-sasctl
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
sassoftware/python-sasctl#224 ·
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
sassoftware/python-sasctl#216 ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
sassoftware/python-sasctl#207 · 1 reacción ·
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
sassoftware/python-sasctl#202 ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
sassoftware/python-sasctl#193 ·
Todos los issues de sassoftware/python-sasctl
Issues similares
-
fuzz fuzz-unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
neilsh/stunt-reel#220 ·
Los mantenedores suelen responder en 1 día
-
[Issue]: use_fp4_cache is accepted but ignored; the launcher always writes FP8 recordsPosiblemente ocupada @0z5a la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area: cli priority: p3 size: S type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
finos/open-resource-broker#757 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 6 días