HomePhabricator

loss_function_batch works for now, but only receives one candidate. Have to…

Authored by kleina on Wed, May 13, 11:32 AM.

Description

loss_function_batch works for now, but only receives one candidate. Have to figure out how to pass the whole batch.

Signed-off-by: Andre Klein <andre.klein@dkfz-heidelberg.de>

Details

Committed
kleinaWed, May 13, 11:32 AM
Parents
rOBSHYPPOPY24436615c9c6: Fixed typo.
Branches
Unknown
Tags
Unknown

Event Timeline

floca added a subscriber: floca.Fri, May 15, 2:36 PM
floca added inline comments.
/hyppopy/solvers/OptunitySolver.py
89–96

Why using map?

Why not just

candidates = {}
for elem in seq:
  can = CandidateDescriptor(**elem)
  candidates[can.ID] = can

return f(candidates)

and in your OptionitySolver::loss_function_batch

def loss_function_batch(self, **candidates):
  result = super(OptunitySolver, self).loss_function_batch([candidates[k] for k in candidates])
  return [ values['loss'] for values in result]

?