Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configspace conversion #832
Add configspace conversion #832
Changes from 7 commits
3883fc2
e2dbae9
fa2663d
4c6811d
442c95e
061708d
acd5a46
12c656b
746970b
3f77f71
674c84e
6bf7518
a14d8c6
64555ed
c7b5a46
c9136fd
18f7395
72002cc
c083bff
8c7dac9
a5a4ac6
e4f6c56
5b8a2c0
107e5bd
47216cc
fd58aa1
8e8b47b
a8f0425
8abd4fb
eb57c58
fec66c3
ebc9886
0087ef8
016a6d2
5ff9d8e
59bdad2
0709f8d
17af4ce
38c1ae5
d818079
534ab5e
192f31c
a104255
f60858a
37c580e
65b6f7d
a14a47b
0a99146
9de07ad
5648f03
06adba3
bd9680f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest moving this logic to a
Space
handler ofto_configspace
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly suggest making this a singedispatch callable like you did with to_oriondim, and cutting-pasting the methods of the
ToConfigSpace
class into handler functions for each supported dimension type below.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the "root" of the singledispatch callable, and just return a
NotImplementedError
for the given argument.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it could probably be useful to also test the transformed dimensions
TransformedDimension
,ReshapedDimension
, etc. that are passed to the constructors of the algorithms.If you choose to support these kind of dimensions, you can use this kind of pattern to get the delegate function based on the type of the wrapped dimension, instead of the type of the wrapper:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like most of the dispatch would be done this way since algorithms receive a transformed space. The use of strings to map the conversion methods may be more convenient than dispatch because of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's incorrect: https://github.com/Epistimio/orion/pull/832/files#diff-eec91bf300bfcaf8b606f6046f67669737948168c0e7a6b00133c91965f5ddd1R104
The name of the class is used for dispatching. The issue is the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed: #832 (comment)