update Evox releated for EvoX-v0.9.1

This commit is contained in:
wls2002
2025-03-26 10:05:49 +08:00
parent 55f1c626d3
commit f017e8357a
3 changed files with 20 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ def nan2inf(x):
workflow = workflows.StdWorkflow(
algorithm=evox_algorithm,
problem=problem,
candidate_transforms=[jax.jit(jax.vmap(evox_algorithm.transform))],
solution_transforms=[jax.jit(jax.vmap(evox_algorithm.transform))],
fitness_transforms=[nan2inf],
monitors=[monitor],
opt_direction="max",
@@ -62,5 +62,5 @@ state = workflow.enable_multi_devices(state)
# run the workflow for 100 steps
for i in range(100):
train_info, state = workflow.step(state)
state = workflow.step(state)
monitor.show()