Skip to content

Commit 7c6828f

Browse files
authored
move port to a named constant (#1377)
1 parent 706a681 commit 7c6828f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/modelgauge/suts/indirect_sut.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
from modelgauge.sut_definition import SUTDefinition
1717

1818

19+
DEFAULT_PORT = 7777
20+
21+
1922
class ThreadsafeIdGenerator:
2023

2124
def __init__(self):
@@ -41,10 +44,10 @@ class IndirectSUTResponse(BaseModel):
4144
@modelgauge_sut(capabilities=[AcceptsTextPrompt])
4245
class IndirectSUT(PromptResponseSUT):
4346

44-
def __init__(self, uid: str, model_name: str):
47+
def __init__(self, uid: str, model_name: str, port: int = DEFAULT_PORT):
4548
super().__init__(uid)
4649
self._model_name = model_name
47-
self._server = IndirectSUTServer(7777)
50+
self._server = IndirectSUTServer(port)
4851
self._id_generator = ThreadsafeIdGenerator()
4952

5053
def is_ready(self) -> ReadyResponse:

0 commit comments

Comments
 (0)