#MLNET – Fix the error [System. InvalidOperationException, Entry Point ‘ Not found] when you train a pipeline

Hi!

Today I’m going to leave this POST as a memory backup for me because I always forget to make this configuration in ML.Net projects and I always find the following error:

System.InvalidOperationException

  HResult=0x80131509

  Message=Entry point ‘<some external assembly> not found

  Source=Microsoft.ML.Data

Where [External Assembly] can be For example LightGBM

  Message=Entry point ‘Trainers.LightGbmClassifier’ not found

01 mlnet entry point not found

This error triggered when the app is running, at the beginning of a pipeline training. It is usually associated with scenarios where we add and use external references in addition to Microsoft.ML.

The solution is quite simple, we just have to make sure that the Project Property <CopyLocalLockFileAssemblies> this enabled

02 mlnet project config CopyLocalLockFileAssemblies

Editing the csproj file like this

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup Label="Globals">
    <SccProjectName>SAK</SccProjectName>
    <SccProvider>SAK</SccProvider>
    <SccAuxPath>SAK</SccAuxPath>
    <SccLocalPath>SAK</SccLocalPath>
  </PropertyGroup>
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.1</TargetFramework>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>

And ready, now our pipelines can train properly!

Happy Coding!

Greetings @ Burlington

El Bruno

References

My Posts

Advertisement

8 comments

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: