Skip to content

Commit

Permalink
Updated mlperf_logging to be compliant with new H2 logger format
Browse files Browse the repository at this point in the history
  • Loading branch information
graham63 committed Feb 27, 2023
1 parent c615db2 commit 953a389
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions include/lbann/callbacks/mlperf_logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,10 @@ class mlperf_logging : public callback_base {
std::string m_sub_division;
std::string m_sub_status;
std::string m_sub_platform;
//FIXME: Include option to create separate file with just logging data?
/* @brief name of output file. Default = results.txt */
//std::string m_output_filename;
/* @brief DiHydrogen logger */
h2::Logger m_logger{":::MLLOG"};
h2::Logger m_logger{"mlperf_logger", "stdout", ":::MLLOG"};


}; // class mlperf_logging
Expand Down
3 changes: 2 additions & 1 deletion src/callbacks/mlperf_logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ namespace lbann {
namespace callback {

namespace {

void print_value(std::ostringstream& os, int value)
{
os << value;
Expand Down Expand Up @@ -116,7 +117,7 @@ void mlperf_logging::print(std::ostringstream& os,
else
os << ", " << "\"epoch_num\": " << epoch << "}}";

H2_INFO(os.str());
m_logger.get()->info(os.str());
os.flush();
}

Expand Down

0 comments on commit 953a389

Please sign in to comment.