Skip to content

Commit

Permalink
use fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bassmang committed Sep 29, 2023
1 parent 957db30 commit 6f5af1a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vowpalwabbit/core/src/vw_validate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ void validate_num_bits(VW::workspace& all)
{
if (all.weights.sparse)
{
std::stringstream ss;
ss << "Bit size is " << all.initial_weights_config.num_bits
<< ". While this is allowed for sparse weights, it may cause an overflow and is strongly recommened to use a "
"smaller value.";
all.logger.err_warn(ss.str());
std::string warning = fmt::format(
"Bit size is {}. While this is allowed for sparse weights, it may cause an overflow and is strongly "
"recommended to use a smaller value.",
all.initial_weights_config.num_bits);
all.logger.err_warn(warning);
}
else
{
Expand Down

0 comments on commit 6f5af1a

Please sign in to comment.