machinelearning icon indicating copy to clipboard operation
machinelearning copied to clipboard

The new API does not work on .NET Framework < 4.7.1

Open yaeldekel opened this issue 8 years ago • 11 comments

It relies on the extension method in System.Linq "Append" that was added only in 4.7.1.

yaeldekel avatar Sep 27 '18 16:09 yaeldekel

Unfortunately there are a few methods in .NET Standard 2.0 which aren't available in .NET Framework 4.6.1, but 4.6.1 "claims" it supports .NET Standard 2.0.

Here is the list: https://github.com/dotnet/standard/blob/205332796a9a0f869ff698402c3496f14cc71f50/netstandard/src/ApiCompatBaseline.net461.txt

/cc @ericstj @terrajobst @weshaggard

eerhardt avatar Sep 27 '18 16:09 eerhardt

Does this mean we'd have to raise the min version of .NET Framework required for ML.NET 0.6?

markusweimer avatar Sep 27 '18 17:09 markusweimer

Does this mean we'd have to raise the min version of .NET Framework required for ML.NET 0.6?

If we don't fix this issue for 0.6, Yes. If someone tries running the new API on an older .NET Framework, they will an exception.

eerhardt avatar Sep 27 '18 17:09 eerhardt

@TomFinley how strong is our dependency on the method mentioned by Yael? Can we code around this? Maybe for 0.7?

markusweimer avatar Sep 27 '18 17:09 markusweimer

umm, I think we could just add our implementation of Append to TLC until we upgrade the .NET version?

Append(x) is the same as Concat(new[] {x})

Zruty0 avatar Sep 27 '18 17:09 Zruty0

umm, I think we could just add our implementation of Append to TLC until we upgrade the .NET version?

Sounds good. Can we make it conditional on the version of .NET a user has?

markusweimer avatar Sep 27 '18 17:09 markusweimer

Also, I'm not too strongly attached to Append. I only used it because my C# was rusty, and I forgot that 'there is no Append in LINQ'. And sure enough, it appeared while I was not looking, just not in the old framework.

Zruty0 avatar Sep 27 '18 17:09 Zruty0

@Zruty0, is this fixable between now and 0.6?

markusweimer avatar Sep 27 '18 17:09 markusweimer

I can create a PR today.

yaeldekel avatar Sep 27 '18 17:09 yaeldekel

I looked at the list that @eerhardt posted, and Append looks like the only API that we use in there.

yaeldekel avatar Sep 27 '18 17:09 yaeldekel

Cool! Unless you have a bug to fix for 0.6, it would be great to get this done before the release.

markusweimer avatar Sep 27 '18 17:09 markusweimer