6 #define SHUT_RD SD_RECEIVE 10 #define SHUT_WR SD_SEND 14 #define SHUT_RDWR SD_BOTH 105 sender_options.
add(
make_option(
"sendto", host).keep().help(
"send examples to <host>"));
113 auto s = scoped_calloc_or_throw<sender>();
118 s->delay_ring = calloc_or_throw<example*>(all.
p->
ring_size);
void open_sockets(sender &s, std::string host)
v_array< namespace_index > indices
base_learner * make_base(learner< T, E > &base)
void output_byte(io_buf &cache, unsigned char s)
virtual void add_and_parse(const option_group_definition &group)=0
std::array< features, NUM_NAMESPACES > feature_space
void receive_result(sender &s)
void(* set_minmax)(shared_data *sd, float label)
virtual float getLoss(shared_data *, float prediction, float label)=0
void output_features(io_buf &cache, unsigned char index, features &fs, uint64_t mask)
learner< T, E > & init_learner(free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), size_t ws, prediction_type::prediction_type_t pred_type)
void push_back(const T &new_ele)
void learn(sender &s, LEARNER::single_learner &, example &ec)
virtual bool was_supplied(const std::string &key)=0
int open_socket(const char *host, unsigned short port)
unsigned char namespace_index
void(* cache_label)(void *, io_buf &cache)
float get_prediction(example *ec)
void finish_example(vw &, example &)
void send_features(io_buf *b, example &ec, uint32_t mask)
option_group_definition & add(T &&op)
typed_option< T > make_option(std::string name, T &location)
LEARNER::base_learner * sender_setup(options_i &options, vw &all)
void cache_tag(io_buf &cache, v_array< char > tag)
constexpr unsigned char constant_namespace
void end_examples(sender &s)
void return_simple_example(vw &all, void *, example &ec)