[v1] torchrun compatibility (#13642)
Signed-off-by: youkaichao <youkaichao@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import threading
|
||||
import time
|
||||
import uuid
|
||||
from concurrent.futures import Future
|
||||
from typing import List
|
||||
|
||||
import pytest
|
||||
from transformers import AutoTokenizer
|
||||
@@ -211,8 +212,9 @@ def test_engine_core_concurrent_batches(monkeypatch):
|
||||
|
||||
class DummyExecutor(UniProcExecutor):
|
||||
|
||||
def initialize(self, kv_cache_config: KVCacheConfig) -> None:
|
||||
super().initialize(kv_cache_config)
|
||||
def initialize_from_config(
|
||||
self, kv_cache_configs: List[KVCacheConfig]) -> None:
|
||||
super().initialize_from_config(kv_cache_configs)
|
||||
|
||||
# This executor actually can only run 1 batch at a time
|
||||
self.semaphore = threading.Semaphore(1)
|
||||
|
||||
Reference in New Issue
Block a user