You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not very familiar with the project, but I came upon this and it looks to me like an oversight (given the refactor of search space to behave more dict-like).
The use of the custom HyperparameterNotFoundError instead of a KeyError breaks the inherited logic of get:
816defget(self, key, default=None):
817'D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.'818try:
819returnself[key]
820exceptKeyError:
821returndefault
Since line 819 fails with a HyperparameterNotFoundError, the .get call now fails if the key is missing from the search space.
I recon the easiest would be to derive the custom error from a KeyError, but I don't know what other implications this would have for the project.
I am not very familiar with the project, but I came upon this and it looks to me like an oversight (given the refactor of search space to behave more dict-like).
The use of the custom
HyperparameterNotFoundError
instead of aKeyError
breaks the inherited logic ofget
:Since line 819 fails with a
HyperparameterNotFoundError
, the.get
call now fails if the key is missing from the search space.I recon the easiest would be to derive the custom error from a
KeyError
, but I don't know what other implications this would have for the project.MWE:
workaround
The text was updated successfully, but these errors were encountered: