Vowpal Wabbit
|
Namespaces | |
binary | |
cats_tree | |
cb_continuous | |
cb_explore_adf | |
cbzo | |
config | |
continuous_action | |
continuous_actions | |
details | |
distributionally_robust | |
experimental | |
io | |
LEARNER | |
Contains the VW::LEARNER::learner object and utilities for interacting with it. | |
math | |
metrics | |
offset_tree | |
parsers | |
pmf_to_pdf | |
shared_feature_merger | |
slates | |
Classes | |
struct | active_multiclass_prediction |
struct | chained_proxy_iterator |
struct | default_cleanup |
struct | default_initializer |
class | generic_range |
class | generic_range< IteratorT, typename std::enable_if< std::is_const< IteratorT >::value >::type > |
class | generic_range< IteratorT, typename std::enable_if<!std::is_const< IteratorT >::value >::type > |
class | indexed_iterator_t |
Insertion or removal will result in this value in invalidated. More... | |
class | iterator_t |
Insertion or removal will result in this value in invalidated. More... | |
struct | kskip_ngram_transformer |
struct | metric_sink |
struct | moved_object_pool |
class | named_labels |
struct | namespaced_features |
struct | no_lock_object_pool |
struct | object_pool |
struct | primitive_feature_space |
class | ptr_queue |
class | SpanningTree |
class | strict_parse_exception |
struct | version_struct |
class | vw_argument_disagreement_exception |
class | vw_argument_invalid_value_exception |
class | vw_exception |
class | vw_unrecognised_option_exception |
Typedefs | |
using | decision_scores_t = std::vector< ACTION_SCORE::action_scores > |
typedef example &(* | example_factory_t) (void *) |
template<typename T > | |
using | v_array_pool = VW::moved_object_pool< v_array< T >> |
using | string_view = boost::string_ref |
Functions | |
uint32_t | convert (size_t number) |
void | write_example_to_cache (io_buf &output, example *ae, label_parser &lbl_parser, uint64_t parse_mask) |
int | read_example_from_cache (io_buf &input, example *ae, label_parser &lbl_parser, bool sorted_cache, shared_data *shared_dat) |
int | string_cpy (char *dest, size_t dest_size, const char *src) |
int | file_open (FILE **pf, const char *filename, const char *mode) |
void | print_decision_scores (VW::io::writer *f, const VW::decision_scores_t &decision_scores) |
void | print_update_ccb (vw &all, std::vector< example * > &slots, const VW::decision_scores_t &decision_scores, size_t num_features) |
void | print_update_slates (vw &all, std::vector< example * > &slots, const VW::decision_scores_t &decision_scores, size_t num_features) |
void | copy_example_data (example *dst, const example *src) |
void | setup_example (vw &all, example *ae) |
void | return_multiple_example (vw &all, v_array< example * > &examples) |
VW_STD14_CONSTEXPR float | fast_pow10 (int8_t exponent) |
template<typename T > | |
details::swap_guard_impl< T > | swap_guard (T &original_location, T &value_to_swap) noexcept |
template<typename T > | |
details::swap_guard_impl_rvalue< T > | swap_guard (T &original_location, T &&value_to_swap) noexcept |
template<typename T > | |
details::swap_guard_impl_rvalue< T > | stash_guard (T &original_location) noexcept |
template<typename T , typename... Args> | |
std::unique_ptr< T > | make_unique (Args &&...params) |
template<typename RetType , typename InputType > | |
RetType | cast_to_smaller_type (InputType input) |
template<typename RetType , typename InputType > | |
RetType | cast_signed_to_unsigned (InputType input) |
example & | get_unused_example (vw *all) |
void | read_line (vw &all, example *ex, const char *line) |
void | read_lines (vw *all, const char *line, size_t len, v_array< example * > &examples) |
template<bool audit> | |
void | read_line_json_s (vw &all, v_array< example * > &examples, char *line, size_t length, example_factory_t example_factory, void *ex_factory_context, std::unordered_map< uint64_t, example * > *dedup_examples=nullptr) |
template<bool audit> | |
void | read_line_json (vw &all, v_array< example * > &examples, char *line, example_factory_t example_factory, void *ex_factory_context, std::unordered_map< uint64_t, example * > *dedup_examples=nullptr) |
bool | apply_pdrop (vw &all, float pdrop, v_array< example * > &examples) |
template<bool audit> | |
bool | read_line_decision_service_json (vw &all, v_array< example * > &examples, char *line, size_t length, bool copy_line, example_factory_t example_factory, void *ex_factory_context, DecisionServiceInteraction *data) |
template<typename TScopeExitLambda > | |
details::scope_exit_caller< TScopeExitLambda > | scope_exit (TScopeExitLambda &&lambda) noexcept |
bool | try_extract_random_seed (const example &ex, VW::string_view &view) |
vw * | initialize (std::unique_ptr< config::options_i, options_deleter_type > options, io_buf *model=nullptr, bool skipModelLoad=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
vw * | initialize (config::options_i &options, io_buf *model=nullptr, bool skipModelLoad=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
vw * | initialize (std::string s, io_buf *model=nullptr, bool skipModelLoad=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
vw * | initialize (int argc, char *argv[], io_buf *model=nullptr, bool skipModelLoad=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
vw * | seed_vw_model (vw *vw_model, std::string extra_args, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
vw * | initialize_escaped (std::string const &s, io_buf *model=nullptr, bool skipModelLoad=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
void | cmd_string_replace_value (std::stringstream *&ss, std::string flag_to_replace, std::string new_value) |
VW_DEPRECATED("By value version is deprecated, pass std::string by const ref instead using `to_argv`. This will be removed in VW ""9.0.") char **get_argv_from_string(std char ** | to_argv (std::string const &s, int &argc) |
char ** | to_argv_escaped (std::string const &s, int &argc) |
void | free_args (int argc, char *argv[]) |
const char * | are_features_compatible (vw &vw1, vw &vw2) |
void | finish (vw &all, bool delete_all=true) |
void | sync_stats (vw &all) |
void | start_parser (vw &all) |
void | end_parser (vw &all) |
bool | is_ring_example (vw &all, example *ae) |
example * | read_example (vw &all, const char *example_line) |
example * | read_example (vw &all, const std::string &example_line) |
example * | import_example (vw &all, const std::string &label, primitive_feature_space *features, size_t len) |
example * | alloc_examples (size_t, size_t count) |
example * | alloc_examples (size_t count) |
VW_DEPRECATED ("This interface is deprecated and unsafe. Deletion function pointers are no longer needed. Please use ""dealloc_examples. This will be removed in VW 9.0.") void dealloc_example(void(*delete_label)(polylabel *) | |
void | dealloc_examples (example *example_ptr, size_t count) |
void | parse_example_label (vw &all, example &ec, std::string label) |
void | setup_examples (vw &all, v_array< example * > &examples) |
example * | new_unused_example (vw &all) |
example * | get_example (parser *pf) |
float | get_topic_prediction (example *ec, size_t i) |
float | get_label (example *ec) |
float | get_importance (example *ec) |
float | get_initial (example *ec) |
float | get_prediction (example *ec) |
float | get_cost_sensitive_prediction (example *ec) |
v_array< float > & | get_cost_sensitive_prediction_confidence_scores (example *ec) |
uint32_t * | get_multilabel_predictions (example *ec, size_t &len) |
float | get_action_score (example *ec, size_t i) |
size_t | get_action_score_length (example *ec) |
size_t | get_tag_length (example *ec) |
const char * | get_tag (example *ec) |
size_t | get_feature_number (example *ec) |
float | get_confidence (example *ec) |
feature * | get_features (vw &all, example *ec, size_t &feature_number) |
void | return_features (feature *f) |
void | add_constant_feature (vw &all, example *ec) |
void | add_label (example *ec, float label, float weight=1, float base=0) |
void | finish_example (vw &all, example &ec) |
void | finish_example (vw &all, multi_ex &ec) |
void | empty_example (vw &all, example &ec) |
VW_DEPRECATED ("label size or copy_label are no longer used, please use the other overload. This will be removed in VW 9.0.") void copy_example_data(bool audit | |
void | copy_example_data (bool audit, example *, example *, void(*copy_label)(polylabel *, polylabel *)) |
void | copy_example_metadata (bool audit, example *, example *) |
void | copy_example_data (bool audit, example *, example *) |
void | move_feature_namespace (example *dst, example *src, namespace_index c) |
void | copy_example_metadata (example *, const example *) |
void | copy_example_data_with_label (example *dst, const example *src) |
primitive_feature_space * | export_example (vw &all, example *e, size_t &len) |
void | releaseFeatureSpace (primitive_feature_space *features, size_t len) |
void | save_predictor (vw &all, std::string reg_name) |
void | save_predictor (vw &all, io_buf &buf) |
uint64_t | hash_space (vw &all, const std::string &s) |
uint64_t | hash_space_static (const std::string &s, const std::string &hash) |
uint64_t | hash_space_cstr (vw &all, const char *fstr) |
uint64_t | hash_feature (vw &all, const std::string &s, uint64_t u) |
uint64_t | hash_feature_static (const std::string &s, uint64_t u, const std::string &h, uint32_t num_bits) |
uint64_t | hash_feature_cstr (vw &all, const char *fstr, uint64_t u) |
uint64_t | chain_hash (vw &all, const std::string &name, const std::string &value, uint64_t u) |
float | get_weight (vw &all, uint32_t index, uint32_t offset) |
void | set_weight (vw &all, uint32_t index, uint32_t offset, float value) |
uint32_t | num_weights (vw &all) |
uint32_t | get_stride (vw &all) |
void | init_features (primitive_feature_space &fs, size_t features_count) |
void | set_feature (primitive_feature_space &fs, size_t index, uint64_t feature_hash, float value) |
std::string | strerror_to_string (int error_number) |
void | validate_version (vw &all) |
void | validate_min_max_label (vw &all) |
void | validate_default_bits (vw &all, uint32_t local_num_bits) |
void | validate_num_bits (vw &all) |
Variables | |
const version_struct | version |
const std::string | git_commit |
example & | ec |
example void(* | delete_prediction )(void *) = nullptr) |
example example | size_t |
example example void(* | copy_label )(polylabel *, polylabel *)) |
using VW::decision_scores_t = typedef std::vector<ACTION_SCORE::action_scores> |
typedef example&(* VW::example_factory_t) (void *) |
using VW::string_view = typedef boost::string_ref |
using VW::v_array_pool = typedef VW::moved_object_pool<v_array<T>> |
void VW::add_label | ( | example * | ec, |
float | label, | ||
float | weight = 1 , |
||
float | base = 0 |
||
) |
RetType VW::cast_signed_to_unsigned | ( | InputType | input | ) |
RetType VW::cast_to_smaller_type | ( | InputType | input | ) |
|
inline |
void VW::cmd_string_replace_value | ( | std::stringstream *& | ss, |
std::string | flag_to_replace, | ||
std::string | new_value | ||
) |
uint32_t VW::convert | ( | size_t | number | ) |
void VW::copy_example_data | ( | bool | audit, |
example * | , | ||
example * | , | ||
void(*)(polylabel *, polylabel *) | copy_label | ||
) |
void VW::end_parser | ( | vw & | all | ) |
primitive_feature_space* VW::export_example | ( | vw & | all, |
example * | e, | ||
size_t & | len | ||
) |
|
inline |
|
inline |
void VW::finish | ( | vw & | all, |
bool | delete_all = true |
||
) |
void VW::free_args | ( | int | argc, |
char * | argv[] | ||
) |
float VW::get_confidence | ( | example * | ec | ) |
float VW::get_cost_sensitive_prediction | ( | example * | ec | ) |
float VW::get_importance | ( | example * | ec | ) |
float VW::get_initial | ( | example * | ec | ) |
float VW::get_label | ( | example * | ec | ) |
float VW::get_prediction | ( | example * | ec | ) |
|
inline |
const char* VW::get_tag | ( | example * | ec | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
example* VW::import_example | ( | vw & | all, |
const std::string & | label, | ||
primitive_feature_space * | features, | ||
size_t | len | ||
) |
|
inline |
vw* VW::initialize | ( | std::unique_ptr< config::options_i, options_deleter_type > | options, |
io_buf * | model = nullptr , |
||
bool | skipModelLoad = false , |
||
trace_message_t | trace_listener = nullptr , |
||
void * | trace_context = nullptr |
||
) |
vw* VW::initialize | ( | config::options_i & | options, |
io_buf * | model = nullptr , |
||
bool | skipModelLoad = false , |
||
trace_message_t | trace_listener = nullptr , |
||
void * | trace_context = nullptr |
||
) |
vw* VW::initialize | ( | std::string | s, |
io_buf * | model = nullptr , |
||
bool | skipModelLoad = false , |
||
trace_message_t | trace_listener = nullptr , |
||
void * | trace_context = nullptr |
||
) |
vw* VW::initialize | ( | int | argc, |
char * | argv[], | ||
io_buf * | model = nullptr , |
||
bool | skipModelLoad = false , |
||
trace_message_t | trace_listener = nullptr , |
||
void * | trace_context = nullptr |
||
) |
vw* VW::initialize_escaped | ( | std::string const & | s, |
io_buf * | model = nullptr , |
||
bool | skipModelLoad = false , |
||
trace_message_t | trace_listener = nullptr , |
||
void * | trace_context = nullptr |
||
) |
std::unique_ptr<T> VW::make_unique | ( | Args &&... | params | ) |
void VW::move_feature_namespace | ( | example * | dst, |
example * | src, | ||
namespace_index | c | ||
) |
|
inline |
void VW::print_decision_scores | ( | VW::io::writer * | f, |
const VW::decision_scores_t & | decision_scores | ||
) |
void VW::print_update_ccb | ( | vw & | all, |
std::vector< example * > & | slots, | ||
const VW::decision_scores_t & | decision_scores, | ||
size_t | num_features | ||
) |
void VW::print_update_slates | ( | vw & | all, |
std::vector< example * > & | slots, | ||
const VW::decision_scores_t & | decision_scores, | ||
size_t | num_features | ||
) |
int VW::read_example_from_cache | ( | io_buf & | input, |
example * | ae, | ||
label_parser & | lbl_parser, | ||
bool | sorted_cache, | ||
shared_data * | shared_dat | ||
) |
bool VW::read_line_decision_service_json | ( | vw & | all, |
v_array< example * > & | examples, | ||
char * | line, | ||
size_t | length, | ||
bool | copy_line, | ||
example_factory_t | example_factory, | ||
void * | ex_factory_context, | ||
DecisionServiceInteraction * | data | ||
) |
void VW::read_line_json | ( | vw & | all, |
v_array< example * > & | examples, | ||
char * | line, | ||
example_factory_t | example_factory, | ||
void * | ex_factory_context, | ||
std::unordered_map< uint64_t, example * > * | dedup_examples = nullptr |
||
) |
void VW::read_line_json_s | ( | vw & | all, |
v_array< example * > & | examples, | ||
char * | line, | ||
size_t | length, | ||
example_factory_t | example_factory, | ||
void * | ex_factory_context, | ||
std::unordered_map< uint64_t, example * > * | dedup_examples = nullptr |
||
) |
void VW::releaseFeatureSpace | ( | primitive_feature_space * | features, |
size_t | len | ||
) |
void VW::return_features | ( | feature * | f | ) |
void VW::save_predictor | ( | vw & | all, |
std::string | reg_name | ||
) |
|
inlinenoexcept |
Created an RAII object which executes the provided lambda when the scope exits. The primary use case is to handle cleanup in code where exceptions are possible but the code is not exception safe.
#### Example:
vw* VW::seed_vw_model | ( | vw * | vw_model, |
std::string | extra_args, | ||
trace_message_t | trace_listener = nullptr , |
||
void * | trace_context = nullptr |
||
) |
|
inline |
|
inline |
void VW::start_parser | ( | vw & | all | ) |
|
inlinenoexcept |
This guard will replace the location with a default constructed object on creation and upon deletion swap the original value back. This guard is equivalent to swap_guard<T>(xxx, T())
#### Example:
|
inline |
|
inline |
|
inlinenoexcept |
This guard will swap the two locations on creation and upon deletion swap them back.
#### Example:
|
inlinenoexcept |
This guard will swap the two locations on creation and upon deletion swap them back. Note: This overload allows for a temporary value to be passed in.
#### Example:
void VW::sync_stats | ( | vw & | all | ) |
VW_DEPRECATED ( "By value version is deprecated, pass std::string by const ref instead using `to_argv`. This will be removed in VW " "9.0.") char** get_argv_from_string(std char** VW::to_argv | ( | std::string const & | s, |
int & | argc | ||
) |
char** VW::to_argv_escaped | ( | std::string const & | s, |
int & | argc | ||
) |
bool VW::try_extract_random_seed | ( | const example & | ex, |
VW::string_view & | view | ||
) |
void VW::validate_default_bits | ( | vw & | all, |
uint32_t | local_num_bits | ||
) |
void VW::validate_min_max_label | ( | vw & | all | ) |
void VW::validate_num_bits | ( | vw & | all | ) |
void VW::validate_version | ( | vw & | all | ) |
VW::VW_DEPRECATED | ( | "This interface is deprecated and unsafe. Deletion function pointers are no longer needed. Please use ""dealloc_examples. This will be removed in VW 9.0." | ) |
VW::VW_DEPRECATED | ( | "label size or copy_label are no longer | used, |
please use the other overload.This will be removed in VW 9.0." | |||
) |
void VW::write_example_to_cache | ( | io_buf & | output, |
example * | ae, | ||
label_parser & | lbl_parser, | ||
uint64_t | parse_mask | ||
) |
example void(* VW::delete_prediction) (void *) = nullptr) |
example& VW::ec |
const std::string VW::git_commit |
const version_struct VW::version |