Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vowpalwabbit/wap.cc')
-rw-r--r--vowpalwabbit/wap.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/vowpalwabbit/wap.cc b/vowpalwabbit/wap.cc
index 35d796c5..1a0cef0a 100644
--- a/vowpalwabbit/wap.cc
+++ b/vowpalwabbit/wap.cc
@@ -234,25 +234,19 @@ namespace WAP {
VW::finish_example(all, &ec);
}
- learner* setup(vw& all, std::vector<std::string>&, po::variables_map& vm, po::variables_map& vm_file)
+ learner* setup(vw& all, po::variables_map& vm)
{
wap* w=(wap*)calloc_or_die(1,sizeof(wap));
w->all = &all;
uint32_t nb_actions = 0;
- if( vm_file.count("wap") ) { //if loaded options from regressor
- nb_actions = (uint32_t)vm_file["wap"].as<size_t>();
- if( vm.count("wap") && (uint32_t)vm["wap"].as<size_t>() != nb_actions )
- std::cerr << "warning: you specified a different number of actions through --wap than the one loaded from regressor. Pursuing with loaded value of: " << nb_actions << endl;
- }
- else {
- nb_actions = (uint32_t)vm["wap"].as<size_t>();
- //append wap with nb_actions to options_from_file so it is saved to regressor later
- std::stringstream ss;
- ss << " --wap " << nb_actions;
- all.options_from_file.append(ss.str());
- }
+ nb_actions = (uint32_t)vm["wap"].as<size_t>();
+
+ //append wap with nb_actions to options_from_file so it is saved to regressor later
+ std::stringstream ss;
+ ss << " --wap " << nb_actions;
+ all.file_options.append(ss.str());
all.p->lp = COST_SENSITIVE::cs_label;
all.sd->k = (uint32_t)nb_actions;