Skip to content

Commit

Permalink
Makes sure the observer examples run (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgondu authored Aug 16, 2024
1 parent 17562b8 commit bc8a099
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@
# Initializing a logP objective function.
problem = objective_factory.create(
name="rdkit_logp",
observer=observer,
string_representation="SELFIES",
observer_init_info={"run_id": None, "experiment_id": None},
)
f, x0 = problem.black_box, problem.x0

# Attaching the observer to the black box
observer.initialize_observer(
f.info, caller_info={"run_id": None, "experiment_id": None}, seed=1
)
f.set_observer(observer)

# Logging some examples
# The observer will register each call to f.
f(np.array([["[C]", "[C]"]]))
Expand Down

0 comments on commit bc8a099

Please sign in to comment.