Skip to content

Commit

Permalink
Rename lm_eval.logging -> lm_eval.loggers (EleutherAI#1858)
Browse files Browse the repository at this point in the history
* rename lm_eval.logging module

* fix evaluation tracker args
  • Loading branch information
haileyschoelkopf authored and notrichardren committed May 31, 2024
1 parent db2a8f0 commit 879409a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lm_eval/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from lm_eval import evaluator, utils
from lm_eval.evaluator import request_caching_arg_to_dict
from lm_eval.logging import EvaluationTracker, WandbLogger
from lm_eval.loggers import EvaluationTracker, WandbLogger
from lm_eval.tasks import TaskManager
from lm_eval.utils import handle_non_serializable, make_table, simple_parse_args_string

Expand Down Expand Up @@ -255,7 +255,10 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
os.environ["TOKENIZERS_PARALLELISM"] = "false"

# update the evaluation tracker args with the output path and the HF token
args.hf_hub_log_args = f"output_path={args.output_path},token={os.environ.get('HF_TOKEN')},{args.hf_hub_log_args}"
if args.output_path:
args.hf_hub_log_args += f",output_path={args.output_path}"
if os.environ.get("HF_TOKEN", None):
args.hf_hub_log_args += f",token={os.environ.get('HF_TOKEN')}"
evaluation_tracker_args = simple_parse_args_string(args.hf_hub_log_args)
evaluation_tracker = EvaluationTracker(**evaluation_tracker_args)
evaluation_tracker.general_config_tracker.log_experiment_args(
Expand Down
2 changes: 1 addition & 1 deletion lm_eval/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
print_writeout,
run_task_tests,
)
from lm_eval.logging.utils import add_env_info, get_git_commit_hash
from lm_eval.loggers.utils import add_env_info, get_git_commit_hash
from lm_eval.tasks import TaskManager, get_task_dict
from lm_eval.utils import (
eval_logger,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pandas as pd
from packaging.version import Version

from lm_eval.logging.utils import _handle_non_serializable, remove_none_pattern
from lm_eval.loggers.utils import _handle_non_serializable, remove_none_pattern


logger = logging.getLogger(__name__)
Expand Down

0 comments on commit 879409a

Please sign in to comment.