Skip to content

Commit

Permalink
Merge pull request #192 from kiudee/191_log_version
Browse files Browse the repository at this point in the history
Add a logging call for __version__ to the CLI
  • Loading branch information
kiudee committed Mar 13, 2022
2 parents f0e98ae + a83a8a5 commit f30f208
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tune/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from atomicwrites import AtomicWriter
from skopt.utils import create_result

import tune
from tune.db_workers import TuningClient, TuningServer
from tune.io import load_tuning_config, prepare_engines_json, write_engines_json
from tune.local import (
Expand Down Expand Up @@ -345,11 +346,14 @@ def local( # noqa: C901
Parameters defined in the `tuning_config` file always take precedence.
"""

json_dict = json.load(tuning_config)
settings, commands, fixed_params, param_ranges = load_tuning_config(json_dict)
root_logger = setup_logger(
verbose=verbose, logfile=settings.get("logfile", logfile)
)
# First log the version of chess-tuning-tools:
root_logger.info(f"chess-tuning-tools version: {tune.__version__}")
root_logger.debug(f"Got the following tuning settings:\n{json_dict}")

# Initialize/import data structures:
Expand Down

0 comments on commit f30f208

Please sign in to comment.