Vowpal Wabbit
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
VW Namespace Reference

Namespaces

 automl
 
 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
 
 model_utils
 
 offset_tree
 
 parsers
 
 pmf_to_pdf
 
 shared_feature_merger
 
 slates
 
 version_definitions
 

Classes

struct  active_multiclass_prediction
 
struct  cached_learner
 
struct  default_cleanup
 
struct  default_initializer
 
struct  default_reduction_stack_setup
 
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 >
 
struct  kskip_ngram_transformer
 
struct  label_parser_reuse_mem
 
struct  metric_sink
 
struct  metric_sink_visitor
 
struct  moved_object_pool
 
class  named_labels
 
struct  namespace_extent
 
struct  no_lock_object_pool
 
struct  object_pool
 
struct  primitive_feature_space
 
class  ptr_queue
 
struct  rand_state
 
class  save_load_model_exception
 
struct  scored_config
 
struct  setup_base_i
 
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
 
struct  workspace
 

Typedefs

using decision_scores_t = std::vector< ACTION_SCORE::action_scores >
 
using example_factory_t = example &(*)(void *)
 
using reduction_setup_fn = VW::LEARNER::base_learner *(*)(VW::setup_base_i &)
 
template<typename T >
using v_array_pool = VW::moved_object_pool< v_array< T > >
 
template<typename T >
using vector_pool = VW::moved_object_pool< std::vector< T > >
 
using string_view = boost::string_ref
 

Enumerations

enum  cb_type_t : uint32_t {
  cb_type_t::dr, cb_type_t::dm, cb_type_t::ips, cb_type_t::mtr,
  cb_type_t::sm
}
 
enum  label_type_t : uint32_t {
  label_type_t::simple, label_type_t::cb, label_type_t::cb_eval, label_type_t::cs,
  label_type_t::multilabel, label_type_t::multiclass, label_type_t::ccb, label_type_t::slates,
  label_type_t::nolabel, label_type_t::continuous
}
 
enum  prediction_type_t : uint32_t {
  prediction_type_t::scalar, prediction_type_t::scalars, prediction_type_t::action_scores, prediction_type_t::pdf,
  prediction_type_t::action_probs, prediction_type_t::multiclass, prediction_type_t::multilabels, prediction_type_t::prob,
  prediction_type_t::multiclassprobs, prediction_type_t::decision_probs, prediction_type_t::action_pdf_value, prediction_type_t::active_multiclass,
  prediction_type_t::nopred
}
 

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, VW::details::cache_temp_buffer &temp_buffer)
 
int read_example_from_cache (VW::workspace *all, io_buf &buf, v_array< example *> &examples)
 
cb_type_t cb_type_from_string (string_view str)
 
string_view to_string (cb_type_t type)
 
const char * to_string (CCB::example_type type)
 
VW::LEARNER::base_learnercount_label_setup (VW::setup_base_i &stack_builder)
 
int string_cpy (char *dest, size_t dest_size, const char *src)
 
int file_open (FILE **pf, const char *filename, const char *mode)
 
int get_pid ()
 
void print_decision_scores (VW::io::writer *f, const VW::decision_scores_t &decision_scores, VW::io::logger &logger)
 
void print_update_ccb (VW::workspace &all, std::vector< example *> &slots, const VW::decision_scores_t &decision_scores, size_t num_features)
 
void print_update_slates (VW::workspace &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::workspace &all, example *ae)
 
void return_multiple_example (VW::workspace &all, v_array< example *> &examples)
 
VW_STD14_CONSTEXPR float fast_pow10 (int8_t exponent)
 
VW::LEARNER::base_learnerfreegrad_setup (VW::setup_base_i &stack_builder)
 Wiki page: https://github.com/VowpalWabbit/vowpal_wabbit/wiki/FreeGrad. More...
 
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
 
VW::LEARNER::base_learnerinteraction_ground_setup (VW::setup_base_i &stack_builder)
 
label_parser get_label_parser (VW::label_type_t label_type)
 
string_view to_string (VW::label_type_t)
 
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)
 
exampleget_unused_example (VW::workspace *all)
 
void read_line (VW::workspace &all, example *ex, const char *line)
 
void read_lines (VW::workspace *all, const char *line, size_t len, v_array< example *> &examples)
 
template<bool audit>
void read_line_json_s (const label_parser &lbl_parser, hash_func_t hash_func, uint64_t hash_seed, uint64_t parse_mask, bool chain_hash, VW::label_parser_reuse_mem *reuse_mem, const VW::named_labels *ldict, v_array< example *> &examples, char *line, size_t length, example_factory_t example_factory, void *ex_factory_context, VW::io::logger &logger, std::unordered_map< uint64_t, example *> *dedup_examples=nullptr)
 
template<bool audit>
void read_line_json_s (VW::workspace &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)
 
bool apply_pdrop (label_type_t label_type, float pdrop, v_array< example *> &examples, VW::io::logger &logger)
 
template<bool audit>
bool read_line_decision_service_json (VW::workspace &all, v_array< example *> &examples, char *line, size_t length, bool copy_line, example_factory_t example_factory, void *ex_factory_context, DecisionServiceInteraction *data)
 
std::string trim_whitespace (const std::string &s)
 
VW::string_view trim_whitespace (VW::string_view str)
 
void parse_example_label (string_view label, const label_parser &lbl_parser, const named_labels *ldict, label_parser_reuse_mem &reuse_mem, example &ec, VW::io::logger &logger)
 
string_view to_string (prediction_type_t)
 
template<typename TScopeExitLambda >
details::scope_exit_caller< TScopeExitLambda > scope_exit (TScopeExitLambda &&lambda) noexcept
 
VW::string_view to_string (VW::slates::example_type)
 
bool try_extract_random_seed (const example &ex, VW::string_view &view)
 
bool ends_with (VW::string_view full_string, VW::string_view ending)
 Check if a string ends with some other string. More...
 
std::string decode_inline_hex (VW::string_view arg, VW::io::logger &logger)
 Replace hex sequences in a string with their corresponding byte. A hex sequence must only contain two digits and must be in the form . More...
 
constexpr version_struct version (VW_VERSION_MAJOR, VW_VERSION_MINOR, VW_VERSION_PATCH)
 
VW::workspaceinitialize (std::unique_ptr< config::options_i, options_deleter_type > options, io_buf *model=nullptr, bool skip_model_load=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr)
 
VW::workspaceinitialize (config::options_i &options, io_buf *model=nullptr, bool skip_model_load=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr)
 
VW::workspaceinitialize (const std::string &s, io_buf *model=nullptr, bool skip_model_load=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr)
 
VW::workspaceinitialize (int argc, char *argv[], io_buf *model=nullptr, bool skip_model_load=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr)
 
VW::workspaceseed_vw_model (VW::workspace *vw_model, const std::string &extra_args, trace_message_t trace_listener=nullptr, void *trace_context=nullptr)
 
VW::workspaceinitialize_escaped (std::string const &s, io_buf *model=nullptr, bool skip_model_load=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr)
 
VW::workspaceinitialize_with_builder (const std::string &s, io_buf *model=nullptr, bool skipModelLoad=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr, std::unique_ptr< VW::setup_base_i >=nullptr)
 
void cmd_string_replace_value (std::stringstream *&ss, std::string flag_to_replace, const std::string &new_value)
 
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::workspace &vw1, VW::workspace &vw2)
 
void finish (VW::workspace &all, bool delete_all=true)
 
void sync_stats (VW::workspace &all)
 
void start_parser (VW::workspace &all)
 
void end_parser (VW::workspace &all)
 
bool is_ring_example (const VW::workspace &all, const example *ae)
 
exampleread_example (VW::workspace &all, const char *example_line)
 
exampleread_example (VW::workspace &all, const std::string &example_line)
 
exampleimport_example (VW::workspace &all, const std::string &label, primitive_feature_space *features, size_t len)
 
examplealloc_examples (size_t count)
 
void dealloc_examples (example *example_ptr, size_t count)
 
void parse_example_label (VW::workspace &all, example &ec, const std::string &label)
 
void setup_examples (VW::workspace &all, v_array< example *> &examples)
 
examplenew_unused_example (VW::workspace &all)
 
exampleget_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)
 
featureget_features (VW::workspace &all, example *ec, size_t &feature_number)
 
void return_features (feature *f)
 
void add_constant_feature (VW::workspace &all, example *ec)
 
void add_label (example *ec, float label, float weight=1, float base=0)
 
void finish_example (VW::workspace &all, example &ec)
 
void finish_example (VW::workspace &all, multi_ex &ec)
 
void empty_example (VW::workspace &all, example &ec)
 
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_spaceexport_example (VW::workspace &all, example *e, size_t &len)
 
void releaseFeatureSpace (primitive_feature_space *features, size_t len)
 
void save_predictor (VW::workspace &all, const std::string &reg_name)
 
void save_predictor (VW::workspace &all, io_buf &buf)
 
uint64_t hash_space (VW::workspace &all, const std::string &s)
 
uint64_t hash_space_static (const std::string &s, const std::string &hash)
 
uint64_t hash_space_cstr (VW::workspace &all, const char *fstr)
 
uint64_t hash_feature (VW::workspace &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::workspace &all, const char *fstr, uint64_t u)
 
uint64_t chain_hash (VW::workspace &all, const std::string &name, const std::string &value, uint64_t u)
 
uint64_t chain_hash_static (const std::string &name, const std::string &value, uint64_t u, hash_func_t hash_func, uint64_t parse_mask)
 
float get_weight (VW::workspace &all, uint32_t index, uint32_t offset)
 
void set_weight (VW::workspace &all, uint32_t index, uint32_t offset, float value)
 
uint32_t num_weights (VW::workspace &all)
 
uint32_t get_stride (VW::workspace &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::workspace &all)
 
void validate_min_max_label (VW::workspace &all)
 
void validate_default_bits (VW::workspace &all, uint32_t local_num_bits)
 
void validate_num_bits (VW::workspace &all)
 

Variables

const std::string git_commit
 

Typedef Documentation

◆ decision_scores_t

using VW::decision_scores_t = typedef std::vector<ACTION_SCORE::action_scores>

◆ example_factory_t

using VW::example_factory_t = typedef example& (*)(void*)

◆ reduction_setup_fn

using VW::reduction_setup_fn = typedef VW::LEARNER::base_learner* (*)(VW::setup_base_i&)

◆ string_view

using VW::string_view = typedef boost::string_ref

◆ v_array_pool

template<typename T >
using VW::v_array_pool = typedef VW::moved_object_pool<v_array<T> >

◆ vector_pool

template<typename T >
using VW::vector_pool = typedef VW::moved_object_pool<std::vector<T> >

Enumeration Type Documentation

◆ cb_type_t

enum VW::cb_type_t : uint32_t
strong
Enumerator
dr 
dm 
ips 
mtr 
sm 

◆ label_type_t

enum typedef VW::prediction_type_t VW::label_type_t
strong
Enumerator
simple 
cb 
cb_eval 
cs 
multilabel 
multiclass 
ccb 
slates 
nolabel 
continuous 

◆ prediction_type_t

enum VW::prediction_type_t : uint32_t
strong
Enumerator
scalar 
scalars 
action_scores 
pdf 
action_probs 
multiclass 
multilabels 
prob 
multiclassprobs 
decision_probs 
action_pdf_value 
active_multiclass 
nopred 

Function Documentation

◆ add_constant_feature()

void VW::add_constant_feature ( VW::workspace all,
example ec 
)

◆ add_label()

void VW::add_label ( example ec,
float  label,
float  weight = 1,
float  base = 0 
)

◆ alloc_examples()

example* VW::alloc_examples ( size_t  count)

◆ apply_pdrop()

bool VW::apply_pdrop ( label_type_t  label_type,
float  pdrop,
v_array< example *> &  examples,
VW::io::logger logger 
)
inline

◆ are_features_compatible()

const char* VW::are_features_compatible ( VW::workspace vw1,
VW::workspace vw2 
)

◆ cast_signed_to_unsigned()

template<typename RetType , typename InputType >
RetType VW::cast_signed_to_unsigned ( InputType  input)

◆ cast_to_smaller_type()

template<typename RetType , typename InputType >
RetType VW::cast_to_smaller_type ( InputType  input)

◆ cb_type_from_string()

cb_type_t VW::cb_type_from_string ( string_view  str)

◆ chain_hash()

uint64_t VW::chain_hash ( VW::workspace all,
const std::string &  name,
const std::string &  value,
uint64_t  u 
)
inline

◆ chain_hash_static()

uint64_t VW::chain_hash_static ( const std::string &  name,
const std::string &  value,
uint64_t  u,
hash_func_t  hash_func,
uint64_t  parse_mask 
)
inline

◆ cmd_string_replace_value()

void VW::cmd_string_replace_value ( std::stringstream *&  ss,
std::string  flag_to_replace,
const std::string &  new_value 
)

◆ convert()

uint32_t VW::convert ( size_t  number)

◆ copy_example_data()

void VW::copy_example_data ( example dst,
const example src 
)

◆ copy_example_data_with_label()

void VW::copy_example_data_with_label ( example dst,
const example src 
)

◆ copy_example_metadata()

void VW::copy_example_metadata ( example ,
const example  
)

◆ count_label_setup()

VW::LEARNER::base_learner* VW::count_label_setup ( VW::setup_base_i stack_builder)

◆ dealloc_examples()

void VW::dealloc_examples ( example example_ptr,
size_t  count 
)

◆ decode_inline_hex()

std::string VW::decode_inline_hex ( VW::string_view  arg,
VW::io::logger logger 
)

Replace hex sequences in a string with their corresponding byte. A hex sequence must only contain two digits and must be in the form .

Parameters
argString to replace hex values within
Returns
A copy of the original string with hex values replaced with corresponding byte.

◆ empty_example()

void VW::empty_example ( VW::workspace all,
example ec 
)

◆ end_parser()

void VW::end_parser ( VW::workspace all)

◆ ends_with()

bool VW::ends_with ( VW::string_view  full_string,
VW::string_view  ending 
)

Check if a string ends with some other string.

Parameters
full_stringString to check ending of
endingEnding value to check
Returns
true if full_string ends with ending, otherwise false.

◆ export_example()

primitive_feature_space* VW::export_example ( VW::workspace all,
example e,
size_t &  len 
)

◆ fast_pow10()

VW_STD14_CONSTEXPR float VW::fast_pow10 ( int8_t  exponent)
inline

◆ file_open()

int VW::file_open ( FILE **  pf,
const char *  filename,
const char *  mode 
)

◆ finish()

void VW::finish ( VW::workspace all,
bool  delete_all = true 
)

◆ finish_example() [1/2]

void VW::finish_example ( VW::workspace all,
example ec 
)

◆ finish_example() [2/2]

void VW::finish_example ( VW::workspace all,
multi_ex ec 
)

◆ free_args()

void VW::free_args ( int  argc,
char *  argv[] 
)

◆ freegrad_setup()

VW::LEARNER::base_learner* VW::freegrad_setup ( VW::setup_base_i stack_builder)

◆ get_action_score()

float VW::get_action_score ( example ec,
size_t  i 
)

◆ get_action_score_length()

size_t VW::get_action_score_length ( example ec)

◆ get_confidence()

float VW::get_confidence ( example ec)

◆ get_cost_sensitive_prediction()

float VW::get_cost_sensitive_prediction ( example ec)

◆ get_cost_sensitive_prediction_confidence_scores()

v_array<float>& VW::get_cost_sensitive_prediction_confidence_scores ( example ec)

◆ get_example()

example* VW::get_example ( parser pf)

◆ get_feature_number()

size_t VW::get_feature_number ( example ec)

◆ get_features()

feature* VW::get_features ( VW::workspace all,
example ec,
size_t &  feature_number 
)

◆ get_importance()

float VW::get_importance ( example ec)

◆ get_initial()

float VW::get_initial ( example ec)

◆ get_label()

float VW::get_label ( example ec)

◆ get_label_parser()

label_parser VW::get_label_parser ( VW::label_type_t  label_type)

◆ get_multilabel_predictions()

uint32_t* VW::get_multilabel_predictions ( example ec,
size_t &  len 
)

◆ get_pid()

int VW::get_pid ( )

◆ get_prediction()

float VW::get_prediction ( example ec)

◆ get_stride()

uint32_t VW::get_stride ( VW::workspace all)
inline

◆ get_tag()

const char* VW::get_tag ( example ec)

◆ get_tag_length()

size_t VW::get_tag_length ( example ec)

◆ get_topic_prediction()

float VW::get_topic_prediction ( example ec,
size_t  i 
)

◆ get_unused_example()

example& VW::get_unused_example ( VW::workspace all)

◆ get_weight()

float VW::get_weight ( VW::workspace all,
uint32_t  index,
uint32_t  offset 
)
inline

◆ hash_feature()

uint64_t VW::hash_feature ( VW::workspace all,
const std::string &  s,
uint64_t  u 
)
inline

◆ hash_feature_cstr()

uint64_t VW::hash_feature_cstr ( VW::workspace all,
const char *  fstr,
uint64_t  u 
)
inline

◆ hash_feature_static()

uint64_t VW::hash_feature_static ( const std::string &  s,
uint64_t  u,
const std::string &  h,
uint32_t  num_bits 
)
inline

◆ hash_space()

uint64_t VW::hash_space ( VW::workspace all,
const std::string &  s 
)
inline

◆ hash_space_cstr()

uint64_t VW::hash_space_cstr ( VW::workspace all,
const char *  fstr 
)
inline

◆ hash_space_static()

uint64_t VW::hash_space_static ( const std::string &  s,
const std::string &  hash 
)
inline

◆ import_example()

example* VW::import_example ( VW::workspace all,
const std::string &  label,
primitive_feature_space features,
size_t  len 
)

◆ init_features()

void VW::init_features ( primitive_feature_space fs,
size_t  features_count 
)
inline

◆ initialize() [1/4]

VW::workspace* VW::initialize ( std::unique_ptr< config::options_i, options_deleter_type options,
io_buf model = nullptr,
bool  skip_model_load = false,
trace_message_t  trace_listener = nullptr,
void *  trace_context = nullptr 
)

◆ initialize() [2/4]

VW::workspace* VW::initialize ( config::options_i options,
io_buf model = nullptr,
bool  skip_model_load = false,
trace_message_t  trace_listener = nullptr,
void *  trace_context = nullptr 
)

◆ initialize() [3/4]

VW::workspace* VW::initialize ( const std::string &  s,
io_buf model = nullptr,
bool  skip_model_load = false,
trace_message_t  trace_listener = nullptr,
void *  trace_context = nullptr 
)

◆ initialize() [4/4]

VW::workspace* VW::initialize ( int  argc,
char *  argv[],
io_buf model = nullptr,
bool  skip_model_load = false,
trace_message_t  trace_listener = nullptr,
void *  trace_context = nullptr 
)

◆ initialize_escaped()

VW::workspace* VW::initialize_escaped ( std::string const &  s,
io_buf model = nullptr,
bool  skip_model_load = false,
trace_message_t  trace_listener = nullptr,
void *  trace_context = nullptr 
)

◆ initialize_with_builder()

VW::workspace* VW::initialize_with_builder ( const std::string &  s,
io_buf model = nullptr,
bool  skipModelLoad = false,
trace_message_t  trace_listener = nullptr,
void *  trace_context = nullptr,
std::unique_ptr< VW::setup_base_i = nullptr 
)

◆ interaction_ground_setup()

VW::LEARNER::base_learner* VW::interaction_ground_setup ( VW::setup_base_i stack_builder)

Setup interaction grounded learning reduction. Wiki page: https://github.com/VowpalWabbit/vowpal_wabbit/wiki/Interaction-Grounded-Learning

Parameters
stack_builderStack builder to use for setup.
Returns
VW::LEARNER::base_learner* learner if this reduction is active, nullptr otherwise

◆ is_ring_example()

bool VW::is_ring_example ( const VW::workspace all,
const example ae 
)

◆ make_unique()

template<typename T , typename... Args>
std::unique_ptr<T> VW::make_unique ( Args &&...  params)

◆ move_feature_namespace()

void VW::move_feature_namespace ( example dst,
example src,
namespace_index  c 
)

◆ new_unused_example()

example* VW::new_unused_example ( VW::workspace all)

◆ num_weights()

uint32_t VW::num_weights ( VW::workspace all)
inline

◆ parse_example_label() [1/2]

void VW::parse_example_label ( string_view  label,
const label_parser lbl_parser,
const named_labels ldict,
label_parser_reuse_mem reuse_mem,
example ec,
VW::io::logger logger 
)

◆ parse_example_label() [2/2]

void VW::parse_example_label ( VW::workspace all,
example ec,
const std::string &  label 
)

◆ print_decision_scores()

void VW::print_decision_scores ( VW::io::writer f,
const VW::decision_scores_t decision_scores,
VW::io::logger logger 
)

◆ print_update_ccb()

void VW::print_update_ccb ( VW::workspace all,
std::vector< example *> &  slots,
const VW::decision_scores_t decision_scores,
size_t  num_features 
)

◆ print_update_slates()

void VW::print_update_slates ( VW::workspace all,
std::vector< example *> &  slots,
const VW::decision_scores_t decision_scores,
size_t  num_features 
)

◆ read_example() [1/2]

example* VW::read_example ( VW::workspace all,
const char *  example_line 
)

◆ read_example() [2/2]

example* VW::read_example ( VW::workspace all,
const std::string &  example_line 
)

◆ read_example_from_cache()

int VW::read_example_from_cache ( VW::workspace all,
io_buf buf,
v_array< example *> &  examples 
)

◆ read_line()

void VW::read_line ( VW::workspace all,
example ex,
const char *  line 
)

◆ read_line_decision_service_json()

template<bool audit>
bool VW::read_line_decision_service_json ( VW::workspace all,
v_array< example *> &  examples,
char *  line,
size_t  length,
bool  copy_line,
example_factory_t  example_factory,
void *  ex_factory_context,
DecisionServiceInteraction data 
)

◆ read_line_json_s() [1/2]

template<bool audit>
void VW::read_line_json_s ( const label_parser lbl_parser,
hash_func_t  hash_func,
uint64_t  hash_seed,
uint64_t  parse_mask,
bool  chain_hash,
VW::label_parser_reuse_mem reuse_mem,
const VW::named_labels ldict,
v_array< example *> &  examples,
char *  line,
size_t  length,
example_factory_t  example_factory,
void *  ex_factory_context,
VW::io::logger logger,
std::unordered_map< uint64_t, example *> *  dedup_examples = nullptr 
)

◆ read_line_json_s() [2/2]

template<bool audit>
void VW::read_line_json_s ( VW::workspace 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 
)

◆ read_lines()

void VW::read_lines ( VW::workspace all,
const char *  line,
size_t  len,
v_array< example *> &  examples 
)

◆ releaseFeatureSpace()

void VW::releaseFeatureSpace ( primitive_feature_space features,
size_t  len 
)

◆ return_features()

void VW::return_features ( feature f)

◆ return_multiple_example()

void VW::return_multiple_example ( VW::workspace all,
v_array< example *> &  examples 
)

◆ save_predictor() [1/2]

void VW::save_predictor ( VW::workspace all,
const std::string &  reg_name 
)

◆ save_predictor() [2/2]

void VW::save_predictor ( VW::workspace all,
io_buf buf 
)

◆ scope_exit()

template<typename TScopeExitLambda >
details::scope_exit_caller<TScopeExitLambda> VW::scope_exit ( TScopeExitLambda &&  lambda)
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:

{
auto* resource = /* some_resource_that_needs_cleanup */;
auto guard = VW::scope_exit([resource]() { /* cleanup_resource(resource); */ });
}
// Lambda has executed at this point.

◆ seed_vw_model()

VW::workspace* VW::seed_vw_model ( VW::workspace vw_model,
const std::string &  extra_args,
trace_message_t  trace_listener = nullptr,
void *  trace_context = nullptr 
)

◆ set_feature()

void VW::set_feature ( primitive_feature_space fs,
size_t  index,
uint64_t  feature_hash,
float  value 
)
inline

◆ set_weight()

void VW::set_weight ( VW::workspace all,
uint32_t  index,
uint32_t  offset,
float  value 
)
inline

◆ setup_example()

void VW::setup_example ( VW::workspace all,
example ae 
)

◆ setup_examples()

void VW::setup_examples ( VW::workspace all,
v_array< example *> &  examples 
)

◆ start_parser()

void VW::start_parser ( VW::workspace all)

◆ stash_guard()

template<typename T >
details::swap_guard_impl_rvalue<T> VW::stash_guard ( T &  original_location)
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:

void use_widget(widget& my_widget)
{
auto new_widget_value = ::get_new_widget_value();
auto temp = std::move(my_widget.value);
my_widget.value = std::move(new_widget_value);
do_thing_with_widget(my_widget);
new_widget_value = std::move(my_widget.value);
my_widget.value = std::move(temp);
}
// Can be replaced with:
void use_widget(widget& my_widget)
{
auto guard = VW::swap_guard(my_widget.value, ::get_new_widget_value(););
do_thing_with_widget(my_widget);
}

◆ strerror_to_string()

std::string VW::strerror_to_string ( int  error_number)
inline

◆ string_cpy()

int VW::string_cpy ( char *  dest,
size_t  dest_size,
const char *  src 
)

◆ swap_guard() [1/2]

template<typename T >
details::swap_guard_impl<T> VW::swap_guard ( T &  original_location,
T &  value_to_swap 
)
inlinenoexcept

This guard will swap the two locations on creation and upon deletion swap them back.

#### Example:

void use_widget(widget& my_widget)
{
auto new_widget_value = ::get_new_widget_value();
auto temp = std::move(my_widget.value);
my_widget.value = std::move(new_widget_value);
do_thing_with_widget(my_widget);
new_widget_value = std::move(my_widget.value);
my_widget.value = std::move(temp);
}
// Can be replaced with:
void use_widget(widget& my_widget)
{
auto new_widget_value = ::get_new_widget_value();
auto guard = VW::swap_guard(my_widget.value, new_widget_value);
do_thing_with_widget(my_widget);
}

◆ swap_guard() [2/2]

template<typename T >
details::swap_guard_impl_rvalue<T> VW::swap_guard ( T &  original_location,
T &&  value_to_swap 
)
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 use_widget(widget& my_widget)
{
auto new_widget_value = ::get_new_widget_value();
auto temp = std::move(my_widget.value);
my_widget.value = std::move(new_widget_value);
do_thing_with_widget(my_widget);
new_widget_value = std::move(my_widget.value);
my_widget.value = std::move(temp);
}
// Can be replaced with:
void use_widget(widget& my_widget)
{
auto guard = VW::swap_guard(my_widget.value, ::get_new_widget_value(););
do_thing_with_widget(my_widget);
}

◆ sync_stats()

void VW::sync_stats ( VW::workspace all)

◆ to_argv()

char** VW::to_argv ( std::string const &  s,
int &  argc 
)

◆ to_argv_escaped()

char** VW::to_argv_escaped ( std::string const &  s,
int &  argc 
)

◆ to_string() [1/5]

string_view VW::to_string ( cb_type_t  type)

◆ to_string() [2/5]

string_view VW::to_string ( VW::label_type_t  )

◆ to_string() [3/5]

string_view VW::to_string ( prediction_type_t  )

◆ to_string() [4/5]

const char* VW::to_string ( CCB::example_type  type)

◆ to_string() [5/5]

◆ trim_whitespace() [1/2]

std::string VW::trim_whitespace ( const std::string &  s)

◆ trim_whitespace() [2/2]

VW::string_view VW::trim_whitespace ( VW::string_view  str)

◆ try_extract_random_seed()

bool VW::try_extract_random_seed ( const example ex,
VW::string_view view 
)

◆ validate_default_bits()

void VW::validate_default_bits ( VW::workspace all,
uint32_t  local_num_bits 
)

◆ validate_min_max_label()

void VW::validate_min_max_label ( VW::workspace all)

◆ validate_num_bits()

void VW::validate_num_bits ( VW::workspace all)

◆ validate_version()

void VW::validate_version ( VW::workspace all)

◆ version()

constexpr version_struct VW::version ( VW_VERSION_MAJOR  ,
VW_VERSION_MINOR  ,
VW_VERSION_PATCH   
)

◆ write_example_to_cache()

void VW::write_example_to_cache ( io_buf output,
example ae,
label_parser lbl_parser,
uint64_t  parse_mask,
VW::details::cache_temp_buffer temp_buffer 
)

Variable Documentation

◆ git_commit

const std::string VW::git_commit