From f51eaa276945b1f0507bf369fcae6aee97c2617e Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 24 Jul 2024 12:01:44 -0700 Subject: [PATCH] Fix crash in Microsoft.ML.Recommender with validation set (#7196) --- src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs b/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs index 59b23ac4f5..889a41ad22 100644 --- a/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs +++ b/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs @@ -368,7 +368,7 @@ public unsafe void TrainWithValidation(IChannel ch, int rowCount, int colCount, validProb.R = validNodesPtrs; validProb.M = rowCount; validProb.N = colCount; - validProb.Nnz = nodes.Length; + validProb.Nnz = validNodes.Length; ch.Info("Training {0} by {1} problem on {2} examples with a {3} by {4} validation set including {5} examples", prob.M, prob.N, prob.Nnz, validProb.M, validProb.N, validProb.Nnz);