-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I currently have a workflow with a persistent generator where the actual generator object (for example, an Ax client) is passed to the gen_f as an attribute contained in the gen_specs. Then, inside the gen_f, this generator object is used to determine the new configurations to evaluate.
The problem is that after the run is completed, the original generator I created appears to be unchanged. See the (dummy) example below:
# Create generator and add to `gen_specs`
ax_client = AxClient(...)
gen_specs['user']['ax_client'] = ax_client
# Run ensemble
libE(gen_specs, ...)
# Try to get information from generator
ax_client.get_best_trial() # <- this will fail because ax_client is still empty of trialsThis is because the ax_client that the gen_f was using was actually a copy of the one that was created in the calling script.
Is there any way of passing an object to the gen_f without it being a copy? It would be sufficient if this could be done with just one of the workers (i.e., with the worker taking care of running the persistent generator)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status