-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Make ScoreMapperSchema and its relatives not ISchema #2107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ScoreMapperSchema and its relatives not ISchema #2107
Conversation
/// </summary> | ||
public abstract class ScoreMapperSchemaBase : ISchema | ||
[BestFriend] | ||
internal static class ScoreSchemaFactory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this file to match the class that is inside of it? ScoreSchemaFactory.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
} | ||
} | ||
// Schema of Score column. We are going to extend it by adding a Probability column. | ||
var partialSchema = Create(NumberType.Float, MetadataUtils.Const.ScoreColumnKind.BinaryClassification, scoreColumnName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) It feels a bit heavy-weight to create a whole schema object just to get 1 column out of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This saves lines of creating metadata for that column (~6 lines). :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Remove ScoreMapperSchema and its relatives entirely 2. Create static functions to generate commonly-used Schema
813a0ff
to
acf718f
Compare
} | ||
} | ||
|
||
public sealed class SequencePredictorSchema : ScoreMapperSchemaBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SequencePredictorSchema [](start = 24, length = 23)
We use this schema in internal schema, if you remove it, that would force someone else to write code in internal repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ivanidzo4ka - that's the intention. ISchema
is going away, so any code (internal or public) that depends on it will need to be updated. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@[email protected], after running 5 out of 7 sequence-related TLC tests, I still don't find a place where this object is actually used. In TLC code base, SequencePredictorSchema's constructor always bypasses the part which distinguish it from ScoreMapperSchemaBase because keyNames.Length
is always 0. Therefore, we don't even know if this class was created correctly. Is a replacement to this class required?
[Update] I am adding a test based on what I can find in TLC and creating a factory maethod to sequence predictor.
In reply to: 246872132 [](ancestors = 246872132)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR wants to join the march of #1501.