Update seed handling: log fixed seed usage; adjust default seed and temperature in config

This commit is contained in:
mrT23
2024-07-27 17:50:59 +03:00
parent 70f7a90226
commit 3067afbcb3
2 changed files with 4 additions and 3 deletions

View File

@ -132,7 +132,8 @@ class LiteLLMAIHandler(BaseAiHandler):
seed = get_settings().config.get("seed", -1)
if temperature > 0 and seed >= 0:
raise ValueError("Seed is not supported with temperature > 0")
elif seed > 0:
elif seed >= 0:
get_logger().info(f"Using fixed seed of {seed}")
kwargs["seed"] = get_settings().config.seed
if self.repetition_penalty:

View File

@ -27,8 +27,8 @@ output_relevant_configurations=false
large_patch_policy = "clip" # "clip", "skip"
is_auto_command=false
# seed
seed=0 # set positive value to fix the seed
temperature=0
seed=-1 # set positive value to fix the seed (and ensure temperature=0)
temperature=0.2
[pr_reviewer] # /review #
# enable/disable features