Elffuss BraidHub

kikocis/llama-stack public

Don't import `pkg_resources` until you need it
Changesetf4cd98a3274f09f90e44c54f98c43e2d93432c251d5341c059716879116d6e67
AuthorAshwin Bharambe <ashwin.bharambe@gmail.com> · 2024-09-17 20:01 -07:00
CommitterAshwin Bharambe <ashwin.bharambe@gmail.com> · 2024-09-17 20:01 -07:00
Parents9b2105b161e4

Browse the files at this changeset

2 files changed

modified llama_stack/cli/stack/configure.py +2 −2
@@ -8,8 +8,6 @@
88 import json
99 from pathlib import Path
1010
11-import pkg_resources
12-
1311 import yaml
1412 from termcolor import cprint
1513
@@ -49,6 +47,8 @@
4947 )
5048
5149 def _run_stack_configure_cmd(self, args: argparse.Namespace) -> None:
50+ import pkg_resources
51+
5252 from llama_stack.distribution.build import ImageType
5353
5454 docker_image = None
modified llama_stack/cli/stack/run.py +2 −1
@@ -8,7 +8,6 @@
88
99 from pathlib import Path
1010
11-import pkg_resources
1211 import yaml
1312
1413 from llama_stack.cli.subcommand import Subcommand
@@ -47,6 +46,8 @@
4746 )
4847
4948 def _run_stack_run_cmd(self, args: argparse.Namespace) -> None:
49+ import pkg_resources
50+
5051 from llama_stack.distribution.utils.exec import run_with_pty
5152
5253 if not args.config: