mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
ccdd5a1ca6
commit
60fb6cae11
11 changed files with 221 additions and 136 deletions
|
|
@ -165,7 +165,9 @@ def resolve_openai_configs(
|
|||
"""
|
||||
from atroposlib.envs.server_handling.server_manager import ServerBaseline
|
||||
|
||||
print(f"[RESOLVE DEBUG] default_server_configs type = {type(default_server_configs)}")
|
||||
print(
|
||||
f"[RESOLVE DEBUG] default_server_configs type = {type(default_server_configs)}"
|
||||
)
|
||||
print(f"[RESOLVE DEBUG] openai_config_dict = {openai_config_dict}")
|
||||
|
||||
openai_full_prefix = f"{OPENAI_NAMESPACE}{NAMESPACE_SEP}"
|
||||
|
|
@ -216,7 +218,9 @@ def resolve_openai_configs(
|
|||
elif isinstance(default_server_configs, APIServerConfig):
|
||||
# Check APIServerConfig BEFORE ServerBaseline since APIServerConfig inherits from ServerBaseline
|
||||
print("[RESOLVE DEBUG] Taking APIServerConfig merged path")
|
||||
logger.info("Using single OpenAI server configuration based on merged settings (default/YAML/CLI).")
|
||||
logger.info(
|
||||
"Using single OpenAI server configuration based on merged settings (default/YAML/CLI)."
|
||||
)
|
||||
try:
|
||||
final_openai_config = APIServerConfig(**openai_config_dict)
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -193,7 +193,9 @@ class VLLMServer(APIServer):
|
|||
debug_requests = os.getenv("ATROPOS_DEBUG_REQUESTS", "0") == "1"
|
||||
if debug_requests:
|
||||
base = self.config.base_url.replace("/v1", "")
|
||||
prompt_preview = self.tokenizer.decode(prompt_tokens[:256]).replace("\n", "\\n")
|
||||
prompt_preview = self.tokenizer.decode(prompt_tokens[:256]).replace(
|
||||
"\n", "\\n"
|
||||
)
|
||||
print(
|
||||
f"[ATROPOS_REQ_DEBUG] vllm_generate_url={base}/generate "
|
||||
f"prompt_token_len={len(prompt_tokens)}",
|
||||
|
|
@ -211,7 +213,7 @@ class VLLMServer(APIServer):
|
|||
)
|
||||
print(
|
||||
f"[ATROPOS_REQ_DEBUG] curl_base=curl -s -X POST {base}/generate "
|
||||
'-H "Content-Type: application/json" -d \'<JSON_PAYLOAD>\'',
|
||||
"-H \"Content-Type: application/json\" -d '<JSON_PAYLOAD>'",
|
||||
flush=True,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue