79521933

Date: 2025-03-20 05:10:22
Score: 0.5
Natty:
Report link

The solution was to add a log handler to the MLContext object as follows:

public void handler(object sender, LoggingEventArgs args)
{
    this.Invoke(() =>
    {
        textBoxLog.AppendText(args.Message.ToString()+"\\n");
    });
}

...

var mlContext = new MLContext();
textBoxLog.Text = "";
mlContext.Log += new EventHandler<Microsoft.ML.LoggingEventArgs>(handler);

...

var model = pipeline.Fit(data);
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ant