dotnet / machinelearning-samples

Samples for ML.NET, an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
4.49k stars 2.69k forks source link

Update / Multi-target .NET Core Version #757

Open luisquintanilla opened 4 years ago

luisquintanilla commented 4 years ago

.NET Core 2.2 reaches end of life December 23. Either upgrade the version to 3.1 LTS, which is what users should be already doing anyway, or target multiple versions of .NET Core so users who are still on 2.x are not broken.

CESARDELATORRE commented 4 years ago

I agree. Most of the samples should be migrate to .NET 3.x now that it is GA. The team needs to plan on that. It cannot be done in just a couple of hours, though, expecially the web ASP.NET Core apps and WebAPIs might need some more time.

WalternativE commented 4 years ago

Should this one be split up in multiple issues or can it be done in one go? Doing everything at once would be nicer issue-tracking-wise but the resulting PR would have quite an extensive surface. What do you say, @luisquintanilla?

luisquintanilla commented 4 years ago

Hey @WalternativE

That's a really good idea. I agree that a single PR would be a lot and it should probably be done in sections. Considering it's been almost a year though, we may have to rethink what should be upgraded. The original intent was to migrate over projects using 2.2 to 3.1. I believe a majority of the samples are now using .NET Core 3.1. Those that haven't been upgraded are a good candidate to get them to .NET Core 3.1.

Regarding the next versions of .NET, although .NET 5 is right around the corner, I'm not sure whether the effort to multitarget .NET Core 3.1 and .NET 5 is worth it considering the next LTS version .NET 6 is set to release around November 2021. Especially since from a functionality / code standpoint the samples would not change much (performance may be better though which in the case of these samples may is not exactly a top priority). I'm open to input from the community though!

WalternativE commented 4 years ago

Thanks for the response, @luisquintanilla 😊

I did some digging in the projects and I found the following projects (wasn't super thorough and did it by hand so I assume there will be a slight human error).

netcoreapp3.1

If found 6 projects having 3.1 as a target. Those would be

net461

The Spike Detection E2E targets Full Framework (4.6.1) and uses the old project format. I'm not sure about this one. I assume it should stay that way to showcase legacy scenarios, right?

Below netcoreapp3.1

As far as I can see the majority of all projects targets netcoreapp2.1 (a couple of netcoreapp2.2, netcoreapp2.0 and netcoreapp3.0 should also be in the mix). There are 39 projects in total I could find in this group.

I'd also go with slices. The topical classification of projects (binary-classification, multi-class classification, etc) could be used to scope the slices. I'd be open for any suggestion, though. I'd pull up the .NET Core projects to 3.1 as it is the most recent LTS. I'm hungry for .NET 5 myself but given 2020's track record I only believe in releases that I can see, download and test myself 🙈

There is also the question of upgrading dependencies while were already at it, but that might be something for the next iteration (maybe following a similar process).

Would that be reasonable?