MIC-DKFZ / Hyppopy

Hyppopy is a python toolbox for blackbox optimization. It's purpose is to offer a unified and easy to use interface to a collection of solver libraries.
Other
25 stars 4 forks source link

remove catching solver errors #4

Closed jannikmi closed 3 years ago

jannikmi commented 3 years ago

solver.run() should not catch all errors as it currently is:

try:
    self.execute_solver(search_space)
except Exception as e:
    msg = "Failed to execute solver, error: {}".format(e)
    LOG.error(msg)
    raise AssertionError(msg)

this makes debugging (tracing back the errors) unnecessarily hard and does not really add value in my opinion. "Failed to execute solver" is quite obvious, isn't it?

rfloca commented 3 years ago

Thanks for the feedback. As you closed the ticket, I assume you worked arround it. If it is important to get the internal exception type, one could rethrow after logging instead of generating a new exception. So far we didn't had a use case, there for it was not in the design scope.