Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Aug 25, 2023
1 parent a2b7ef7 commit 8d08605
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hivemind/moe/server/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from selectors import EVENT_READ, DefaultSelector
from statistics import mean
from time import perf_counter
from typing import Dict, NamedTuple, Optional
from typing import Any, Dict, NamedTuple, Optional, Tuple

import torch
from prefetch_generator import BackgroundGenerator
Expand Down Expand Up @@ -105,7 +105,7 @@ def run(self):
self.shutdown()

def process_batch(self, pool: TaskPoolBase, batch_index: int, *batch: torch.Tensor) -> Tuple[Any, int]:
"""process one batch of tasks from a given pool, return a batch of results and task size (complexity)"""
"""process one batch of tasks from a given pool, return a batch of results and total batch size"""
outputs = pool.process_func(*batch)
return outputs, outputs[0].size(0)

Expand Down

0 comments on commit 8d08605

Please sign in to comment.