Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
okdshin committed Dec 2, 2023
1 parent bec6f7a commit 4690447
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions flatline_lsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ def __init__(
):
super().__init__(config)

self.baseckend_server_bin = backend_server_bin
self.baseckend_server_host = backend_server_host
self.baseckend_server_port = backend_server_port
self.backend_server_bin = backend_server_bin
self.backend_server_host = backend_server_host
self.backend_server_port = backend_server_port
try:
requests.get(
f"http://{self.baseckend_server_host}:{self.baseckend_server_port}"
f"http://{self.backend_server_host}:{self.backend_server_port}"
)
except Exception:
subprocess.Popen(
(
f"{self.baseckend_server_bin}"
f"{self.backend_server_bin}"
f" --port {self.backend_server_port}"
f" --model-path {model_name}"
f" --n-threads {n_threads}"
Expand All @@ -58,7 +58,7 @@ def __init__(
)
while True:
res = requests.get(
f"http://{self.baseckend_server_host}:{self.baseckend_server_port}"
f"http://{self.backend_server_host}:{self.backend_server_port}"
)
if res.status_code == 200:
break
Expand All @@ -78,7 +78,7 @@ def forward( # type: ignore
**kwargs,
) -> CausalLMOutput:
res = requests.post(
f"http://{self.baseckend_server_host}:{self.baseckend_server_port}/v1/calc_next_token_logits",
f"http://{self.backend_server_host}:{self.backend_server_port}/v1/calc_next_token_logits",
json=dict(input_tokens=input_ids[0].tolist()),
)
res.raise_for_status()
Expand Down

0 comments on commit 4690447

Please sign in to comment.