Vowpal Wabbit
|
#include <stdio.h>
#include <float.h>
#include <sstream>
#include <fstream>
#include <sys/types.h>
#include <sys/stat.h>
#include <algorithm>
#include "parse_regressor.h"
#include "parser.h"
#include "parse_primitives.h"
#include "vw.h"
#include "interactions.h"
#include "sender.h"
#include "nn.h"
#include "gd.h"
#include "cbify.h"
#include "oaa.h"
#include "boosting.h"
#include "multilabel_oaa.h"
#include "rand48.h"
#include "bs.h"
#include "topk.h"
#include "ect.h"
#include "csoaa.h"
#include "cb_algs.h"
#include "cb_adf.h"
#include "cb_explore.h"
#include "cb_explore_adf_bag.h"
#include "cb_explore_adf_cover.h"
#include "cb_explore_adf_first.h"
#include "cb_explore_adf_greedy.h"
#include "cb_explore_adf_regcb.h"
#include "cb_explore_adf_softmax.h"
#include "mwt.h"
#include "confidence.h"
#include "scorer.h"
#include "expreplay.h"
#include "search.h"
#include "bfgs.h"
#include "lda_core.h"
#include "noop.h"
#include "print.h"
#include "gd_mf.h"
#include "learner.h"
#include "mf.h"
#include "ftrl.h"
#include "svrg.h"
#include "binary.h"
#include "lrq.h"
#include "lrqfa.h"
#include "autolink.h"
#include "log_multi.h"
#include "recall_tree.h"
#include "memory_tree.h"
#include "stagewise_poly.h"
#include "active.h"
#include "active_cover.h"
#include "cs_active.h"
#include "kernel_svm.h"
#include "parse_example.h"
#include "best_constant.h"
#include "interact.h"
#include "vw_exception.h"
#include "accumulate.h"
#include "vw_validate.h"
#include "vw_allreduce.h"
#include "OjaNewton.h"
#include "audit_regressor.h"
#include "marginal.h"
#include "explore_eval.h"
#include "baseline.h"
#include "classweight.h"
#include "cb_sample.h"
#include "warm_cb.h"
#include "shared_feature_merger.h"
#include "options.h"
#include "options_boost_po.h"
#include "options_serializer_boost_po.h"
Go to the source code of this file.
Namespaces | |
VW | |
Functions | |
bool | ends_with (std::string const &fullString, std::string const &ending) |
uint64_t | hash_file_contents (io_buf *io, int f) |
bool | directory_exists (std::string path) |
std::string | find_in_path (std::vector< std::string > paths, std::string fname) |
void | parse_dictionary_argument (vw &all, std::string str) |
void | parse_affix_argument (vw &all, std::string str) |
void | parse_diagnostics (options_i &options, vw &all) |
input_options | parse_source (vw &all, options_i &options) |
const char * | VW::are_features_compatible (vw &vw1, vw &vw2) |
std::string | spoof_hex_encoded_namespaces (const std::string &arg) |
void | parse_feature_tweaks (options_i &options, vw &all, std::vector< std::string > &dictionary_nses) |
void | parse_example_tweaks (options_i &options, vw &all) |
void | parse_output_preds (options_i &options, vw &all) |
void | parse_output_model (options_i &options, vw &all) |
void | load_input_model (vw &all, io_buf &io_temp) |
LEARNER::base_learner * | setup_base (options_i &options, vw &all) |
void | parse_reductions (options_i &options, vw &all) |
vw & | parse_args (options_i &options, trace_message_t trace_listener, void *trace_context) |
bool | check_interaction_settings_collision (options_i &options, std::string file_options) |
options_i & | load_header_merge_options (options_i &options, vw &all, io_buf &model) |
void | parse_modules (options_i &options, vw &all, std::vector< std::string > &dictionary_nses) |
void | parse_sources (options_i &options, vw &all, io_buf &model, bool skipModelLoad) |
void | VW::cmd_string_replace_value (std::stringstream *&ss, std::string flag_to_replace, std::string new_value) |
char ** | VW::to_argv_escaped (std::string const &s, int &argc) |
char ** | VW::to_argv (std::string const &s, int &argc) |
char ** | VW::get_argv_from_string (std::string s, int &argc) |
void | VW::free_args (int argc, char *argv[]) |
vw * | VW::initialize (options_i &options, io_buf *model, bool skipModelLoad, trace_message_t trace_listener, void *trace_context) |
vw * | VW::initialize (std::string s, io_buf *model, bool skipModelLoad, trace_message_t trace_listener, void *trace_context) |
vw * | VW::initialize_escaped (std::string const &s, io_buf *model, bool skipModelLoad, trace_message_t trace_listener, void *trace_context) |
vw * | VW::initialize (int argc, char *argv[], io_buf *model, bool skipModelLoad, trace_message_t trace_listener, void *trace_context) |
vw * | VW::seed_vw_model (vw *vw_model, const std::string extra_args, trace_message_t trace_listener, void *trace_context) |
void | VW::delete_dictionary_entry (substring ss, features *A) |
void | VW::sync_stats (vw &all) |
void | VW::finish (vw &all, bool delete_all) |
Variables | |
bool | interactions_settings_doubled = false |
bool check_interaction_settings_collision | ( | options_i & | options, |
std::string | file_options | ||
) |
Definition at line 1400 of file parse_args.cc.
References VW::config::options_i::was_supplied().
Referenced by load_header_merge_options().
bool directory_exists | ( | std::string | path | ) |
bool ends_with | ( | std::string const & | fullString, |
std::string const & | ending | ||
) |
Definition at line 100 of file parse_args.cc.
Referenced by find_in_path(), parse_dictionary_argument(), and parse_source().
std::string find_in_path | ( | std::vector< std::string > | paths, |
std::string | fname | ||
) |
Definition at line 141 of file parse_args.cc.
References ends_with(), and f.
Referenced by parse_dictionary_argument().
uint64_t hash_file_contents | ( | io_buf * | io, |
int | f | ||
) |
Definition at line 112 of file parse_args.cc.
References io_buf::read_file().
Referenced by parse_dictionary_argument().
Definition at line 1417 of file parse_args.cc.
References check_interaction_settings_collision(), VW::config::options_i::insert(), interactions_settings_doubled, and save_load_header().
Referenced by VW::initialize().
Definition at line 1200 of file parse_args.cc.
References io_buf::close_file(), vw::feature_mask, vw::initial_regressors, vw::l, parse_mask_regressor_args(), and LEARNER::learner< T, E >::save_load().
Referenced by parse_sources().
void parse_affix_argument | ( | vw & | all, |
std::string | str | ||
) |
Definition at line 301 of file parse_args.cc.
References vw::affix_features, THROW, and valid_ns().
Referenced by parse_feature_tweaks().
vw& parse_args | ( | options_i & | options, |
trace_message_t | trace_listener, | ||
void * | trace_context | ||
) |
Definition at line 1308 of file parse_args.cc.
References VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), vw::all_reduce, vw::all_reduce_type, vw::eta, vw::eta_decay_rate, vw::feature_mask, VW::finish(), vw::init_time, vw::initial_regressors, vw::initial_t, vw::initial_weight, VW::config::make_option(), vw::normal_weights, vw::options, vw::p, parse_diagnostics(), vw::per_feature_regularizer_input, vw::power_t, vw::quiet, vw::random_weights, vw::sd, Socket, parameters::sparse, shared_data::t, THROW, vw::tnormal_weights, vw_ostream::trace_context, vw_ostream::trace_listener, vw::trace_message, VW::config::options_i::was_supplied(), and vw::weights.
Referenced by VW::initialize().
Definition at line 357 of file parse_args.cc.
References VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), vw::all_reduce, vw::audit, shared_data::dump_interval, VW::git_commit(), VW::config::make_option(), vw::progress_add, vw::progress_arg, AllReduce::quiet, vw::quiet, vw::sd, VW::version_struct::to_string(), vw::trace_message, VW::version(), and VW::config::options_i::was_supplied().
Referenced by parse_args().
void parse_dictionary_argument | ( | vw & | all, |
std::string | str | ||
) |
Definition at line 158 of file parse_args.cc.
References VW::alloc_examples(), substring::begin, c, v_array< T >::clear(), io_buf::close_file(), VW::dealloc_example(), features::deep_copy_from(), label_parser::delete_label, vw::dictionary_path, substring::end, ends_with(), example_predict::feature_space, find_in_path(), v_hashmap< K, V >::get(), hash_file_contents(), example_predict::indices, v_hashmap< K, V >::init(), label_parser::label_size, vw::loaded_dictionaries, parser::lp, dictionary_info::name, vw::namespace_dictionaries, io_buf::open_file(), vw::p, v_hashmap< K, V >::put(), quadratic_constant, vw::quiet, io_buf::READ, io_buf::read_file(), VW::read_line(), v_hashmap< K, V >::size(), vw::stdin_off, substring_equal(), example::tag, THROW, vw::trace_message, and uniform_hash().
Referenced by VW::initialize().
Definition at line 1010 of file parse_args.cc.
References VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), vw::eta, f, namedlabels::getK(), getLossFunction(), vw::holdout_after, vw::holdout_period, vw::holdout_set_off, vw::l1_lambda, vw::l2_lambda, vw::lda, shared_data::ldict, vw::loss, VW::config::make_option(), vw::max_examples, shared_data::max_label, shared_data::min_label, vw::no_bias, noop_mm(), vw::numpasses, vw::p, vw::pass_length, vw::quiet, vw::reg_mode, vw::sd, vw::set_minmax, parser::sort_features, vw::trace_message, vw::training, and VW::config::options_i::was_supplied().
Referenced by parse_modules().
void parse_feature_tweaks | ( | options_i & | options, |
vw & | all, | ||
std::vector< std::string > & | dictionary_nses | ||
) |
Definition at line 600 of file parse_args.cc.
References VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), vw::add_constant, c, compile_gram(), compile_limits(), vw::default_bits, vw::dictionary_path, directory_exists(), INTERACTIONS::expand_interactions(), getHasher(), vw::hash_seed, parser::hasher, id(), vw::ignore, vw::ignore_linear, vw::ignore_some, vw::ignore_some_linear, vw::initial_constant, vw::interactions, interactions_settings_doubled, vw::limit, vw::limit_strings, VW::config::make_option(), vw::ngram, vw::ngram_strings, vw::num_bits, vw::p, vw::pairs, parse_affix_argument(), vw::permutations, vw::quiet, vw::redefine, vw::redefine_some, vw::skip_strings, vw::skips, INTERACTIONS::sort_and_filter_duplicate_interactions(), vw::spelling_features, spoof_hex_encoded_namespaces(), THROW, vw::trace_message, vw::triples, VW::validate_num_bits(), and VW::config::options_i::was_supplied().
Referenced by parse_modules().
Definition at line 1523 of file parse_args.cc.
References VW::config::option_group_definition::add(), VW::config::options_i::add_and_parse(), vw::eta, vw::eta_decay_rate, vw::get_random_state(), VW::config::make_option(), vw::num_bits, vw::numpasses, parse_example_tweaks(), parse_feature_tweaks(), parse_output_model(), parse_output_preds(), parse_reductions(), vw::power_t, vw::quiet, vw::random_seed, vw::sd, shared_data::t, and vw::trace_message.
Referenced by VW::initialize().
Definition at line 1165 of file parse_args.cc.
References VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), vw::final_regressor_name, vw::hash_inv, vw::id, vw::inv_hash_regressor_name, VW::config::make_option(), vw::per_feature_regularizer_output, vw::per_feature_regularizer_text, vw::preserve_performance_counters, vw::quiet, vw::save_per_pass, vw::save_resume, vw::text_regressor_name, vw::trace_message, and VW::config::options_i::was_supplied().
Referenced by parse_modules().
Definition at line 1103 of file parse_args.cc.
References VW::config::option_group_definition::add(), VW::config::options_i::add_and_parse(), f, vw::final_prediction_sink, VW::config::make_option(), O_LARGEFILE, v_array< T >::push_back(), vw::quiet, vw::raw_prediction, vw::trace_message, and VW::config::options_i::was_supplied().
Referenced by parse_modules().
Definition at line 1234 of file parse_args.cc.
References active_cover_setup(), active_setup(), audit_regressor_setup(), autolink_setup(), baseline_setup(), bfgs_setup(), binary_setup(), boosting_setup(), bs_setup(), cb_adf_setup(), cb_algs_setup(), cb_explore_setup(), cb_sample_setup(), cbify_setup(), cbifyldf_setup(), CCB::ccb_explore_adf_setup(), classweight_setup(), confidence_setup(), cs_active_setup(), CSOAA::csldf_setup(), CSOAA::csoaa_setup(), ect_setup(), explore_eval_setup(), ftrl_setup(), gd_mf_setup(), interact_setup(), kernel_svm_setup(), vw::l, lda_setup(), log_multi_setup(), lrq_setup(), lrqfa_setup(), marginal_setup(), memory_tree_setup(), mf_setup(), multilabel_oaa_setup(), mwt_setup(), nn_setup(), noop_setup(), oaa_setup(), OjaNewton_setup(), print_setup(), recall_tree_setup(), vw::reduction_stack, scorer_setup(), sender_setup(), VW::cb_explore_adf::softmax::setup(), VW::cb_explore_adf::greedy::setup(), VW::cb_explore_adf::first::setup(), VW::cb_explore_adf::bag::setup(), VW::cb_explore_adf::cover::setup(), VW::cb_explore_adf::regcb::setup(), GD::setup(), Search::setup(), setup_base(), VW::shared_feature_merger::shared_feature_merger_setup(), stagewise_poly_setup(), svrg_setup(), topk_setup(), and warm_cb_setup().
Referenced by parse_modules().
input_options parse_source | ( | vw & | all, |
options_i & | options | ||
) |
Definition at line 421 of file parse_args.cc.
References vw::active, VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), input_options::cache, input_options::cache_files, input_options::compressed, input_options::daemon, vw::daemon, vw::data_filename, input_options::dsjson, ends_with(), input_options::foreground, vw::holdout_set_off, input_options::json, input_options::kill_cache, VW::config::make_option(), vw::num_children, vw::numpasses, vw::p, input_options::pid_file, input_options::port, input_options::port_file, set_compressed(), vw::stdin_off, THROW, vw::trace_message, and VW::config::options_i::was_supplied().
Referenced by parse_sources().
Definition at line 1551 of file parse_args.cc.
References io_buf::close_file(), enable_sources(), LEARNER::learner< T, E >::increment, vw::l, load_input_model(), vw::numpasses, parse_source(), vw::quiet, parameters::stride_shift(), vw::weights, and vw::wpp.
Referenced by VW::initialize().
LEARNER::base_learner* setup_base | ( | options_i & | options, |
vw & | all | ||
) |
Definition at line 1222 of file parse_args.cc.
References vw::reduction_stack, and setup_base().
Referenced by active_cover_setup(), active_setup(), audit_regressor_setup(), autolink_setup(), baseline_setup(), binary_setup(), boosting_setup(), bs_setup(), cb_adf_setup(), cb_algs_setup(), cb_explore_setup(), cb_sample_setup(), cbify_setup(), cbifyldf_setup(), CCB::ccb_explore_adf_setup(), classweight_setup(), confidence_setup(), cs_active_setup(), CSOAA::csldf_setup(), CSOAA::csoaa_setup(), ect_setup(), explore_eval_setup(), ExpReplay::expreplay_setup(), interact_setup(), log_multi_setup(), lrq_setup(), lrqfa_setup(), marginal_setup(), memory_tree_setup(), mf_setup(), multilabel_oaa_setup(), mwt_setup(), nn_setup(), oaa_setup(), parse_reductions(), recall_tree_setup(), scorer_setup(), VW::cb_explore_adf::softmax::setup(), VW::cb_explore_adf::greedy::setup(), VW::cb_explore_adf::first::setup(), VW::cb_explore_adf::bag::setup(), VW::cb_explore_adf::cover::setup(), VW::cb_explore_adf::regcb::setup(), Search::setup(), setup_base(), VW::shared_feature_merger::shared_feature_merger_setup(), stagewise_poly_setup(), topk_setup(), and warm_cb_setup().
std::string spoof_hex_encoded_namespaces | ( | const std::string & | arg | ) |
Definition at line 568 of file parse_args.cc.
References c.
Referenced by lrq_setup(), lrqfa_setup(), and parse_feature_tweaks().
bool interactions_settings_doubled = false |
Definition at line 498 of file parse_args.cc.
Referenced by load_header_merge_options(), and parse_feature_tweaks().