mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
drop custom classes to manage hydra
This commit is contained in:
parent
86fff23a9e
commit
aca6bfe0df
4 changed files with 17 additions and 82 deletions
|
@ -14,6 +14,7 @@ from dotenv import load_dotenv
|
|||
from fastapi import FastAPI, HTTPException, Request
|
||||
from fastapi.responses import StreamingResponse
|
||||
|
||||
from hydra_zen import instantiate
|
||||
from omegaconf import OmegaConf
|
||||
|
||||
from llama_toolchain.utils import get_default_config_dir, parse_config
|
||||
|
@ -49,11 +50,8 @@ async def startup():
|
|||
global InferenceApiInstance
|
||||
|
||||
config = get_config()
|
||||
hydra_config = InferenceHydraConfig(
|
||||
**OmegaConf.to_container(config["inference_config"], resolve=True)
|
||||
)
|
||||
inference_config = hydra_config.convert_to_inference_config()
|
||||
|
||||
inference_config = instantiate(config["inference_config"])
|
||||
InferenceApiInstance = await get_inference_api_instance(
|
||||
inference_config,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue