| 841 | comm_algo_->write_comm_algo_proto(*msg); |
| 842 | } |
| 843 | std::unique_ptr<callback_base> |
| 844 | build_ltfb_callback_from_pbuf(const google::protobuf::Message& proto_msg, |
| 845 | const std::shared_ptr<lbann_summary>&) |
| 846 | { |
| 847 | const auto& params = |
| 848 | dynamic_cast<const lbann_data::Callback::CallbackLTFB&>(proto_msg); |
| 849 | auto weights_list = parse_set<std::string>(params.weights()); |
| 850 | std::unique_ptr<LTFBCommunicationAlgorithm> algo; |
| 851 | switch (string_to_comm_algo(params.communication_algorithm())) { |
| 852 | case comm_algorithm::sendrecv_weights: |
| 853 | algo = std::make_unique<SendRecvWeights>(std::move(weights_list), |
| 854 | params.exchange_hyperparameters()); |
| 855 | break; |
| 856 | case comm_algorithm::checkpoint_file: |
| 857 | algo = std::make_unique<CheckpointFile>(std::move(weights_list), |
| 858 | params.checkpoint_basedir()); |
| 859 | break; |
| 860 | case comm_algorithm::checkpoint_binary: |
| 861 | algo = std::make_unique<CheckpointBinary>(std::move(weights_list)); |
| 862 | break; |
| 863 | } |
| 864 | return std::make_unique<ltfb>(params.batch_interval(), |
| 865 | params.metric(), |
| 866 | std::move(algo), |
| 867 | params.low_score_wins()); |
| 868 | } |
| 869 | |
| 870 | } // namespace callback |
| 871 | } // namespace lbann |
nothing calls this directly
no test coverage detected