-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Adding Debugging Scenario tests for V1 APIs #2937
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2937 +/- ##
=========================================
Coverage ? 72.23%
=========================================
Files ? 796
Lines ? 142139
Branches ? 16056
=========================================
Hits ? 102668
Misses ? 35091
Partials ? 4380
|
|
||
public LogWatcher() | ||
{ | ||
Lines = new Dictionary<string, int>(); |
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.
Dictionary [](start = 28, length = 10)
do we need a dictionary for this ? #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.
Good question. I want to hold all the lines, keep a count of how many times I see a unique set of characters, and have the lookup be quick. A hash seems like the way to go, and a Dictionary
is a type-safe hash (obligatory stackoverflow link ).
What do you think? I could also reverse the lookup, so that we have a dictionary with the lines of choice in them, and use LogWatcher
to count the occurrences. Then I could assert
on the number of occurrences (0, 1, 2, etc.) back in the main function.
In reply to: 265409282 [](ancestors = 265409282)
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.
I'll keep as is because perf tradeoff is nominal.
In reply to: 265410723 [](ancestors = 265410723,265409282)
new TweetSentiment[] | ||
{ | ||
new TweetSentiment { Sentiment = true, SentimentText = "I love ML.NET." }, | ||
new TweetSentiment { Sentiment = true, SentimentText = "I love TLC." }, |
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.
TLC [](start = 83, length = 3)
? #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.
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.
|
||
// Verify that columns can be inspected. | ||
// Validate the tokens column. | ||
var tokensColumn = transformedData.GetColumn<string[]>(transformedData.Schema["Features_TransformedText"]); |
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.
Features_TransformedText [](start = 91, length = 24)
where is this magic string coming from? #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.
This magic string is the tokenized column. It takes the name you give it, and returns ${OutputColumnName}_TransformedText}
I'll file a separate issue on it.
In reply to: 265701391 [](ancestors = 265701391)
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.
var expectedLines = new string[3] { | ||
@"[Source=SdcaTrainerBase; Training, Kind=Info] Auto-tuning parameters: L2 = 0.001.", | ||
@"[Source=SdcaTrainerBase; Training, Kind=Info] Auto-tuning parameters: L1Threshold (L1/L2) = 0.", | ||
@"[Source=SdcaTrainerBase; Training, Kind=Info] Using best model from iteration 7."}; |
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.
is this text guaranteed to be constant, across runs and OSs? #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.
Good question!
Fixed seed gives consistency across runs; tests pass across OS signifies that that is guaranteed too.
In reply to: 265703890 [](ancestors = 265703890)
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.
As laid out in #2498 , we need scenarios to cover the Debugging functionality we want fully supported in V1.
Scenarios
Fixes #2932