Commit 442ce51a authored by Baber's avatar Baber
Browse files

fix logging

parent 897ed70a
from lm_eval._cli.eval import Eval
from lm_eval.utils import setup_logging
def cli_evaluate() -> None:
"""Main CLI entry point with subcommand and legacy support."""
setup_logging()
parser = Eval()
args = parser.parse_args()
parser.execute(args)
......
......@@ -434,6 +434,7 @@ class Run(SubCommand):
evaluation_tracker.recreate_metadata_card()
# Print results
cfg.model_args.pop("trust_remote_code", None)
print(
f"{cfg.model} ({cfg.model_args}), gen_kwargs: ({cfg.gen_kwargs}), "
f"limit: {cfg.limit}, num_fewshot: {cfg.num_fewshot}, "
......
import json
import logging
import warnings
from argparse import Namespace
from dataclasses import asdict, dataclass, field
from pathlib import Path
......@@ -274,7 +273,7 @@ class EvaluatorConfig:
def _validate_arguments(self) -> None:
"""Validate configuration arguments and cross-field constraints."""
if self.limit:
warnings.warn(
logging.warning(
"--limit SHOULD ONLY BE USED FOR TESTING. "
"REAL METRICS SHOULD NOT BE COMPUTED USING LIMIT."
)
......
import argparse
import collections
import fnmatch
import functools
......@@ -12,7 +11,7 @@ import re
from dataclasses import asdict, is_dataclass
from itertools import islice
from pathlib import Path
from typing import Any, Callable, Dict, Generator, List, Optional, Tuple
from typing import Any, Callable, Generator, List, Optional, Tuple
import numpy as np
import yaml
......@@ -148,16 +147,6 @@ def simple_parse_args_string(args_string: Optional[str]) -> dict:
return args_dict
def request_caching_arg_to_dict(cache_requests: str) -> dict:
request_caching_args = {
"cache_requests": cache_requests in {"true", "refresh"},
"rewrite_requests_cache": cache_requests == "refresh",
"delete_requests_cache": cache_requests == "delete",
}
return request_caching_args
def join_iters(iters):
for iter in iters:
yield from iter
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment