mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
21 lines
557 B
Python
21 lines
557 B
Python
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)
|