Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alpayariyak committed Dec 19, 2023
1 parent f324bef commit 8202d4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
DEFAULT_BATCH_SIZE = 10

MAX_CONCURRENCY = 100
DEFAULT_MAX_CONCURRENCY = 100

sampling_param_types = {
'n': int,
Expand Down
6 changes: 3 additions & 3 deletions src/utils.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import os
from typing import Any, Dict, Optional, Union
from vllm import AsyncLLMEngine, AsyncEngineArgs, SamplingParams
from constants import sampling_param_types, DEFAULT_BATCH_SIZE, MAX_CONCURRENCY
from constants import sampling_param_types, DEFAULT_BATCH_SIZE, DEFAULT_MAX_CONCURRENCY
import logging

logging.basicConfig(level=logging.INFO)

class ServerlessConfig:
def __init__(self):
self._max_concurrency = int(os.environ.get('MAX_CONCURRENCY', DEFAULT_BATCH_SIZE))
self._default_batch_size = int(os.environ.get('DEFAULT_BATCH_SIZE', MAX_CONCURRENCY))
self._max_concurrency = int(os.environ.get('MAX_CONCURRENCY', DEFAULT_MAX_CONCURRENCY))
self._default_batch_size = int(os.environ.get('DEFAULT_BATCH_SIZE', DEFAULT_BATCH_SIZE))

@property
def max_concurrency(self):
Expand Down

0 comments on commit 8202d4c

Please sign in to comment.