Skip to content

Commit b4136ba

Browse files
authored
Fix mergekit-evolve crash when not using wandb (#291)
1 parent b159a44 commit b4136ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mergekit/scripts/evolve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def progress_callback(es: cma.CMAEvolutionStrategy):
231231
f.write(best_yaml)
232232
print(f"Merge configuration:\n{best_yaml}")
233233

234-
if wandb:
234+
if use_wandb:
235235
art = wandb.Artifact("best_config", type="merge_config")
236236
art.add_file(os.path.join(storage_path, "best_config.yaml"))
237237
run.log_artifact(art)
@@ -240,7 +240,7 @@ def parallel_evaluate(x: List[np.ndarray]) -> List[float]:
240240
print(f"Received {len(x)} genotypes")
241241
res = strat.evaluate_genotypes(x)
242242

243-
if wandb:
243+
if use_wandb:
244244
res = list(res)
245245
score_mean = np.mean([r["score"] for r in res])
246246
score_std = np.std([r["score"] for r in res])

0 commit comments

Comments
 (0)