You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.NET Core SDK (reflecting any global.json):
Version: 2.1.400-preview-009063
Commit: dd0179a67c
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.400-preview-009063\
Host (useful for support):
Version: 2.1.1
Commit: 6985b9f684
What happened?
The entry point map for these Microsoft.ML.Runtime.Data.LoadTransform and Microsoft.ML.Runtime.Learners.LinearClassificationTrainer types are not getting loaded properly. As a result I am not able to train or test using ML.net inside the Azure Function.
Errors
System.Private.CoreLib: Exception while executing function: GithubIssueLabeler. Microsoft.ML.Data: Couldn't load model: 'DataLoaderModel\Transform_001
System.Private.CoreLib: Exception while executing function: GithubIssueLabeler. System.Private.CoreLib: Exception has been thrown by the target of an invocation. Microsoft.ML.Data: Couldn't load model: 'DataLoaderModel\Transform_020\SchemaBindableMapper\InnerMapper\Predictor'.
What did you expect?
Expect to work properly.
Source code / logs
[FunctionName("GithubIssueLabeler")]publicstaticasyncTask<IActionResult>Run([HttpTrigger(AuthorizationLevel.Function,"get","post",Route=null)]HttpRequestreq,TraceWriterlog){//var type = typeof(Microsoft.ML.Runtime.Data.LoadTransform);//var type1 = typeof(Microsoft.ML.Runtime.Learners.LinearClassificationTrainer);log.Info("Http Issue Webhook Request is Being Processed");stringrequestBody=newStreamReader(req.Body).ReadToEnd();dynamicdata=JsonConvert.DeserializeObject(requestBody);stringAction=data?.action;dynamicissue=data?.issue;dynamiclabels=issue?.labels;if(Action=="opened"&&labels.Count==0){stringtitle=issue?.title;intnumber=issue?.number;stringbody=issue?.body;log.Info($"A {number.ToString()} issue with {title} has been opened.");Configuration=newConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json").Build();varlabeler=newLabeler(Configuration["GitHubRepoOwner"],Configuration["GitHubRepoName"],Configuration["GitHubToken"]);awaitlabeler.PredictAndApplyLabelAsync(number,title,body,log);// can do training or prediting using already load modellog.Info("Labeling completed");}else{log.Info("The issue is already opened or it already has a label");}Console.ReadLine();log.Info($"Issue Label request handled");returnAction!=null?(ActionResult)newOkObjectResult($"Issue Label request handled"):newBadRequestObjectResult("Please pass a name on the query string or in the request body");}
WorkArounds
Adding these lines to the function helps the app to run perfectly fine.
var type = typeof(Microsoft.ML.Runtime.Data.LoadTransform);
var type1 = typeof(Microsoft.ML.Runtime.Learners.LinearClassificationTrainer);
This should no longer be necessary once #371 is completed. We will no longer need to to front load the assembly loading, as the API usage will be directly against the underlying C# assemblies.
System information
Issue
What did you do?
I am trying to use the ML.net package in azure functions. I am running this https://github.com/dotnet/machinelearning-samples/tree/master/samples/end-to-end-apps/github-labeler inside an azure function.
What happened?
The entry point map for these
Microsoft.ML.Runtime.Data.LoadTransform
andMicrosoft.ML.Runtime.Learners.LinearClassificationTrainer
types are not getting loaded properly. As a result I am not able to train or test using ML.net inside the Azure Function.Errors
Expect to work properly.
Source code / logs
WorkArounds
Adding these lines to the function helps the app to run perfectly fine.
cc @eerhardt
The text was updated successfully, but these errors were encountered: