Vowpal Wabbit
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
VW::workspace Class Reference

#include <global_data.h>

Public Member Functions

void learn (example &)
 
void learn (multi_ex &)
 
void predict (example &)
 
void predict (multi_ex &)
 
void finish_example (example &)
 
void finish_example (multi_ex &)
 
void finish ()
 
std::string dump_weights_to_json_experimental ()
 Generate a JSON string with the current model state and invert hash lookup table. Bottom learner in use must be gd and workspace.hash_inv must be true. This function is experimental and subject to change. More...
 
size_t length ()
 
std::shared_ptr< VW::rand_stateget_random_state ()
 
 workspace (VW::io::logger logger)
 
 ~workspace ()
 
 workspace (const VW::workspace &)=delete
 
VW::workspaceoperator= (const VW::workspace &)=delete
 
 workspace (const VW::workspace &&)=delete
 
VW::workspaceoperator= (const VW::workspace &&)=delete
 

Public Attributes

parameters weights
 
std::shared_ptr< VW::LEARNER::learnerl
 
std::unique_ptr< VW::config::options_i, options_deleter_typeoptions
 
std::shared_ptr< VW::shared_datasd
 
details::feature_tweaks_config feature_tweaks_config
 
details::initial_weights_config initial_weights_config
 
details::update_rule_config update_rule_config
 
details::loss_config loss_config
 
details::passes_config passes_config
 
details::output_model_config output_model_config
 
details::parser_runtime parser_runtime
 
details::runtime_config runtime_config
 
details::runtime_state runtime_state
 
details::reduction_state reduction_state
 
details::output_config output_config
 
VW::io::logger logger
 
details::output_runtime output_runtime
 
std::function< void(float)> set_minmax
 
std::string id
 
std::string feature_mask
 
void(* print_by_ref )(VW::io::writer *, float, float, const v_array< char > &, VW::io::logger &)
 
void(* print_text_by_ref )(VW::io::writer *, const std::string &, const v_array< char > &, VW::io::logger &)
 

Constructor & Destructor Documentation

◆ workspace() [1/3]

VW::workspace::workspace ( VW::io::logger  logger)
explicit

◆ ~workspace()

VW::workspace::~workspace ( )

◆ workspace() [2/3]

VW::workspace::workspace ( const VW::workspace )
delete

◆ workspace() [3/3]

VW::workspace::workspace ( const VW::workspace &&  )
delete

Member Function Documentation

◆ dump_weights_to_json_experimental()

std::string VW::workspace::dump_weights_to_json_experimental ( )

Generate a JSON string with the current model state and invert hash lookup table. Bottom learner in use must be gd and workspace.hash_inv must be true. This function is experimental and subject to change.

Returns
std::string JSON formatted string

◆ finish()

void VW::workspace::finish ( )

This is used to perform finalization steps the driver/cli would normally do. If using VW in library mode, this call is optional. Some things this function does are: print summary, finalize regressor, output metrics, etc

◆ finish_example() [1/2]

void VW::workspace::finish_example ( example )

◆ finish_example() [2/2]

void VW::workspace::finish_example ( multi_ex )

◆ get_random_state()

std::shared_ptr< VW::rand_state > VW::workspace::get_random_state ( )
inline

◆ learn() [1/2]

void VW::workspace::learn ( example )

◆ learn() [2/2]

void VW::workspace::learn ( multi_ex )

◆ length()

size_t VW::workspace::length ( )
inline

◆ operator=() [1/2]

VW::workspace & VW::workspace::operator= ( const VW::workspace &&  )
delete

◆ operator=() [2/2]

VW::workspace & VW::workspace::operator= ( const VW::workspace )
delete

◆ predict() [1/2]

void VW::workspace::predict ( example )

◆ predict() [2/2]

void VW::workspace::predict ( multi_ex )

Member Data Documentation

◆ feature_mask

std::string VW::workspace::feature_mask

◆ feature_tweaks_config

details::feature_tweaks_config VW::workspace::feature_tweaks_config

◆ id

std::string VW::workspace::id

◆ initial_weights_config

details::initial_weights_config VW::workspace::initial_weights_config

◆ l

std::shared_ptr<VW::LEARNER::learner> VW::workspace::l

◆ logger

VW::io::logger VW::workspace::logger

◆ loss_config

details::loss_config VW::workspace::loss_config

◆ options

std::unique_ptr<VW::config::options_i, options_deleter_type> VW::workspace::options

◆ output_config

details::output_config VW::workspace::output_config

◆ output_model_config

details::output_model_config VW::workspace::output_model_config

◆ output_runtime

details::output_runtime VW::workspace::output_runtime

◆ parser_runtime

details::parser_runtime VW::workspace::parser_runtime

◆ passes_config

details::passes_config VW::workspace::passes_config

◆ print_by_ref

void(* VW::workspace::print_by_ref) (VW::io::writer *, float, float, const v_array< char > &, VW::io::logger &)

◆ print_text_by_ref

void(* VW::workspace::print_text_by_ref) (VW::io::writer *, const std::string &, const v_array< char > &, VW::io::logger &)

◆ reduction_state

details::reduction_state VW::workspace::reduction_state

◆ runtime_config

details::runtime_config VW::workspace::runtime_config

◆ runtime_state

details::runtime_state VW::workspace::runtime_state

◆ sd

std::shared_ptr<VW::shared_data> VW::workspace::sd

◆ set_minmax

std::function<void(float)> VW::workspace::set_minmax

◆ update_rule_config

details::update_rule_config VW::workspace::update_rule_config

◆ weights

parameters VW::workspace::weights

The documentation for this class was generated from the following file: