mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-06 12:37:33 +00:00
generate distribution specs
This commit is contained in:
parent
0068d059db
commit
cf897d188b
2 changed files with 1 additions and 1 deletions
|
@ -0,0 +1,21 @@
|
|||
from llama_toolchain.core.distribution_registry import *
|
||||
import json
|
||||
|
||||
import fire
|
||||
import yaml
|
||||
from llama_toolchain.common.serialize import EnumEncoder
|
||||
|
||||
|
||||
def main():
|
||||
for d in available_distribution_specs():
|
||||
file_path = "./configs/distributions/distribution_registry/{}.yaml".format(
|
||||
d.distribution_type
|
||||
)
|
||||
|
||||
with open(file_path, "w") as f:
|
||||
to_write = json.loads(json.dumps(d.dict(), cls=EnumEncoder))
|
||||
f.write(yaml.dump(to_write, sort_keys=False))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
fire.Fire(main)
|
Loading…
Add table
Add a link
Reference in a new issue