Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Fix serve config parsing
Browse files Browse the repository at this point in the history
Co-authored-by: Praveen <[email protected]>
  • Loading branch information
Yard1 and gvspraveen committed Oct 4, 2023
1 parent a54ef33 commit 8ae595b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion aviary/backend/server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ class AppArgs(BaseModel):


class RouterArgs(BaseModel):
models: Dict[str, Union[str, LLMApp]]
models: Union[str, LLMApp, List[Union[LLMApp, str]]]


class PlacementConfig(BaseModel):
Expand Down
7 changes: 4 additions & 3 deletions aviary/backend/server/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from aviary.backend.llm.vllm.vllm_engine import VLLMEngine
from aviary.backend.llm.vllm.vllm_models import VLLMApp
from aviary.backend.server.app import RouterDeployment
from aviary.backend.server.models import LLMApp, ScalingConfig
from aviary.backend.server.models import LLMApp, RouterArgs, ScalingConfig
from aviary.backend.server.plugins.deployment_base_client import DeploymentBaseClient
from aviary.backend.server.plugins.execution_hooks import (
ExecutionHooks,
Expand Down Expand Up @@ -111,7 +111,8 @@ def router_deployment(


def router_application(args):
llm_apps = parse_args(args, llm_app_cls=VLLMApp)
router_args = RouterArgs.parse_obj(args)
llm_apps = parse_args(router_args.models, llm_app_cls=VLLMApp)
return router_deployment(llm_apps, enable_duplicate_models=False)


Expand All @@ -125,7 +126,7 @@ def run(
"""
ray._private.usage.usage_lib.record_library_usage("aviary")
router_app = router_application(vllm_base_args)
router_app = router_application({"models": vllm_base_args})

host = "0.0.0.0"

Expand Down
2 changes: 1 addition & 1 deletion serve/amazon--LightGPT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ applications:
route_prefix: /amazon--LightGPT
import_path: aviary.backend:router_application
args:
args:
models:
- "./models/continuous_batching/amazon--LightGPT.yaml"
2 changes: 1 addition & 1 deletion serve/codellama--CodeLlama-34b-Instruct-hf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ applications:
route_prefix: /codellama--CodeLlama-34b-Instruct-hf
import_path: aviary.backend:router_application
args:
args:
models:
- "./models/continuous_batching/codellama--CodeLlama-34b-Instruct-hf.yaml"
2 changes: 1 addition & 1 deletion serve/meta-llama--Llama-2-13b-chat-hf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ applications:
route_prefix: /meta-llama--Llama-2-13b-chat-hf
import_path: aviary.backend:router_application
args:
args:
models:
- "./models/continuous_batching/meta-llama--Llama-2-13b-chat-hf.yaml"
2 changes: 1 addition & 1 deletion serve/meta-llama--Llama-2-70b-chat-hf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ applications:
route_prefix: /meta-llama--Llama-2-70b-chat-hf
import_path: aviary.backend:router_application
args:
args:
models:
- "./models/continuous_batching/meta-llama--Llama-2-70b-chat-hf.yaml"
2 changes: 1 addition & 1 deletion serve/meta-llama--Llama-2-7b-chat-hf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ applications:
route_prefix: /meta-llama--Llama-2-7b-chat-hf
import_path: aviary.backend:router_application
args:
args:
models:
- "./models/continuous_batching/meta-llama--Llama-2-7b-chat-hf.yaml"

0 comments on commit 8ae595b

Please sign in to comment.