snuspl / cruise

Cruise: A Distributed Machine Learning Framework with Automatic System Configuration
Apache License 2.0
26 stars 2 forks source link

[CAY-1232] RuntimeException occurs in PlanImpl build() #1235

Closed hjp615 closed 7 years ago

hjp615 commented 7 years ago

This closes #1232

We found bug in HomogeneousOptimizer in issue #1232. This bug occurs because we used Math.round function to compute optimalNumBlocks for each evaluator and set the last evaluator's optimalNumBlocks with the remaining. However, Math.round function does not always return the floor of the value but the closest integer value, which can be ceiling of the value. This condition allows a result that totalBlocksInServers - numAssignedBlocks to be less than 0, which is infeasible.

I fixed this bug in this PR and it is quite simple logic.

hjp615 commented 7 years ago

@wynot12 Would you please review this PR if you have time? Thanks!