Skip to content

Commit

Permalink
add pure constraint agents to test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Morris committed Nov 21, 2024
1 parent 041d094 commit 8714c1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/blop/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@ def RE(db):

single_task_agents = [
"1d_1f",
# "1d_1c",
"2d_1f",
"2d_1f_1c",
"2d_2f_2c",
"3d_2r_2f_1c",
]

nonpareto_multitask_agents = ["2d_2c"]

pareto_agents = ["2d_2f_2c", "3d_2r_2f_1c"]

all_agents = [*single_task_agents, *pareto_agents]
all_agents = [*single_task_agents, *nonpareto_multitask_agents, *pareto_agents]


def get_agent(param):
Expand Down Expand Up @@ -97,7 +98,7 @@ def get_agent(param):
DOF(description="The first DOF", name="x2", search_domain=(-5.0, 5.0)),
],
objectives=[
Objective(description="Himmelblau’s function", name="himmelblau", target="min"),
Objective(description="Himmelblau’s function", name="himmelblau", constraint=(95, 105)),
Objective(description="Himmelblau’s function", name="himmelblau", constraint=(95, 105)),
],
digestion=sketchy_himmelblau_digestion,
Expand Down
2 changes: 1 addition & 1 deletion src/blop/tests/test_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_agent(agent, RE, db):
"""

agent.db = db
RE(agent.learn("qr", n=32))
RE(agent.learn("qr", n=64))

best = agent.best
assert [dof.name in best for dof in agent.dofs]
Expand Down

0 comments on commit 8714c1e

Please sign in to comment.