浏览代码

Test bilevel queue

Max Ryabinin 3 年之前
父节点
当前提交
7e6bdc14bd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hivemind/moe/client/balancer.py

+ 1 - 1
hivemind/moe/client/balancer.py

@@ -135,7 +135,7 @@ class ExpertBalancer:
             if error.code() == grpc.StatusCode.DEADLINE_EXCEEDED:
                 # response was too slow, choose the next expert and mark this one as slow
                 with self.lock:
-                    new_throughput = max(self.queue, key=itemgetter(1))[1]
+                    new_throughput = 1.5 * max(self.queue, key=itemgetter(1))[1]
                     new_heap_entry = (True, new_throughput, random.random(), uid)
                     heapq.heappush(self.queue, new_heap_entry)
                     self.uid_to_queue[uid] = new_heap_entry