Namespaces | |
cb_continuous | |
cb_explore_adf | |
config | |
continuous_actions | |
debug | |
details | |
distributionally_robust | |
experimental | |
io | |
LEARNER | |
Contains the VW::LEARNER::learner object and utilities for interacting with it. | |
math | |
model_utils | |
parsers | |
reductions | |
slates | |
version_definitions | |
Typedefs | |
using | multi_ex = std::vector< example * > |
using | decision_scores_t = std::vector< ACTION_SCORE::action_scores > |
using | example_factory_t = example &(*)(void *) |
using | namespace_index = unsigned char |
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 | driver_output_func_t = void(*)(void *, const std::string &) |
using | string_view = nonstd::string_view |
Functions | |
constexpr bool | action_score_compare_lt (const ACTION_SCORE::action_score &left, const ACTION_SCORE::action_score &right) |
constexpr bool | action_score_compare_gt (const ACTION_SCORE::action_score &left, const ACTION_SCORE::action_score &right) |
std::string | to_string (const ACTION_SCORE::action_scores &action_scores_or_probs, int decimal_precision=DEFAULT_FLOAT_PRECISION) |
std::string | to_string (const VW::active_multiclass_prediction &active_multiclass) |
void | count_label (shared_data &sd, float l) |
bool | get_best_constant (const loss_function &loss_func, const shared_data &sd, float &best_constant, float &best_constant_loss) |
uint32_t | convert (size_t number) |
void | write_example_to_cache (io_buf &output, VW::example *ae, VW::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< VW::example *> &examples) |
std::string | to_string (const cb_continuous::continuous_label_elm &elm, int decimal_precision=DEFAULT_FLOAT_PRECISION) |
std::string | to_string (const cb_continuous::continuous_label &lbl, int decimal_precision=DEFAULT_FLOAT_PRECISION) |
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) |
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) |
std::string | to_string (const VW::decision_scores_t &decision_scores, int decimal_precision=VW::DEFAULT_FLOAT_PRECISION) |
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) |
std::string | to_string (const v_array< float > &scalars, int decimal_precision=DEFAULT_FLOAT_PRECISION) |
flat_example * | flatten_example (VW::workspace &all, example *ec) |
flat_example * | flatten_sort_example (VW::workspace &all, example *ec) |
void | free_flatten_example (flat_example *fec) |
bool | example_is_newline (const example &ec) |
bool | valid_ns (char c) |
void | add_passthrough_feature_magic (example &ec, uint64_t magic, uint64_t i, float x) |
void | return_multiple_example (VW::workspace &all, v_array< example *> &examples) |
VW_STD14_CONSTEXPR float | fast_pow10 (int8_t exponent) |
std::string | to_string (const audit_strings &ai) |
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 |
label_parser | get_label_parser (VW::label_type_t label_type) |
string_view | to_string (VW::label_type_t) |
std::unique_ptr< loss_function > | get_loss_function (VW::workspace &, const std::string &funcName, float function_parameter=0) |
template<typename T , typename... Args> | |
std::unique_ptr< T > | make_unique (Args &&... params) |
std::string | to_string (const MULTILABEL::labels &multilabels) |
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::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 VW::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, VW::v_array< VW::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, VW::example *> *dedup_examples=nullptr) |
template<bool audit> | |
void | read_line_json_s (VW::workspace &all, VW::v_array< VW::example *> &examples, char *line, size_t length, example_factory_t example_factory, void *ex_factory_context, std::unordered_map< uint64_t, VW::example *> *dedup_examples=nullptr) |
bool | apply_pdrop (label_type_t label_type, float pdrop, VW::v_array< VW::example *> &examples, VW::io::logger &logger) |
template<bool audit> | |
bool | read_line_decision_service_json (VW::workspace &all, VW::v_array< VW::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) |
std::vector< std::string > | split_command_line (const std::string &cmd_line) |
std::vector< std::string > | split_command_line (VW::string_view cmd_line) |
std::vector< VW::string_view > | split_by_limit (const VW::string_view &s, size_t limit) |
void | parse_example_label (string_view label, const VW::label_parser &lbl_parser, const named_labels *ldict, label_parser_reuse_mem &reuse_mem, example &ec, VW::io::logger &logger) |
void | setup_examples (VW::workspace &all, v_array< example *> &examples) |
string_view | to_string (prediction_type_t) |
std::string | to_string (const continuous_actions::probability_density_function_value &pdf_value, int decimal_precision=DEFAULT_FLOAT_PRECISION) |
std::string | to_string (const continuous_actions::probability_density_function &pdf, int decimal_precision=DEFAULT_FLOAT_PRECISION) |
template<> | |
CCB::reduction_features & | reduction_features::get< CCB::reduction_features > () |
template<> | |
const CCB::reduction_features & | reduction_features::get< CCB::reduction_features > () const |
template<> | |
VW::continuous_actions::reduction_features & | reduction_features::get< VW::continuous_actions::reduction_features > () |
template<> | |
const VW::continuous_actions::reduction_features & | reduction_features::get< VW::continuous_actions::reduction_features > () const |
template<> | |
VW::cb_explore_adf::greedy::reduction_features & | reduction_features::get< VW::cb_explore_adf::greedy::reduction_features > () |
template<> | |
const VW::cb_explore_adf::greedy::reduction_features & | reduction_features::get< VW::cb_explore_adf::greedy::reduction_features > () const |
VW::string_view | to_string (reductions::automl::automl_state state) |
VW::string_view | to_string (reductions::automl::config_state state) |
template<typename TScopeExitLambda > | |
details::scope_exit_caller< TScopeExitLambda > | scope_exit (TScopeExitLambda &&lambda) noexcept |
VW::string_view | to_string (VW::slates::example_type) |
template<size_t num_cols> | |
void | format_row (const std::array< std::string, num_cols > &contents, const std::array< column_definition, num_cols > &column_definitions, size_t column_padding, std::ostream &output) |
template<size_t num_cols> | |
std::string | format_row (const std::array< std::string, num_cols > &contents, const std::array< column_definition, num_cols > &column_definitions, size_t column_padding) |
bool | try_extract_random_seed (const VW::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... | |
bool | starts_with (VW::string_view full_string, VW::string_view starting) |
Check if a string starts 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... | |
std::string | wrap_text (VW::string_view text, size_t width, bool wrap_after=true) |
Wrap text by whole words with the given column width. More... | |
std::string | fmt_float (float f, int max_decimal_places) |
Format float to string with max number of digits after the decimal place. More... | |
constexpr version_struct | version (VW_VERSION_MAJOR, VW_VERSION_MINOR, VW_VERSION_PATCH) |
VW::workspace * | 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) |
VW::workspace * | initialize (config::options_i &options, io_buf *model=nullptr, bool skip_model_load=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
VW::workspace * | initialize (const std::string &s, io_buf *model=nullptr, bool skip_model_load=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
VW::workspace * | initialize (int argc, char *argv[], io_buf *model=nullptr, bool skip_model_load=false, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
VW::workspace * | seed_vw_model (VW::workspace *vw_model, const std::string &extra_args, trace_message_t trace_listener=nullptr, void *trace_context=nullptr) |
VW::workspace * | 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) |
VW::workspace * | 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) |
VW_WARNING_STATE_PUSH VW_WARNING_DISABLE_BADLY_FORMED_XML std::unique_ptr< VW::workspace > | initialize_experimental (std::unique_ptr< config::options_i > options, std::unique_ptr< VW::io::reader > model_override_reader=nullptr, driver_output_func_t driver_output_func=nullptr, void *driver_output_func_context=nullptr, VW::io::logger_output_func_t logger_output_func=nullptr, void *logger_output_func_context=nullptr, std::unique_ptr< VW::setup_base_i > setup_base=nullptr) |
Initialize a workspace. This interface is currently experimental, but will replace the existing array of initialize functions. More... | |
VW_WARNING_STATE_POP 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) |
VW_WARNING_STATE_PUSH VW_WARNING_DISABLE_BADLY_FORMED_XML void | finish (VW::workspace &all, bool delete_all=true) |
Call finish() after you are done with the vw instance. This cleans up memory usage if delete_all is true. Finish will cause final stat printouts and model serialization to occur. IMPORTANT: If lifetime is managed by a unique_ptr from initialize_experimental, then you must call this with delete_all = false. More... | |
VW_WARNING_STATE_POP 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) |
example * | read_example (VW::workspace &all, const char *example_line) |
example * | read_example (VW::workspace &all, const std::string &example_line) |
example * | import_example (VW::workspace &all, const std::string &label, primitive_feature_space *features, size_t len) |
example * | alloc_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) |
example * | new_unused_example (VW::workspace &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::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_space * | export_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 ®_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) |
VW_STD14_CONSTEXPR uint64_t | uniform_hash (const void *key, size_t len, uint64_t seed) |
Variables | |
static constexpr const int | DEFAULT_FLOAT_PRECISION = 6 |
static constexpr const int | DEFAULT_FLOAT_FORMATTING_DECIMAL_PRECISION = 2 |
const std::string | git_commit |
using VW::decision_scores_t = typedef std::vector<ACTION_SCORE::action_scores> |
using VW::driver_output_func_t = typedef void (*)(void*, const std::string&) |
using VW::example_factory_t = typedef example& (*)(void*) |
typedef std::vector< example * > VW::multi_ex |
typedef unsigned char VW::namespace_index |
using VW::reduction_setup_fn = typedef VW::LEARNER::base_learner* (*)(VW::setup_base_i&) |
using VW::string_view = typedef nonstd::string_view |
using VW::v_array_pool = typedef VW::moved_object_pool<v_array<T> > |
using VW::vector_pool = typedef VW::moved_object_pool<std::vector<T> > |
|
strong |
|
strong |
|
inline |
|
inline |
void VW::add_constant_feature | ( | VW::workspace & | all, |
example * | ec | ||
) |
void VW::add_label | ( | example * | ec, |
float | label, | ||
float | weight = 1 , |
||
float | base = 0 |
||
) |
|
inline |
example* VW::alloc_examples | ( | size_t | count | ) |
|
inline |
const char* VW::are_features_compatible | ( | VW::workspace & | vw1, |
VW::workspace & | vw2 | ||
) |
RetType VW::cast_signed_to_unsigned | ( | InputType | input | ) |
RetType VW::cast_to_smaller_type | ( | InputType | input | ) |
cb_type_t VW::cb_type_from_string | ( | string_view | str | ) |
|
inline |
|
inline |
VW_WARNING_STATE_POP void VW::cmd_string_replace_value | ( | std::stringstream *& | ss, |
std::string | flag_to_replace, | ||
const std::string & | new_value | ||
) |
uint32_t VW::convert | ( | size_t | number | ) |
|
inline |
void VW::dealloc_examples | ( | example * | example_ptr, |
size_t | count | ||
) |
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 .
arg | String to replace hex values within |
void VW::empty_example | ( | VW::workspace & | all, |
example & | ec | ||
) |
void VW::end_parser | ( | VW::workspace & | all | ) |
bool VW::ends_with | ( | VW::string_view | full_string, |
VW::string_view | ending | ||
) |
Check if a string ends with some other string.
full_string | String to check ending of |
ending | Ending value to check |
|
inline |
primitive_feature_space* VW::export_example | ( | VW::workspace & | all, |
example * | e, | ||
size_t & | len | ||
) |
|
inline |
int VW::file_open | ( | FILE ** | pf, |
const char * | filename, | ||
const char * | mode | ||
) |
VW_WARNING_STATE_PUSH VW_WARNING_DISABLE_BADLY_FORMED_XML void VW::finish | ( | VW::workspace & | all, |
bool | delete_all = true |
||
) |
Call finish() after you are done with the vw instance. This cleans up memory usage if delete_all is true. Finish will cause final stat printouts and model serialization to occur. IMPORTANT: If lifetime is managed by a unique_ptr from initialize_experimental, then you must call this with delete_all = false.
all | workspace to be finished |
delete_all | whethere to also also call delete on this instance. |
void VW::finish_example | ( | VW::workspace & | all, |
example & | ec | ||
) |
void VW::finish_example | ( | VW::workspace & | all, |
multi_ex & | ec | ||
) |
|
inline |
|
inline |
std::string VW::fmt_float | ( | float | f, |
int | max_decimal_places | ||
) |
Format float to string with max number of digits after the decimal place.
f | float to format |
max_decimal_places | if >=0 the max number of digits after decimal place. If <0, then as many digits are needed to represent the number will be used |
void VW::format_row | ( | const std::array< std::string, num_cols > & | contents, |
const std::array< column_definition, num_cols > & | column_definitions, | ||
size_t | column_padding, | ||
std::ostream & | output | ||
) |
std::string VW::format_row | ( | const std::array< std::string, num_cols > & | contents, |
const std::array< column_definition, num_cols > & | column_definitions, | ||
size_t | column_padding | ||
) |
void VW::free_args | ( | int | argc, |
char * | argv[] | ||
) |
|
inline |
float VW::get_action_score | ( | example * | ec, |
size_t | i | ||
) |
size_t VW::get_action_score_length | ( | example * | ec | ) |
bool VW::get_best_constant | ( | const loss_function & | loss_func, |
const shared_data & | sd, | ||
float & | best_constant, | ||
float & | best_constant_loss | ||
) |
float VW::get_confidence | ( | example * | ec | ) |
float VW::get_cost_sensitive_prediction | ( | example * | ec | ) |
size_t VW::get_feature_number | ( | example * | ec | ) |
feature* VW::get_features | ( | VW::workspace & | all, |
example * | ec, | ||
size_t & | feature_number | ||
) |
float VW::get_importance | ( | example * | ec | ) |
float VW::get_initial | ( | example * | ec | ) |
float VW::get_label | ( | example * | ec | ) |
label_parser VW::get_label_parser | ( | VW::label_type_t | label_type | ) |
std::unique_ptr<loss_function> VW::get_loss_function | ( | VW::workspace & | , |
const std::string & | funcName, | ||
float | function_parameter = 0 |
||
) |
uint32_t* VW::get_multilabel_predictions | ( | example * | ec, |
size_t & | len | ||
) |
int VW::get_pid | ( | ) |
float VW::get_prediction | ( | example * | ec | ) |
|
inline |
const char* VW::get_tag | ( | example * | ec | ) |
size_t VW::get_tag_length | ( | example * | ec | ) |
float VW::get_topic_prediction | ( | example * | ec, |
size_t | i | ||
) |
example& VW::get_unused_example | ( | VW::workspace * | all | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
example* VW::import_example | ( | VW::workspace & | all, |
const std::string & | label, | ||
primitive_feature_space * | features, | ||
size_t | len | ||
) |
|
inline |
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 |
||
) |
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 |
||
) |
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 |
||
) |
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 |
||
) |
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 |
||
) |
VW_WARNING_STATE_PUSH VW_WARNING_DISABLE_BADLY_FORMED_XML std::unique_ptr<VW::workspace> VW::initialize_experimental | ( | std::unique_ptr< config::options_i > | options, |
std::unique_ptr< VW::io::reader > | model_override_reader = nullptr , |
||
driver_output_func_t | driver_output_func = nullptr , |
||
void * | driver_output_func_context = nullptr , |
||
VW::io::logger_output_func_t | logger_output_func = nullptr , |
||
void * | logger_output_func_context = nullptr , |
||
std::unique_ptr< VW::setup_base_i > | setup_base = nullptr |
||
) |
Initialize a workspace. This interface is currently experimental, but will replace the existing array of initialize functions.
options | The options to initialize the workspace with. Usually an instance of VW::config::options_cli. |
model_override_reader | optional reading source to read the model from. Will override any model specified on the command line. |
driver_output_func | optional function to forward driver ouput to |
driver_output_func_context | context for driver_output_func |
logger_output_func | optional function to forward logger ouput to |
logger_output_func_context | context for logger_output_func |
setup_base | optional advanced override of reduction stack |
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 |
||
) |
bool VW::is_ring_example | ( | const VW::workspace & | all, |
const example * | ae | ||
) |
std::unique_ptr<T> VW::make_unique | ( | Args &&... | params | ) |
void VW::move_feature_namespace | ( | example * | dst, |
example * | src, | ||
namespace_index | c | ||
) |
example* VW::new_unused_example | ( | VW::workspace & | all | ) |
|
inline |
void VW::parse_example_label | ( | string_view | label, |
const VW::label_parser & | lbl_parser, | ||
const named_labels * | ldict, | ||
label_parser_reuse_mem & | reuse_mem, | ||
example & | ec, | ||
VW::io::logger & | logger | ||
) |
void VW::parse_example_label | ( | VW::workspace & | all, |
example & | ec, | ||
const std::string & | label | ||
) |
void VW::print_decision_scores | ( | VW::io::writer * | f, |
const VW::decision_scores_t & | decision_scores, | ||
VW::io::logger & | logger | ||
) |
void VW::print_update_ccb | ( | VW::workspace & | all, |
std::vector< example *> & | slots, | ||
const VW::decision_scores_t & | decision_scores, | ||
size_t | num_features | ||
) |
void VW::print_update_slates | ( | VW::workspace & | all, |
std::vector< example *> & | slots, | ||
const VW::decision_scores_t & | decision_scores, | ||
size_t | num_features | ||
) |
example* VW::read_example | ( | VW::workspace & | all, |
const char * | example_line | ||
) |
example* VW::read_example | ( | VW::workspace & | all, |
const std::string & | example_line | ||
) |
int VW::read_example_from_cache | ( | VW::workspace * | all, |
io_buf & | buf, | ||
v_array< VW::example *> & | examples | ||
) |
void VW::read_line | ( | VW::workspace & | all, |
example * | ex, | ||
const char * | line | ||
) |
bool VW::read_line_decision_service_json | ( | VW::workspace & | all, |
VW::v_array< VW::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_s | ( | const VW::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, | ||
VW::v_array< VW::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, VW::example *> * | dedup_examples = nullptr |
||
) |
void VW::read_line_json_s | ( | VW::workspace & | all, |
VW::v_array< VW::example *> & | examples, | ||
char * | line, | ||
size_t | length, | ||
example_factory_t | example_factory, | ||
void * | ex_factory_context, | ||
std::unordered_map< uint64_t, VW::example *> * | dedup_examples = nullptr |
||
) |
void VW::read_lines | ( | VW::workspace * | all, |
const char * | line, | ||
size_t | len, | ||
v_array< example *> & | examples | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void VW::releaseFeatureSpace | ( | primitive_feature_space * | features, |
size_t | len | ||
) |
void VW::return_features | ( | feature * | f | ) |
void VW::return_multiple_example | ( | VW::workspace & | all, |
v_array< example *> & | examples | ||
) |
void VW::save_predictor | ( | VW::workspace & | all, |
const std::string & | reg_name | ||
) |
void VW::save_predictor | ( | VW::workspace & | all, |
io_buf & | buf | ||
) |
|
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::workspace* VW::seed_vw_model | ( | VW::workspace * | vw_model, |
const std::string & | extra_args, | ||
trace_message_t | trace_listener = nullptr , |
||
void * | trace_context = nullptr |
||
) |
|
inline |
|
inline |
void VW::setup_example | ( | VW::workspace & | all, |
example * | ae | ||
) |
void VW::setup_examples | ( | VW::workspace & | all, |
v_array< example *> & | examples | ||
) |
std::vector<VW::string_view> VW::split_by_limit | ( | const VW::string_view & | s, |
size_t | limit | ||
) |
std::vector<std::string> VW::split_command_line | ( | const std::string & | cmd_line | ) |
std::vector<std::string> VW::split_command_line | ( | VW::string_view | cmd_line | ) |
void VW::start_parser | ( | VW::workspace & | all | ) |
bool VW::starts_with | ( | VW::string_view | full_string, |
VW::string_view | starting | ||
) |
Check if a string starts with some other string.
full_string | String to check starting of |
starting | Starting value to check |
|
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 |
int VW::string_cpy | ( | char * | dest, |
size_t | dest_size, | ||
const char * | src | ||
) |
|
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:
VW_WARNING_STATE_POP void VW::sync_stats | ( | VW::workspace & | all | ) |
char** VW::to_argv | ( | std::string const & | s, |
int & | argc | ||
) |
char** VW::to_argv_escaped | ( | std::string const & | s, |
int & | argc | ||
) |
|
inline |
string_view VW::to_string | ( | cb_type_t | type | ) |
string_view VW::to_string | ( | VW::label_type_t | ) |
string_view VW::to_string | ( | prediction_type_t | ) |
const char* VW::to_string | ( | CCB::example_type | type | ) |
std::string VW::to_string | ( | const MULTILABEL::labels & | multilabels | ) |
std::string VW::to_string | ( | const VW::decision_scores_t & | decision_scores, |
int | decimal_precision = VW::DEFAULT_FLOAT_PRECISION |
||
) |
std::string VW::to_string | ( | const cb_continuous::continuous_label_elm & | elm, |
int | decimal_precision = DEFAULT_FLOAT_PRECISION |
||
) |
std::string VW::to_string | ( | const cb_continuous::continuous_label & | lbl, |
int | decimal_precision = DEFAULT_FLOAT_PRECISION |
||
) |
std::string VW::to_string | ( | const continuous_actions::probability_density_function_value & | pdf_value, |
int | decimal_precision = DEFAULT_FLOAT_PRECISION |
||
) |
std::string VW::to_string | ( | const continuous_actions::probability_density_function & | pdf, |
int | decimal_precision = DEFAULT_FLOAT_PRECISION |
||
) |
|
inline |
VW::string_view VW::to_string | ( | VW::slates::example_type | ) |
std::string VW::to_string | ( | const v_array< float > & | scalars, |
int | decimal_precision = DEFAULT_FLOAT_PRECISION |
||
) |
std::string VW::to_string | ( | const ACTION_SCORE::action_scores & | action_scores_or_probs, |
int | decimal_precision = DEFAULT_FLOAT_PRECISION |
||
) |
VW::string_view VW::to_string | ( | reductions::automl::automl_state | state | ) |
VW::string_view VW::to_string | ( | reductions::automl::config_state | state | ) |
std::string VW::trim_whitespace | ( | const std::string & | s | ) |
VW::string_view VW::trim_whitespace | ( | VW::string_view | str | ) |
bool VW::try_extract_random_seed | ( | const VW::example & | ex, |
VW::string_view & | view | ||
) |
|
inline |
|
inline |
void VW::validate_default_bits | ( | VW::workspace & | all, |
uint32_t | local_num_bits | ||
) |
void VW::validate_min_max_label | ( | VW::workspace & | all | ) |
void VW::validate_num_bits | ( | VW::workspace & | all | ) |
void VW::validate_version | ( | VW::workspace & | all | ) |
constexpr version_struct VW::version | ( | VW_VERSION_MAJOR | , |
VW_VERSION_MINOR | , | ||
VW_VERSION_PATCH | |||
) |
std::string VW::wrap_text | ( | VW::string_view | text, |
size_t | width, | ||
bool | wrap_after = true |
||
) |
Wrap text by whole words with the given column width.
text | text to wrap |
width | column width to wrap to |
wrap_after | if word causes line to exceed width include word on same line. If false, this word would be wrapped to the next line. |
void VW::write_example_to_cache | ( | io_buf & | output, |
VW::example * | ae, | ||
VW::label_parser & | lbl_parser, | ||
uint64_t | parse_mask, | ||
VW::details::cache_temp_buffer & | temp_buffer | ||
) |
|
static |
|
static |
const std::string VW::git_commit |