Skip to content

Commit

Permalink
fix: remove save_resume/preserve_performance_counters options as it b…
Browse files Browse the repository at this point in the history
…reaks SGD/BFGS chaining (microsoft#828)
  • Loading branch information
eisber authored and ocworld committed Mar 24, 2020
1 parent d58401f commit 842ccd0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ trait VowpalWabbitBase extends Wrappable

// add exposed parameters to the final command line args
val vwArgs = new StringBuilder()
.append(s"${getArgs} --save_resume --preserve_performance_counters ")
.append(getArgs)
.appendParamIfNotThere("hash_seed", "hash_seed", hashSeed)
.appendParamIfNotThere("b", "bit_precision", numBits)
.appendParamIfNotThere("l", "learning_rate", learningRate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,21 @@ class VerifyVowpalWabbitRegressor extends Benchmarks {

assert (metric < 11)
}

test("Verify SGD followed-by BFGS") {
val dataset = session.read.format("libsvm")
.load(DatasetUtils.regressionTrainFile("triazines.scale.reg.train.svmlight").toString)
.coalesce(1)

val model1 = new VowpalWabbitRegressor()
.setNumPasses(20)
.setArgs("--holdout_off --loss_function quantile -q :: -l 0.1")
.fit(dataset)

val model2 = new VowpalWabbitRegressor()
.setNumPasses(20)
.setArgs("--holdout_off --loss_function quantile -q :: -l 0.1 --bfgs")
.setInitialModel(model1.getModel)
.fit(dataset)
}
}

0 comments on commit 842ccd0

Please sign in to comment.