Skip to content

Commit

Permalink
Store return value, if though it is None
Browse files Browse the repository at this point in the history
  • Loading branch information
WardLT committed Mar 14, 2024
1 parent 1bec856 commit 9410a2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run_parallel_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,12 @@ def store_simulation(self, result: Result):
templates=templates
)
gen_func = partial(run_generator, model=generator.generator_path, n_samples=args.num_samples, device=hpc_config.torch_device)
update_wrapper(gen_func, run_generator)
gen_func = make_decorator(batched)(args.gen_batch_size)(gen_func) # Wraps gen_func in a decorator in one line
update_wrapper(gen_func, run_generator)
gen_method = PythonGeneratorMethod(
function=gen_func,
name='run_generator',
store_return_value=True,
streaming_queue=queues
)

Expand Down

0 comments on commit 9410a2a

Please sign in to comment.