LightGBM icon indicating copy to clipboard operation
LightGBM copied to clipboard

[Feature]C#/.NET Bindings and Nuget package?

Open mfagerlund opened this issue 10 years ago • 10 comments

Any plans to package this for C# devs, preferably through a nuget package?

mfagerlund avatar Nov 11 '16 09:11 mfagerlund

Sure, please follow the update of this thread.

guolinke avatar Nov 11 '16 12:11 guolinke

Will do!

mfagerlund avatar Nov 11 '16 23:11 mfagerlund

When can we expect the C# Nuget package to be finished?

h-hasanov avatar Jan 12 '17 11:01 h-hasanov

@ycdoit could you help on creating the PR of Nuget package.

chivee avatar Jan 13 '17 08:01 chivee

https://www.nuget.org/packages/LightGBM

guolinke avatar Jun 25 '17 02:06 guolinke

Thanks for providing the nuget package and the excellent work on LightGBM in general!

But IMHO a nuget package that provides an .exe and an unmanaged .dll is not at all what you would wish for as an .NET developer. You'll hardly find any C# developer that can make use of this nuget package in real life. Creating a .NET wrapper for the natively compiled .dll requires huge efforts and skills rarely found in the .NET development community. Plus knowledge about the original LightGBM sourcecode that most likely won't be found outside the LightGBM team itself.

Anyhow as we don't have anything else at the moment, could you please tell me if the executable delivered in the nuget package is ready to use GPU acceleration? If yes I would probably consider writing a simple (and probably incomplete) C# wrapper library that calls the executable as a seperate process and exchanges data with it in a file based manner. Neighter elegant nor satisfiying really, but at least an approach thats managable regarding effort and complexity.

It feels like Microsoft leaves its .NET developer community behind when it comes to machine learning.

fstandhartinger avatar Feb 28 '18 12:02 fstandhartinger

I agree with everything Florian says, I've developed my own GBM code (not based on LightGBM or XGBoost) that's inferior to both LightGBM and XGBoost, but I still use it because it's native C#. If LightGBM came out with a proper c# wrapper, that would be waay better.

2018-02-28 13:29 GMT+01:00 Florian Standhartinger [email protected] :

Thanks for providing the nuget package and the excellent work on LightGBM in general!

But IMHO a nuget package that provides an .exe and an unmanaged .dll is not at all what you would wish for as an .NET developer. You'll hardly find any C# developer that can make use of this nuget package in real life. Creating a .NET wrapper for the natively compiled .dll requires huge efforts and skills rarely found in the .NET development community. Plus knowledge about the original LightGBM sourcecode that most likely won't be found outside the LightGBM team itself.

Anyhow as we don't have anything else at the moment, could you please tell me if the executable delivered in the nuget package is ready to use GPU acceleration? If yes I would probably consider writing a simple (and probably incomplete) C# wrapper library that calls the executable as a seperate process and exchanges data with is in a file based manner. Neighter elegant nor satisfiying really, but probably at least an approach thats managable regarding effort and complexity.

Don't get me wrong, no pun intended, but I dont really get why Microsoft leaves its .NET developer community behind when it comes to machine learning.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/LightGBM/issues/74#issuecomment-369224764, or mute the thread https://github.com/notifications/unsubscribe-auth/AMfe-bK4ULUeK2mF6CwJXkZrVGFeVPXrks5tZUbFgaJpZM4Kvl_G .

-- Mattias Fagerlund Carretera AB

mfagerlund avatar Feb 28 '18 12:02 mfagerlund

I experimented a bit with creating an executable based wrapper. I also found out that the .exe in the nuget package is not providing GPU support. Is there any chance to get a nuget package that contains a GPU ready compiled .exe?

fstandhartinger avatar Feb 28 '18 23:02 fstandhartinger

Hi there,

I have created a .NET wrapper for LightGBM (including GPU support) based on the executable version of LightGBM.

If interrested, check it out: LightGbmDotNet.

But of course a proper .NET wrapper for LightGBM, maintained by the original team would be even better.

Best regards

Florian

fstandhartinger avatar Mar 04 '18 11:03 fstandhartinger

refer to https://github.com/dotnet/machinelearning/pull/392 LightGBM will be in ML.Net soon.

guolinke avatar Jun 22 '18 07:06 guolinke