Skip to content
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

lib_lightgbm.dll isn't published to Azure App Service #2533

Closed
gilnahmias opened this issue Feb 13, 2019 · 4 comments
Closed

lib_lightgbm.dll isn't published to Azure App Service #2533

gilnahmias opened this issue Feb 13, 2019 · 4 comments

Comments

@gilnahmias
Copy link

gilnahmias commented Feb 13, 2019

Using Microsoft.ML.LightGBM (0.9.0) NuGet package to train locally. This succeeds.
Trying to right click | Publish the solution directly from Visual Studio to Azure App Service succeeds. When trying to train a LightGBM model on the deployed Azure App Service, I get:

Unable to load DLL 'lib_lightgbm' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Examining the published files via Kudo (Azure Portal | My Service | Console | dir) shows that lib_lightgbm.dll isn't there.

Any special steps I should take to publish this DLL and its dependencies to Azure?

Maybe related to #1945
cc @eerhardt @sfilipi

@eerhardt
Copy link
Member

Are you running on .NET Core? If you are, it will normally be in a runtimes\win-x64 folder.

What happens if you publish to a folder on your machine? Does the file get copied to the publish folder then?

@gilnahmias
Copy link
Author

gilnahmias commented Feb 13, 2019

  1. Yes I'm using .NET Core 2.1.
  2. When I publish to a local folder I don't see there lib_lightgbm.dll.
  3. There is no lib_lightgbm.dll anywhere under .\bin\Debug\netcoreapp2.1\win-x64.
  4. I can find .\obj\{Release|Debug}\netcoreapp2.1\PubTmp\Out\runtimes\win-x64\native\lib_lightgbm.dll. However, trying to copy it directly to the Azure App Service and train, I get An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

@eerhardt
Copy link
Member

eerhardt commented Feb 13, 2019

An attempt was made to load a program with an incorrect format.

So that's a hint. Are you publishing for x64 or x86? LightGBM only supports x64.

microsoft/LightGBM#1129

@gilnahmias
Copy link
Author

gilnahmias commented Feb 14, 2019

Thanks @eerhardt!
The config combo that got it training on Azure was:

To publish:

  1. Configuration = Release - x64
  2. Deployment Mode = Self-Contained
  3. Target Runtime = win-x64

The Azure App Service itself has Platform = 32bit.

Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants