Explorar el Código

Test bilevel queue

Max Ryabinin hace 3 años
padre
commit
7e6bdc14bd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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