dotnet / dotnet/machinelearning-modelbuilder

InvalidCastException (Int32 to Single) when retraining from database

Abierto
#2,906 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Dockerfile
Estrellas
285
Forks
66
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I have my data stored in a single table that I query to grab certain columns (and "de-NULL"). I was previously saving as a CSV (due to another issue re: certificate trust) and training largely successfully. However, as I move into retraining, I'm trying to pull directly from the database with a train/test split. When I do this, I get an InvalidCastException: "Unable to cast object of type 'System.Int32' to type 'System.Single'". Presumably this is due to any number of INT fields that I'm returning (I've got some MONEY, some INT, some DATE, and some NVARCHAR); I think the CSV route is treating everything as a string and parsing to whatever, whereas the DB is typing everything.
My question is - is it up to me to prepare the data with the right types here (either by transform or by having my SQL convert everything to MONEY/NVARCHAR), or is there something I'm missing to get it to handle the conversion automatically?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

El issue no menciona archivos ni tests. Empieza reproduciendo la división train/test respaldada por la base de datos con los tipos de columna SQL indicados, y después rastrea dónde se convierte el valor Int32 a Single. Se considera terminado cuando se haya corregido el comportamiento de conversión y se haya verificado con tipos de base de datos mixtos, o cuando se haya establecido claramente la preparación de entrada requerida.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp, sql
Área
databases, machine-learning
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.