dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.29k stars 5.92k forks source link

loadedModel in PredictIssue #12464

Closed garricknorthover closed 5 years ago

garricknorthover commented 5 years ago

Hey guys, Just another little typo.

The PredictIssue method is missing the declaration of loadedModel.

So

            ITransformer loadedModel = _mlContext.Model.Load(_modelPath, out var modelInputSchema);

needs to be the first line in

private static void PredictIssue()
{

}

Cheers Garrick



---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 77fc5686-2288-d607-8136-3146ed02dbf6
* Version Independent ID: 8a16b9e9-b5cb-a55e-2135-191bc62c1656
* Content: [Tutorial: Categorize support issues - multiclass classification - ML.NET](https://docs.microsoft.com/en-us/dotnet/machine-learning/tutorials/github-issue-classification)
* Content Source: [docs/machine-learning/tutorials/github-issue-classification.md](https://github.com/dotnet/docs/blob/master/docs/machine-learning/tutorials/github-issue-classification.md)
* Product: **dotnet-ml**
* GitHub Login: @JRAlexander
* Microsoft Alias: **johalex**
JRAlexander commented 5 years ago

Thanks, @garricknorthover, unfortunately this is actually not needed as we removed the save and load and consolidated it into a How-To article. Apologies for the delay in responding! Very much appreciate your contribution though!!!

oatsoda commented 5 years ago

@JRAlexander There is still a problem because the code references loadedModel which doesn't exist. Are we supposed to use _trainedModel instead?

Shah-Nisarg commented 5 years ago

@JRAlexander Please see the comment above from @oatsoda . The code, as it is now, will not compile as the variable loadedModel is not declared.

Also, some of the initial steps mention creating a "Models" folder. I assume that is also no longer needed given the save-and-load part is removed.