提交 c5e8e27b 编写于 作者: D dongzhihong

"change empty gradient to error"

上级 44e39246
package pserver package pserver
import ( import (
"errors"
"hash/fnv" "hash/fnv"
"sort" "sort"
"time" "time"
...@@ -124,8 +125,7 @@ func (c *Client) FinishInitParams() error { ...@@ -124,8 +125,7 @@ func (c *Client) FinishInitParams() error {
// parameters. // parameters.
func (c *Client) SendGrads(grads []Gradient) error { func (c *Client) SendGrads(grads []Gradient) error {
if len(grads) == 0 { if len(grads) == 0 {
log.Info("Send Empty Gradient") return errors.New("no gradient received")
return nil
} }
errCh := make(chan error, len(grads)) errCh := make(chan error, len(grads))
for _, g := range grads { for _, g := range grads {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册