1+ # ------------------------------------------------------------------------------------------------
2+ # License
3+ # ------------------------------------------------------------------------------------------------
4+
5+ # Copyright (c) 2025 LSeu-Open
6+ #
7+ # This code is licensed under the MIT License.
8+ # See LICENSE file in the root directory
9+
10+ # ------------------------------------------------------------------------------------------------
11+ # Description
12+ # ------------------------------------------------------------------------------------------------
13+
14+ # This script is the main entry point for running the model scoring system.
15+ # It provides backward compatibility with the previous version.
16+
17+ # This is the Beta v0.5 of the scoring system
18+
19+ # ------------------------------------------------------------------------------------------------
20+ # Imports
21+ # ------------------------------------------------------------------------------------------------
22+
23+ import argparse
24+ from typing import List
25+ from model_scoring .run_scoring import batch_process_models
26+ from model_scoring .utils .logging import configure_console_only_logging
27+
28+ # ------------------------------------------------------------------------------------------------
29+ # CLI Setup
30+ # ------------------------------------------------------------------------------------------------
31+
32+ def parse_args () -> argparse .Namespace :
33+ """Parse command line arguments."""
34+ parser = argparse .ArgumentParser (
35+ description = "Score LLM models based on various benchmarks and criteria." ,
36+ formatter_class = argparse .RawDescriptionHelpFormatter
37+ )
38+
39+ parser .add_argument (
40+ "models" ,
41+ nargs = "*" ,
42+ help = "Names of models to score. If not provided, defaults to example models."
43+ )
44+
45+ parser .add_argument (
46+ "-v" , "--verbose" ,
47+ action = "store_true" ,
48+ help = "Enable verbose logging"
49+ )
50+
51+ parser .add_argument (
52+ "--version" ,
53+ action = "version" ,
54+ version = "%(prog)s Beta v1.0"
55+ )
56+
57+ return parser .parse_args ()
58+
59+ # ------------------------------------------------------------------------------------------------
60+ # Main script
61+ # ------------------------------------------------------------------------------------------------
62+
63+ def main (models : List [str ] = None ) -> None :
64+ """
65+ Main function to run the scoring system.
66+
67+ Args:
68+ models: List of model names to process. If None, uses default models.
69+ """
70+ try :
71+ # Configure logging
72+ configure_console_only_logging ()
73+
74+ # Use provided models
75+ model_names = models or []
76+ if not model_names :
77+ print ("\n [-] No models specified. Please provide at least one model name" )
78+ return
79+
80+ # Run batch processing
81+ batch_process_models (model_names )
82+
83+ except Exception as e :
84+ print (f"\n [-] Processing failed: { str (e )} " )
85+ raise
86+
87+ if __name__ == "__main__" :
88+ args = parse_args ()
89+ main (args .models )
0 commit comments