Turi Create  4.0
turi::ml_data_internal::column_metadata Struct Reference

#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)
 

Detailed Description

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.

Member Function Documentation

◆ _debug_is_equal()

void turi::ml_data_internal::column_metadata::_debug_is_equal ( const column_metadata other) const

For debug testing. Make sure things are equal.

◆ check_fixed_column_size()

void turi::ml_data_internal::column_metadata::check_fixed_column_size ( const flexible_type v) const
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.

◆ column_size()

size_t turi::ml_data_internal::column_metadata::column_size ( ) const
inline

Returns the current size of the column.

Definition at line 133 of file internal_metadata.hpp.

◆ global_index_offset()

size_t turi::ml_data_internal::column_metadata::global_index_offset ( ) const
inline

Returns the size of the index at training time.

Definition at line 88 of file internal_metadata.hpp.

◆ index_size()

size_t turi::ml_data_internal::column_metadata::index_size ( ) const
inline

Returns the size of the index at training time.

Definition at line 81 of file internal_metadata.hpp.

◆ is_untranslated_column()

bool turi::ml_data_internal::column_metadata::is_untranslated_column ( ) const
inline

Returns true if this column is untranslated and false otherwise.

Definition at line 75 of file internal_metadata.hpp.

◆ load()

void turi::ml_data_internal::column_metadata::load ( turi::iarchive iarc)

Serialization – load.

◆ mode_has_fixed_size()

bool turi::ml_data_internal::column_metadata::mode_has_fixed_size ( ) const
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.

◆ nd_column_shape()

const flex_nd_vec::index_range_type& turi::ml_data_internal::column_metadata::nd_column_shape ( ) const
inline

Returns the current shape of the column as if it's an nd_vec

Definition at line 145 of file internal_metadata.hpp.

◆ save()

void turi::ml_data_internal::column_metadata::save ( turi::oarchive oarc) const

Serialization – save.

◆ set_training_index_size()

void turi::ml_data_internal::column_metadata::set_training_index_size ( )

Finalize training.

◆ setup()

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.


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