dotnet / machinelearning-modelbuilder

Simple UI tool to build custom machine learning models.
Creative Commons Attribution 4.0 International
265 stars 56 forks source link

Executing mlnet can't locate dotnet #2802

Open DickHildreth opened 11 months ago

DickHildreth commented 11 months ago

System Information (please complete the following information):

Describe the bug

You must install .NET to run this application.

App: /home/dhild/.dotnet/tools/mlnet Architecture: x64 App host version: 8.0.0 .NET location: Not found

When I run 'which dotnet' I get '/usr/bin/dotnet', so both this and the reporting of the App host version says that .NET is properly installed. To Reproduce Steps to reproduce the behavior:

  1. Go to bash console
  2. Enter 'mlnet classification --dataset "yelp_labelled.txt" --label-col 1 --has-header false --name SentimentModel --train-time 60'
  3. See error

Expected behavior Shown in Progress at https://dotnet.microsoft.com/en-us/learn/ml-dotnet/get-started-tutorial/train

Screenshots N/A

Additional context None

LittleLittleCloud commented 10 months ago

Did you install dotnet?

oliversturm commented 10 months ago

I have the same problem. Following tutorial. I install the tool:

> dotnet tool install -g mlnet-osx-arm64
...
You can invoke the tool using the following command: mlnet
Tool 'mlnet-osx-arm64' (version '16.15.1') was successfully installed.

I follow the instructions to add /Users/oli/.dotnet/tools to the path. Now both dotnet and mlnet are accessible:

> which dotnet
/Users/oli/.dotnet/dotnet

> which mlnet
/Users/oli/.dotnet/tools/mlnet

However, mlnet itself seems to be unaware of this:

> mlnet
You must install .NET to run this application.

App: /Users/oli/.dotnet/tools/mlnet
Architecture: arm64
App host version: 8.0.0
.NET location: Not found

Learn more:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=arm64&rid=osx-arm64&os=osx.14&apphost_version=8.0.0

I thought perhaps it was only the wrong version, but:

> dotnet --version
8.0.100

So what's going on with this?

oliversturm commented 10 months ago

Alright... hope this helps. First, I found that mlnet needs extra help to find .NET -- whatever the reason for this.

Then it finally told me that it's actually looking for .NET 6.0! Whodathunk.

> DOTNET_ROOT=/Users/oli/.dotnet mlnet
You must install or update .NET to run this application.

App: /Users/oli/.dotnet/tools/mlnet
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '6.0.0' (arm64)
.NET location: /Users/oli/.dotnet

The following frameworks were found:
  7.0.13 at [/Users/oli/.dotnet/shared/Microsoft.NETCore.App]
  8.0.0-rc.2.23479.6 at [/Users/oli/.dotnet/shared/Microsoft.NETCore.App]
  8.0.0 at [/Users/oli/.dotnet/shared/Microsoft.NETCore.App]
...

So I installed 6.0 and now it works.

> ./dotnet-install.sh --channel 6.0
...

> DOTNET_ROOT=/Users/oli/.dotnet mlnet
Welcome to the ML.NET CLI!
...