-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Remove auto-cache mechanism #1780
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
Changes from all commits
eae2947
7294b6e
426514c
e368a1a
a17e3fe
369bf11
47d213e
dd8f3c3
fc8285c
504f148
5e08d1e
176b7c1
067c88d
1d963bd
bca4ccf
1342475
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,11 +130,8 @@ protected virtual void CheckLabelCompatible(SchemaShape.Column labelCol) | |
protected TTransformer TrainTransformer(IDataView trainSet, | ||
IDataView validationSet = null, IPredictor initPredictor = null) | ||
{ | ||
var cachedTrain = Info.WantCaching ? new CacheDataView(Host, trainSet, prefetch: null) : trainSet; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As requested by @GalOshri in the issue, can we add documentation? Currently the user will have no method of knowing if a specific learner already does it own form of caching, or won't benefit from caching. Inline w/ @GalOshri's request, I think this documentation should be required before making this change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's change the appropriate cookbook samples to illustrate the new pattern with this little caching checkpoint thing. In reply to: 237951473 [](ancestors = 237951473) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, updating the example code is a good first step. And we should create a direct list of the components which benefit from caching. This is along with when they benefit, for instance, "a LinearSVM when the number of iterations are greater than 1". Another route is perhaps a VS checker which look at Info.WantCaching and recommends from there? #WontFix There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A sample and some tests are modified to use those caching functions. Every caching function has at least one test now. #Resolved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think having a list is a small task. We need another PR and issue. In reply to: 237953879 [](ancestors = 237953879) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. I will do it in next iteration. [Update] Done. Please take a look again. Thank you. In reply to: 237951764 [](ancestors = 237951764,237951473) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally, I like to see documentation in the PR. This is more so true when the user can be surprised by the change and not understand what's different. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
var cachedValid = Info.WantCaching && validationSet != null ? new CacheDataView(Host, validationSet, prefetch: null) : validationSet; | ||
|
||
var trainRoleMapped = MakeRoles(cachedTrain); | ||
var validRoleMapped = validationSet == null ? null : MakeRoles(cachedValid); | ||
var trainRoleMapped = MakeRoles(trainSet); | ||
var validRoleMapped = validationSet == null ? null : MakeRoles(validationSet); | ||
|
||
var pred = TrainModelCore(new TrainContext(trainRoleMapped, validRoleMapped, null, initPredictor)); | ||
return MakeTransformer(pred, trainSet.Schema); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
OVA | ||
Accuracy(micro-avg) Accuracy(macro-avg) Log-loss Log-loss reduction /p Learner Name Train Dataset Test Dataset Results File Run Time Physical Memory Virtual Memory Command Line Settings | ||
0.935283 0.938889 0.365162 66.3941 AvgPer{lr=0.8} OVA %Data% %Output% 99 0 0 maml.exe CV tr=OVA{p=AvgPer{ lr=0.8 }} threads=- norm=No dout=%Output% data=%Data% seed=1 /p:AvgPer{lr=0.8} | ||
0.929667 0.936111 0.346785 68.08855 AvgPer{lr=0.8} OVA %Data% %Output% 99 0 0 maml.exe CV tr=OVA{p=AvgPer{ lr=0.8 }} threads=- norm=No dout=%Output% data=%Data% seed=1 /p:AvgPer{lr=0.8} | ||
|
Uh oh!
There was an error while loading. Please reload this page.