mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-12 06:44:55 +08:00
setup vllm test logics. 1. install wheels generated from previous build stage 2. generate and install vllm test pkg list on run time based on the torch wheels in the instance 3. run test based on the pre-defined test plan notice the test-plan format is temporary for some basic vllm testing Pull Request resolved: https://github.com/pytorch/pytorch/pull/160361 Approved by: https://github.com/atalman, https://github.com/huydhn
41 lines
1.0 KiB
Python
41 lines
1.0 KiB
Python
# main.py
|
|
|
|
import argparse
|
|
import logging
|
|
|
|
from cli.build_cli.register_build import register_build_commands
|
|
from cli.lib.common.logger import setup_logging
|
|
from cli.test_cli.register_test import register_test_commands
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def main():
|
|
# Define top-level parser
|
|
parser = argparse.ArgumentParser(description="Lumos CLI")
|
|
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
parser.add_argument(
|
|
"--log-level", default="INFO", help="Log level (DEBUG, INFO, WARNING, ERROR)"
|
|
)
|
|
|
|
# registers second-level subcommands
|
|
register_build_commands(subparsers)
|
|
register_test_commands(subparsers)
|
|
|
|
# parse args after all options are registered
|
|
args = parser.parse_args()
|
|
|
|
# setup global logging
|
|
setup_logging(getattr(logging, args.log_level.upper(), logging.INFO))
|
|
logger.debug("Parsed args: %s", args)
|
|
|
|
if hasattr(args, "func"):
|
|
args.func(args)
|
|
else:
|
|
parser.print_help()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|