Try add unittest for sgd local updater #880
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在 PR #204 里,会在某些情况下使用enableType创建gradient buffer。不过我并没有复现在什么情况下必须要创建这个buffer。
因为要将全局变量去掉,所以这里的逻辑需要修改,但我看目前的单测似乎并没有覆盖到这块逻辑。即使把这块代码删除后,单测还是完全正确的。我尝试着按照说明加了一些单测,结果还是正确的。