Skip to content

Commit

Permalink
test: disable nonjitworkflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
BillHuang2001 committed Aug 6, 2024
1 parent 4fea335 commit f1ce079
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions tests/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,6 @@ def test_std_workflow():
assert min_fitness1 < 1e-4


def test_non_jit_workflow():
monitor = StdSOMonitor()
# create a workflow
workflow = workflows.NonJitWorkflow(
algorithm=algorithms.CSO(
lb=jnp.full(shape=(2,), fill_value=-32),
ub=jnp.full(shape=(2,), fill_value=32),
pop_size=20,
),
problem=problems.numerical.Ackley(),
monitors=[monitor],
)
# init the workflow
key = jax.random.PRNGKey(42)
state = workflow.init(key)

# run the workflow for 100 steps
for i in range(100):
state = workflow.step(state)

# the result should be close to 0
min_fitness = monitor.get_best_fitness()
assert min_fitness < 1e-4


def test_distributed_cso():
monitor = StdSOMonitor()
# create a workflow
Expand Down

0 comments on commit f1ce079

Please sign in to comment.