OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
foreign_storage::anonymous_namespace{InternalMLModelMetadataDataWrapper.cpp} Namespace Reference

Functions

void populate_import_buffers_for_ml_model_metadata (const std::vector< MLModelMetadata > &ml_models_metadata, std::map< std::string, import_export::TypedImportBuffer * > &import_buffers)
 

Function Documentation

void foreign_storage::anonymous_namespace{InternalMLModelMetadataDataWrapper.cpp}::populate_import_buffers_for_ml_model_metadata ( const std::vector< MLModelMetadata > &  ml_models_metadata,
std::map< std::string, import_export::TypedImportBuffer * > &  import_buffers 
)

Definition at line 35 of file InternalMLModelMetadataDataWrapper.cpp.

Referenced by foreign_storage::InternalMLModelMetadataDataWrapper::populateChunkBuffersForTable().

37  {
38  for (const auto& ml_model_metadata : ml_models_metadata) {
39  if (auto itr = import_buffers.find("model_name"); itr != import_buffers.end()) {
40  itr->second->addString(ml_model_metadata.getModelName());
41  }
42  if (auto itr = import_buffers.find("model_type"); itr != import_buffers.end()) {
43  itr->second->addString(ml_model_metadata.getModelTypeStr());
44  }
45  if (auto itr = import_buffers.find("predicted"); itr != import_buffers.end()) {
46  itr->second->addString(ml_model_metadata.getPredicted());
47  }
48  if (auto itr = import_buffers.find("features"); itr != import_buffers.end()) {
49  itr->second->addStringArray(ml_model_metadata.getFeatures());
50  }
51  if (auto itr = import_buffers.find("training_query"); itr != import_buffers.end()) {
52  itr->second->addString(ml_model_metadata.getTrainingQuery());
53  }
54  if (auto itr = import_buffers.find("num_logical_features");
55  itr != import_buffers.end()) {
56  itr->second->addBigint(ml_model_metadata.getNumLogicalFeatures());
57  }
58  if (auto itr = import_buffers.find("num_physical_features");
59  itr != import_buffers.end()) {
60  itr->second->addBigint(ml_model_metadata.getNumFeatures());
61  }
62  if (auto itr = import_buffers.find("num_categorical_features");
63  itr != import_buffers.end()) {
64  itr->second->addBigint(ml_model_metadata.getNumCategoricalFeatures());
65  }
66  if (auto itr = import_buffers.find("num_numeric_features");
67  itr != import_buffers.end()) {
68  itr->second->addBigint(ml_model_metadata.getNumLogicalFeatures() -
69  ml_model_metadata.getNumCategoricalFeatures());
70  }
71  if (auto itr = import_buffers.find("train_fraction"); itr != import_buffers.end()) {
72  itr->second->addDouble(ml_model_metadata.getDataSplitTrainFraction());
73  }
74  if (auto itr = import_buffers.find("eval_fraction"); itr != import_buffers.end()) {
75  itr->second->addDouble(ml_model_metadata.getDataSplitEvalFraction());
76  }
77  }
78 }

+ Here is the caller graph for this function: