Skip to content

Commit

Permalink
Handle interval correctly for categories
Browse files Browse the repository at this point in the history
If the transformer does not handle interval and the original dimension
is a category, then we should return the categories. We cannot transform
them.
  • Loading branch information
bouthilx committed Nov 27, 2020
1 parent bee02af commit aa8eecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/orion/core/worker/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def interval(self, alpha=1.0):
interval = self.transformer.interval()
if interval:
return interval
elif self.original_dimension.prior_name == 'choices':
if self.original_dimension.type == 'categorical':
return self.original_dimension.categories

low, high = self.original_dimension.interval(alpha)
Expand Down

0 comments on commit aa8eecb

Please sign in to comment.