Skip to content
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

Update PFI tests so they configure sensitive learners to use a single thread. #1926

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

TomFinley
Copy link
Contributor

Fixes #1925 .

While I was at it I also set the number of threads to logistic regression to 1 as a better practice, since even though it's less likely to trigger a failure here, better safe than sorry. As mentioned in the issue since FastTree's results don't depend on number of threads I did not set it there.

Also incidentally started using Assert.Equals(a, b) instead of Assert.True(b == a), so as to provide slightly more helpful error messages for when test failures happen, but that should not affect the running of the test.

As with most spurious test failures, due to the indeterminacy of the effects I am not actually 100% sure this will solve the issue, but it was just one obvious mistake I saw when reviewing the test code, so I figured this might help improve the spurious failures on account of this issue.

var model = ML.Clustering.Trainers.KMeans("Features", clustersCount: 5,
advancedSettings: args =>{ args.NormalizeFeatures = NormalizeOption.No;})
var model = ML.Clustering.Trainers.KMeans("Features", clustersCount: 5,
advancedSettings: args =>{ args.NormalizeFeatures = NormalizeOption.No; args.NumThreads = 1; })
Copy link
Contributor Author

@TomFinley TomFinley Dec 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I am hoping will solve the issue. But, again, it's mostly speculative on my part. I have TBH only seen the spurious failure happen on the build servers for MacOS debug, for which my ability to repro is limited.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also not sure what is this NormalizeOption.No. I do not think Fit will auto-normalize in any event anyway?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I think this argument is only use by the entry point.


In reply to: 242977200 [](ancestors = 242977200)

Copy link
Contributor

@Zruty0 Zruty0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@TomFinley TomFinley merged commit c2eaf75 into dotnet:master Dec 19, 2018
@TomFinley TomFinley added this to Done in v0.9 via automation Dec 19, 2018
@TomFinley TomFinley deleted the tfinley/PfiThreads1 branch March 6, 2019 16:31
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
test related to tests
Projects
No open projects
v0.9
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants