mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-07 20:50:52 +00:00
instantiate inference models
This commit is contained in:
parent
d2ec822b12
commit
7071c46422
6 changed files with 40 additions and 20 deletions
|
@ -321,12 +321,10 @@ async def resolve_impls(
|
|||
inner_specs=inner_specs,
|
||||
)
|
||||
|
||||
for k, v in specs.items():
|
||||
cprint(k, "blue")
|
||||
cprint(v, "blue")
|
||||
|
||||
sorted_specs = topological_sort(specs.values())
|
||||
|
||||
cprint(f"sorted_specs={sorted_specs}", "red")
|
||||
|
||||
impls = {}
|
||||
for spec in sorted_specs:
|
||||
api = spec.api
|
||||
|
|
|
@ -53,7 +53,8 @@ async def instantiate_provider(
|
|||
args = [inner_impls, deps]
|
||||
elif isinstance(provider_config, str) and provider_config == "models-router":
|
||||
config = None
|
||||
args = [[], deps]
|
||||
assert len(deps) == 1 and Api.models in deps
|
||||
args = [deps[Api.models]]
|
||||
else:
|
||||
raise ValueError(f"provider_config {provider_config} is not valid")
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue