| DiSMEC++
    | 
#include <statistics.h>
| Classes | |
| struct | StatData | 
| Public Member Functions | |
| TrainingStatsGatherer (std::string source, std::string target_file) | |
| ~TrainingStatsGatherer () | |
| void | setup_minimizer (thread_id_t thread, stats::Tracked &minimizer) | 
| NOTE: these functions will be called concurrently.  More... | |
| void | setup_initializer (thread_id_t thread, stats::Tracked &initializer) | 
| void | setup_objective (thread_id_t thread, stats::Tracked &objective) | 
| void | setup_postproc (thread_id_t thread, stats::Tracked &objective) | 
| std::unique_ptr< ResultStatsGatherer > | create_results_gatherer (thread_id_t thread, const std::shared_ptr< const TrainingSpec > &spec) | 
| void | finalize () | 
| nlohmann::json | to_json () const | 
| Private Types | |
| using | thread_id_t = dismec::parallel::thread_id_t | 
| using | collection_ptr_t = std::shared_ptr< stats::StatisticsCollection > | 
| Private Member Functions | |
| void | add_accu (const std::string &key, thread_id_t thread, const std::shared_ptr< stats::StatisticsCollection > &accumulator) | 
| Private Attributes | |
| std::unordered_map< std::string, StatData > | m_Merged | 
| std::vector< std::unordered_map< std::string, collection_ptr_t > > | m_PerThreadCollections | 
| std::mutex | m_Lock | 
| std::string | m_TargetFile | 
| std::unique_ptr< nlohmann::json > | m_Config | 
Definition at line 29 of file statistics.h.
| 
 | private | 
Definition at line 51 of file statistics.h.
Definition at line 30 of file statistics.h.
| TrainingStatsGatherer::TrainingStatsGatherer | ( | std::string | source, | 
| std::string | target_file | ||
| ) | 
Definition at line 21 of file statistics.cpp.
References m_Config.
| TrainingStatsGatherer::~TrainingStatsGatherer | ( | ) | 
Definition at line 64 of file statistics.cpp.
References m_TargetFile, and to_json().
| 
 | private | 
Definition at line 168 of file statistics.cpp.
References m_Config, m_Lock, m_PerThreadCollections, dismec::stats::make_stat_from_json(), dismec::ssize(), THROW_EXCEPTION, and dismec::opaque_int_type< Tag, T >::to_index().
Referenced by create_results_gatherer(), setup_initializer(), setup_minimizer(), setup_objective(), and setup_postproc().
| std::unique_ptr< ResultStatsGatherer > TrainingStatsGatherer::create_results_gatherer | ( | parallel::thread_id_t | thread, | 
| const std::shared_ptr< const TrainingSpec > & | spec | ||
| ) | 
Definition at line 162 of file statistics.cpp.
References add_accu().
| void TrainingStatsGatherer::finalize | ( | ) | 
Definition at line 46 of file statistics.cpp.
References m_Merged, and m_PerThreadCollections.
| void TrainingStatsGatherer::setup_initializer | ( | thread_id_t | thread, | 
| stats::Tracked & | initializer | ||
| ) | 
Definition at line 35 of file statistics.cpp.
References add_accu(), and dismec::stats::Tracked::get_stats().
| void TrainingStatsGatherer::setup_minimizer | ( | thread_id_t | thread, | 
| stats::Tracked & | minimizer | ||
| ) | 
NOTE: these functions will be called concurrently.
Definition at line 31 of file statistics.cpp.
References add_accu(), and dismec::stats::Tracked::get_stats().
| void TrainingStatsGatherer::setup_objective | ( | thread_id_t | thread, | 
| stats::Tracked & | objective | ||
| ) | 
Definition at line 39 of file statistics.cpp.
References add_accu().
| void TrainingStatsGatherer::setup_postproc | ( | thread_id_t | thread, | 
| stats::Tracked & | objective | ||
| ) | 
Definition at line 42 of file statistics.cpp.
References add_accu(), and dismec::stats::Tracked::get_stats().
| nlohmann::json TrainingStatsGatherer::to_json | ( | ) | const | 
Definition at line 72 of file statistics.cpp.
References m_Merged.
Referenced by ~TrainingStatsGatherer().
| 
 | private | 
Definition at line 61 of file statistics.h.
Referenced by add_accu(), and TrainingStatsGatherer().
| 
 | private | 
Definition at line 55 of file statistics.h.
Referenced by add_accu().
| 
 | private | 
Definition at line 50 of file statistics.h.
Referenced by finalize(), and to_json().
| 
 | private | 
Definition at line 53 of file statistics.h.
Referenced by add_accu(), and finalize().
| 
 | private | 
Definition at line 57 of file statistics.h.
Referenced by ~TrainingStatsGatherer().