|
2 | 2 | # Reference: https://github.com/LMCache/LMCache/blob/dev/.buildkite/correctness/2-mmlu.py |
3 | 3 |
|
4 | 4 | # ASSUMPTIONS: |
5 | | -# 1. dynamo is running on port 8080 with LMCache enabled |
| 5 | +# 1. dynamo is running (default: localhost:8080) with LMCache enabled |
6 | 6 | # 2. the mmlu dataset is in a "data" directory |
7 | 7 | # 3. all invocations of this script should be run in the same directory |
8 | 8 | # (for later consolidation) |
@@ -41,7 +41,8 @@ def get_llm_response(args, prompt): |
41 | 41 | "stream": False, |
42 | 42 | "seed": 42, # Add explicit seed for determinism |
43 | 43 | } |
44 | | - res = requests.post("http://localhost:8080/v1/chat/completions", json=data, timeout=30) |
| 44 | + url = f"http://{args.host}:{args.port}/v1/chat/completions" |
| 45 | + res = requests.post(url, json=data, timeout=30) |
45 | 46 | if res.status_code != 200: |
46 | 47 | raise Exception(f"Error: {res.status_code} {res.text}") |
47 | 48 | response_json = res.json() |
@@ -159,6 +160,8 @@ def main(args): |
159 | 160 | parser.add_argument("--model", type=str, required=True) |
160 | 161 | parser.add_argument("--result-file", type=str, required=False) |
161 | 162 | parser.add_argument("--number-of-subjects", type=int, required=True) |
| 163 | + parser.add_argument("--host", type=str, default="localhost", help="Dynamo host") |
| 164 | + parser.add_argument("--port", type=int, default=8080, help="Dynamo port") |
162 | 165 |
|
163 | 166 | args = parser.parse_args() |
164 | 167 | if args.result_file is None: |
|
0 commit comments