LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::protobuf_utils Namespace Reference

Functions

std::vector< std::unique_ptr< lbann_data::LbannPB > > load_prototext (const bool master, const int trainer_rank=0)
 convience wrapper for other parsing, loading, and verifying prototext. More...
 
std::vector< prototext_fn_tripleparse_prototext_filenames_from_command_line (const bool master, const int trainer_rank=0)
 Parses the command line for special prototext flags. More...
 
std::vector< std::unique_ptr< lbann_data::LbannPB > > read_in_prototext_files (const bool master, const std::vector< prototext_fn_triple > &names)
 
void verify_prototext (const bool master, const std::vector< std::unique_ptr< lbann_data::LbannPB >> &models)
 attempts to verify the all models are valid, and contain an optimizer and reader More...
 

Function Documentation

◆ load_prototext()

std::vector<std::unique_ptr<lbann_data::LbannPB> > lbann::protobuf_utils::load_prototext ( const bool  master,
const int  trainer_rank = 0 
)

convience wrapper for other parsing, loading, and verifying prototext.

Calls parse_prototext_filenames_from_command_line(), then load_prototext(), then verify_prototext(). This is the only function that needs to be called from, e.g, model_zoo/lbann.cpp; the three called functions are made public for testing.

◆ parse_prototext_filenames_from_command_line()

std::vector<prototext_fn_triple> lbann::protobuf_utils::parse_prototext_filenames_from_command_line ( const bool  master,
const int  trainer_rank = 0 
)

Parses the command line for special prototext flags.

This looks for --model=<string>, --reader=<string>, and --optimizer=<string> as well as their multi-value counterparts: --model={<string_1>,<string_2>,...}, --reader={<string_1>,<string_2>,...}, and --optimizer={<string_1>,<string_2>,...}. If the multi-model option is given, the reader and optimzier can either be single, or contain the same number of filenames as does the --model={...} specification.

◆ read_in_prototext_files()

std::vector<std::unique_ptr<lbann_data::LbannPB> > lbann::protobuf_utils::read_in_prototext_files ( const bool  master,
const std::vector< prototext_fn_triple > &  names 
)

◆ verify_prototext()

void lbann::protobuf_utils::verify_prototext ( const bool  master,
const std::vector< std::unique_ptr< lbann_data::LbannPB >> &  models 
)

attempts to verify the all models are valid, and contain an optimizer and reader