Skip to content

Commit

Permalink
verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
lehner committed Jun 4, 2024
1 parent f666829 commit 8987723
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/gpt/core/auto_tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ def __init__(self, tag, params, default_param):
self.at_params = params
self.at_default_param = default_param
self.at_active = g.default.has("--auto-tune")
self.at_verbose = g.default.is_verbose("auto_tune")

hash_tag = str(hashlib.sha256(tag.encode("utf-8")).hexdigest())

self.at_fn = f".gpt_auto_tune/{hash_tag}.json"
if os.path.exists(self.at_fn) and self.at_active:
self.at_tuned_params = json.load(open(self.at_fn, "rt"))
assert self.at_tuned_params["tag"] == tag
g.message(f"Use tuned results from {self.at_fn}")
if self.at_verbose:
g.message(f"Use tuned results from {self.at_fn}")
else:
self.at_tuned_params = None
# in future versions allow masking by tags

0 comments on commit 8987723

Please sign in to comment.