Turi Create
4.0
|
#include <ml/ml_data/data_storage/internal_metadata.hpp>
Public Member Functions | |
void | setup (bool is_target_column, const std::string &name, const std::shared_ptr< sarray< flexible_type > > &column, const std::map< std::string, ml_column_mode > &mode_overrides) |
void | set_training_index_size () |
bool | mode_has_fixed_size () const |
bool | is_untranslated_column () const |
size_t | index_size () const |
size_t | global_index_offset () const |
void | _debug_is_equal (const column_metadata &other) const |
void | check_fixed_column_size (const flexible_type &v) const GL_HOT_INLINE_FLATTEN |
size_t | column_size () const |
const flex_nd_vec::index_range_type & | nd_column_shape () const |
void | save (turi::oarchive &oarc) const |
void | load (turi::iarchive &iarc) |
The metadata information for a single column. This is meant to be used internally to ml_data; there is no reason that the structures outside of ml_data need to access this; ml_metadata should be used instead.
This structure is necessary as many of the internal processing routines use a vector of column metadata to handle all the processing. Having this structure, which organizes all the parts of the column metadata into one place, greatly simplifies this processing.
Definition at line 33 of file internal_metadata.hpp.
void turi::ml_data_internal::column_metadata::_debug_is_equal | ( | const column_metadata & | other | ) | const |
For debug testing. Make sure things are equal.
|
inline |
During loading, we need to verify that the columns indeed have the correct column sizes.
Definition at line 227 of file internal_metadata.hpp.
|
inline |
Returns the current size of the column.
Definition at line 133 of file internal_metadata.hpp.
|
inline |
Returns the size of the index at training time.
Definition at line 88 of file internal_metadata.hpp.
|
inline |
Returns the size of the index at training time.
Definition at line 81 of file internal_metadata.hpp.
|
inline |
Returns true if this column is untranslated and false otherwise.
Definition at line 75 of file internal_metadata.hpp.
void turi::ml_data_internal::column_metadata::load | ( | turi::iarchive & | iarc | ) |
Serialization – load.
|
inline |
Returns true if the mode of this column has a fixed mode size and false otherwise.
Definition at line 65 of file internal_metadata.hpp.
|
inline |
Returns the current shape of the column as if it's an nd_vec
Definition at line 145 of file internal_metadata.hpp.
void turi::ml_data_internal::column_metadata::save | ( | turi::oarchive & | oarc | ) | const |
Serialization – save.
void turi::ml_data_internal::column_metadata::set_training_index_size | ( | ) |
Finalize training.
void turi::ml_data_internal::column_metadata::setup | ( | bool | is_target_column, |
const std::string & | name, | ||
const std::shared_ptr< sarray< flexible_type > > & | column, | ||
const std::map< std::string, ml_column_mode > & | mode_overrides | ||
) |
Generates a new column_metadata class using the data arrays and the types.