Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix bugs for encoding params (#20007)
Browse files Browse the repository at this point in the history
Co-authored-by: shuo-ouyang <[email protected]>
  • Loading branch information
shuo-ouyang and shuo-ouyang authored Mar 14, 2021
1 parent 12347f3 commit d0a5daa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kvstore/gradient_compression.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void GradientCompression::SetTwoBitCompression(const float threshold) {
std::string GradientCompression::EncodeParams() {
using namespace std; // to reduce length of next line
string rval = get_type_str();
if (type_ == CompressionType::kTwoBit) {
if (type_ != CompressionType::kNone) {
rval += "," + to_string(threshold_);
}
return rval;
Expand Down

0 comments on commit d0a5daa

Please sign in to comment.