-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft.ML.StandardTrainers references Microsoft.ML.SearchSpace but it's not included in Microsoft.ML package #6949
Comments
Here's a sample that fails: var type = typeof(Microsoft.ML.Trainers.AveragedLinearOptions);
foreach (var field in type.GetFields())
{
Console.WriteLine(field);
foreach (var attr in field.GetCustomAttributes(false))
{
Console.WriteLine(attr);
}
} This will throw:
Not sure if that's a scenario - we should have a look at the places in ML.NET itself that actually examine custom attributes to see if anything would fail like this. |
This ends up only causing issues with the Command Line parser, and so only hits users of MAML and the CLI, but it is a real product bug in our code base. The spot seems to be InputBuilder.cs line 70 where the final blowup happens. |
Most people won't ever end up hitting this as most people don't use the CLI, but there are users who do use it and any one who does use it will hit this error (I think 100% of the time). From my understanding, there is no workaround an end user could do to avoid this if they do hit it. |
System Information (please complete the following information):
Describe the bug
Microsoft.ML.StandardTrainers.dll references Microsoft.ML.SearchSpace.dll but the latter is not included in the Microsoft.ML package, but the Microsoft.ML.AutoML package.
I haven't noticed any side-effects from this yet since the usage of Microsoft.ML.SearchSpace is only in attributes, but it's possible that anything trying to enumerate other attributes on these types would see
FileLoadException
s.I discussed it with @LittleLittleCloud and suggested a couple options, if we decide we need to fix this.
System.Text.Json
which may be odd next toNewtonsoft.Json
which it already references. Eventually we should try to move away from Newtonsoft to STJ, but that's not planned yet.The text was updated successfully, but these errors were encountered: