Vowpal Wabbit
Functions | Variables
DebugMT Namespace Reference

Functions

void run (Search::search &sch, multi_ex &ec)
 

Variables

Search::search_metatask metatask = {"debug", run, nullptr, nullptr, nullptr, nullptr}
 

Function Documentation

◆ run()

void DebugMT::run ( Search::search sch,
multi_ex ec 
)

Definition at line 20 of file search_meta.cc.

References a, Search::search::base_task(), Search::BaseTask::foreach_action(), and Search::BaseTask::Run().

21 {
22  sch.base_task(ec)
24  [](Search::search& /*sch*/, size_t t, float min_cost, action a, bool taken, float a_cost) -> void {
25  std::cerr << "==DebugMT== foreach_action(t=" << t << ", min_cost=" << min_cost << ", a=" << a
26  << ", taken=" << taken << ", a_cost=" << a_cost << ")" << std::endl;
27  })
28 
29  .post_prediction([](Search::search& /*sch*/, size_t t, action a, float a_cost) -> void {
30  std::cerr << "==DebugMT== post_prediction(t=" << t << ", a=" << a << ", a_cost=" << a_cost << ")" << std::endl;
31  })
32 
33  .maybe_override_prediction([](Search::search& /*sch*/, size_t t, action& a, float& a_cost) -> bool {
34  std::cerr << "==DebugMT== maybe_override_prediction(t=" << t << ", a=" << a << ", a_cost=" << a_cost << ")"
35  << std::endl;
36  return false;
37  })
38 
39  .final_run()
40 
41  .Run();
42 }
uint32_t action
Definition: search.h:19
BaseTask & foreach_action(void(*f)(search &, size_t, float, action, bool, float))
Definition: search.h:42
constexpr uint64_t a
Definition: rand48.cc:11
BaseTask base_task(multi_ex &ec)
Definition: search.h:213

Variable Documentation

◆ metatask

Search::search_metatask DebugMT::metatask = {"debug", run, nullptr, nullptr, nullptr, nullptr}

Definition at line 18 of file search_meta.cc.