Closed adamantinum closed 3 years ago
@adamantinum Sorry for the delay here. Did you copy the generated MLModel.zip file from the SampleClassification.Model folder to the consumeModelApp folder?
Thank you for your reply. Yes, I was able to run the program copying MLModel.zip, but there isn't written in the tutorial, so I suppose it should work without doing it, also because SampleClassification.Model.csproj is referenced in the consumeModelApp project file.
Glad you got it working @adamantinum! I want to make sure our docs are clear. We do have a note about copying the zip, but it seems it isn't noticeable.
Sorry, I'm not trying to call you out! I want to hear if you have feedback on how we make this more clear and understandable.
Oh my fault, it has escaped me. Sorry and thank you for your patience.
No problem! Please let us know if you run into any more issues
System Information (please complete the following information):
dotnet tool install -g mlnet
Describe the bug
To Reproduce Steps to reproduce the behavior:
cd consumeModelApp
dotnet add reference "../SampleClassification/SampleClassification.Model/SampleClassification.Model.csproj"
dotnet run
is usedUnhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\Users\Alessandro\Desktop\myMLApp\consumeModelApp\MLModel.zip'. File name: 'C:\Users\Alessandro\Desktop\myMLApp\consumeModelApp\MLModel.zip' at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.OpenRead(String path) at Microsoft.ML.ModelOperationsCatalog.Load(String filePath, DataViewSchema& inputSchema) at SampleClassification.Model.ConsumeModel.CreatePredictionEngine() in C:\Users\Alessandro\Desktop\myMLApp\SampleClassification\SampleClassification.Model\ConsumeModel.cs:line 37 at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy
1.CreateValue() at System.Lazy1.get_Value() at SampleClassification.Model.ConsumeModel.Predict(ModelInput input) in C:\Users\Alessandro\Desktop\myMLApp\SampleClassification\SampleClassification.Model\ConsumeModel.cs:line 27 at consumeModelApp.Program.Main(String[] args) in C:\Users\Alessandro\Desktop\myMLApp\consumeModelApp\Program.cs:line 18
Expected behavior Program should run.
Thank you in advance.