Skip to content

AutoML 2.0: Trying to serializing params from TrialResult fails #6652

Open
@torronen

Description

@torronen

System Information (please complete the following information):

  • OS & Version: Windows 11
  • ML.NET Version: latest from [main]
  • .NET Version: .NET 7.0

Describe the bug
At end of AutoML experiment I want to log the parameters used.
This fails:

             var json = JsonConvert.SerializeObject(result.TrialSettings.Parameter);
            System.IO.File.WriteAllText(saveTo + ".param", json);

I can still get them with help of .ToString() method and that will be enough for me.
Serializing just would be a easier way.

Any possible code updates should probably also address #6651

(this line also fails due to null from paramData[data]?.Keys == null, just a possible hint:
foreach (var paramKey in result.TrialSettings.Parameter.Keys)
{
if (paramData.Keys.Count() < 50)
{
foreach (var data in paramData.Keys)
{
if (paramData[data] != null && (paramData[data]?.Keys == null || paramData[data].Keys.Count() < 50))

Metadata

Metadata

Labels

AutoML.NETAutomating various steps of the machine learning processenhancementNew feature or requestneeds-further-triageuntriagedNew issue has not been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions