AutoML BinaryClassificationExperiment.Execute throws NullReferenceException in ConcatenateEntity.ToString when ColumnInformation names a column the preFeaturizer creates

Abierto
#7,825 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

Start with BinaryClassificationExperiment.CreateBinaryClassificationPipeline and the SweepablePipeline construction path shown in the stack trace. Reproduce with the supplied preFeaturizer and ColumnInformation example, then inspect how the featurizer resolves columns before and after the preFeaturizer. Done means the pipeline handles a generated column or reports the missing column clearly instead of throwing NullReferenceException.

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

Descripción

area-AutoML untriaged
System information
  • Microsoft.ML 5.0.1, Microsoft.ML.AutoML 0.23.1
  • .NET 10 (net10.0), macOS arm64
Describe the bug

BinaryClassificationExperiment.Execute(trainData, columnInformation, preFeaturizer) throws a NullReferenceException from ConcatenateEntity.ToString when ColumnInformation names a column that the preFeaturizer creates. It does not report that the column does not exist.

To reproduce
var pre = ml.Transforms.Text.TokenizeIntoCharactersAsKeys("text__chars", "text")
    .Append(ml.Transforms.Text.ProduceNgrams("text__counts", "text__chars", 4));
var info = new ColumnInformation { LabelColumnName = "label" };
info.IgnoredColumnNames.Add("text");
info.NumericColumnNames.Add("text__counts");          // created by the preFeaturizer
ml.Auto().CreateBinaryClassificationExperiment(new BinaryExperimentSettings { MaxExperimentTimeInSeconds = 10 })
  .Execute(train, info, pre);
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.ML.AutoML.ConcatenateEntity.ToString()
   at Microsoft.ML.AutoML.SweepablePipeline..ctor(...)
   at Microsoft.ML.AutoML.SweepablePipeline.AppendEntity(...)
   at Microsoft.ML.AutoML.SweepableExtension.Append(IEstimator`1 estimator, SweepablePipeline pipeline)
   at Microsoft.ML.AutoML.BinaryClassificationExperiment.CreateBinaryClassificationPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator`1 preFeaturizer)

The featurizer is built from trainData's schema before the preFeaturizer runs, so a column the preFeaturizer adds is not found. If the preFeaturizer writes its output back under an existing column name (for example NormalizeLpNorm("text", …) with "text" listed as numeric), training works.

Expected behavior

One of:

  • the pipeline is built from the preFeaturizer's output schema, so ColumnInformation can name columns the preFeaturizer produces, or
  • Execute fails with a message naming the missing column.
Lenguaje dominante
C#
Estrellas
9.4k
Forks
2k
Merge medio
2 d 18 h
PR fusionados (30 d)
64

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dotnet/machinelearning

Todos los issues de dotnet/machinelearning

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.