You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In CodeGenerator, Recommendation scenario Training cause null reference Exception #4579
Just dig in a bit. The null reference exception is because, in the AutoML generated pipeline, one of the fields in the trainer node's property dictionary is null, which crashes CodeGenerator.
While in this case, the null-value field's type is a MatrixFactorizationTrainer.LossFunctionType. So it's been ignored and assigned a null value.
A quick fix can be fairly simple: just pass the string value of MatrixFactorizationTrainer.LossFunctionType in sweepable parameters.
use reflection to get the right type in code gen.
Activity
LittleLittleCloud commentedon Dec 16, 2019
The root cause for that is in CodeGenerator, it only handle cases when trainer option's value type is built-in type. see the following code link.
machinelearning/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorBase.cs
Line 56 in f1f8942
While in this case, the null-value field's type is a
MatrixFactorizationTrainer.LossFunctionType. So it's been ignored and assigned a null value.A quick fix can be
fairly simple: just pass the string value ofMatrixFactorizationTrainer.LossFunctionTypein sweepable parameters.use reflection to get the right type in code gen.