Vowpal Wabbit
Loading...
Searching...
No Matches
Namespaces | Functions
model_utils.h File Reference
#include "vw/core/io_buf.h"
#include "vw/core/memory.h"
#include "vw/core/v_array.h"
#include <fmt/format.h>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <type_traits>

Namespaces

namespace  VW
 
namespace  VW::model_utils
 
namespace  VW::model_utils::details
 

Functions

size_t VW::model_utils::details::check_length_matches (size_t actual_len, size_t expected_len)
 
template<typename T >
size_t VW::model_utils::details::write_text_mode_output (io_buf &io, const T &var, const std::string &name_or_readable_field_template)
 
template<typename T , typename std::enable_if< !std::is_pointer< T >::value &&std::is_trivial< T >::value &&std::is_standard_layout< T >::value, bool >::type = true>
size_t VW::model_utils::read_model_field (io_buf &io, T &var)
 This function is the uniform interface reading a variable from the model file. The value must be a POD type. More...
 
template<typename T , typename std::enable_if< !std::is_pointer< T >::value &&std::is_trivial< T >::value &&std::is_standard_layout< T >::value, bool >::type = true>
size_t VW::model_utils::write_model_field (io_buf &io, const T &var, const std::string &name_or_readable_field_template, bool text)
 This function is the uniform interface for serializing a variable to the model file. The value must be a POD type. More...
 
size_t VW::model_utils::read_model_field (io_buf &, std::string &)
 
size_t VW::model_utils::write_model_field (io_buf &, const std::string &, const std::string &, bool)
 
template<typename T >
size_t VW::model_utils::read_model_field (io_buf &, std::set< T > &)
 
template<typename T >
size_t VW::model_utils::write_model_field (io_buf &, const std::set< T > &, const std::string &, bool)
 
template<typename T >
size_t VW::model_utils::read_model_field (io_buf &, std::vector< T > &)
 
template<typename T >
size_t VW::model_utils::write_model_field (io_buf &, const std::vector< T > &, const std::string &, bool)
 
template<typename T >
size_t VW::model_utils::read_model_field (io_buf &, v_array< T > &)
 
template<typename T >
size_t VW::model_utils::write_model_field (io_buf &, const v_array< T > &, const std::string &, bool)
 
template<typename F , typename S >
size_t VW::model_utils::read_model_field (io_buf &, std::pair< F, S > &)
 
template<typename F , typename S >
size_t VW::model_utils::write_model_field (io_buf &, const std::pair< F, S > &, const std::string &, bool)
 
template<typename T >
size_t VW::model_utils::read_model_field (io_buf &, std::priority_queue< T > &)
 
template<typename T >
size_t VW::model_utils::write_model_field (io_buf &, const std::priority_queue< T > &, const std::string &, bool)
 
template<typename K , typename V >
size_t VW::model_utils::read_model_field (io_buf &, std::map< K, V > &)
 
template<typename K , typename V >
size_t VW::model_utils::write_model_field (io_buf &, const std::map< K, V > &, const std::string &, bool)
 
template<typename T >
size_t VW::model_utils::read_model_field (io_buf &, std::unique_ptr< T > &)
 
template<typename T >
size_t VW::model_utils::write_model_field (io_buf &, const std::unique_ptr< T > &, const std::string &, bool)