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

Commit d0a5daa

Browse files
shuo-ouyangshuo-ouyang
andauthored
fix bugs for encoding params (#20007)
Co-authored-by: shuo-ouyang <1414114532@qq.com>
1 parent 12347f3 commit d0a5daa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/kvstore/gradient_compression.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void GradientCompression::SetTwoBitCompression(const float threshold) {
7272
std::string GradientCompression::EncodeParams() {
7373
using namespace std; // to reduce length of next line
7474
string rval = get_type_str();
75-
if (type_ == CompressionType::kTwoBit) {
75+
if (type_ != CompressionType::kNone) {
7676
rval += "," + to_string(threshold_);
7777
}
7878
return rval;

0 commit comments

Comments
 (0)