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
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.4\
Microsoft .NET Core Shared Framework Host
Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
Issue
When decorating input type field with "Label" attribute as shown in the following
class CoreFxIssue
{
[Column("0")]
public string ID;
[Column("1", name: "Label")]
public string Area;
[Column("2")]
public string Title;
[Column("3")]
public string Description;
}
public class CoreFxIssuePrediction
{
[ColumnName("PredictedLabel")]
public string Area;
}
The training breaks with exception shown below when using "Label" in a transform in the pipeline.
The solution is to check for both type of custom attributes (ColumnAttribute, ColumnNameAttribute) and load names properly and add a few tests to cover this issue.
Side Effects
This is the side effect of using custom attribute "Label" on any field in input type.
When decorating "Area" field with "Label" attribute in CoreFxIssue
type above, the "Area" field is no longer available in the pipeline. "Area" is replaced with "Label" i.e. use "Label" for "Area" in the pipeline. Need to highlight it in the documentation properly.
The text was updated successfully, but these errors were encountered:
System information
.NET Command Line Tools (2.1.4)
Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.4\
Microsoft .NET Core Shared Framework Host
Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
Issue
When decorating input type field with "Label" attribute as shown in the following
The training breaks with exception shown below when using "Label" in a transform in the pipeline.
![image](https://user-images.githubusercontent.com/38438266/39894790-dd5e37f6-545c-11e8-9e44-df23af4fb2f2.png)
The problem is when defining input/output schema from input/output type, the column names are not properly loaded. Input type uses ColumnAttribute class while Output type uses ColumnNameAttribute while loading custom attributes ( c.f. https://github.com/dotnet/machinelearning/blob/master/src/Microsoft.ML.Api/SchemaDefinition.cs).
Solution
The solution is to check for both type of custom attributes (ColumnAttribute, ColumnNameAttribute) and load names properly and add a few tests to cover this issue.
Side Effects
This is the side effect of using custom attribute "Label" on any field in input type.
When decorating "Area" field with "Label" attribute in CoreFxIssue
type above, the "Area" field is no longer available in the pipeline. "Area" is replaced with "Label" i.e. use "Label" for "Area" in the pipeline. Need to highlight it in the documentation properly.
The text was updated successfully, but these errors were encountered: