Repository navigation
Trial level suggest for same variable with different parameters give warning - #908
Conversation
hvy
left a comment
There was a problem hiding this comment.
Thanks a lot for this PR. I left some comments. Could you take a look?
Co-Authored-By: Hiroyuki Vincent Yamazaki <hiroyuki.vincent.yamazaki@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #908 +/- ##
==========================================
+ Coverage 90.21% 90.38% +0.16%
==========================================
Files 108 110 +2
Lines 8936 9146 +210
==========================================
+ Hits 8062 8267 +205
- Misses 874 879 +5
Continue to review full report at Codecov.
|
|
@hvy made all changes 👍 |
hvy
left a comment
There was a problem hiding this comment.
@PhilipMay, thanks a lot for the quick fix. The changes LGTM so I'll merge this PR if there are no comments from the other maintainers.
I would by the way personally make the warning message a bit more verbose but that can be addressed later on. More precisely, include the actual search space definitions and maybe also the actual behavior that the search space is "ignored".
|
Thanks for the great PR! The code seems concise and efficient. This is just an FYI and can be ignored, but I think that we might be able to implement def _check_distribution(self, name, distribution):
# type: (str, BaseDistribution) -> None
old_distribution = self.distributions.get(name, distribution)
if old_distribution != distribution:
warnings.warn('Inconsistent parameter values for distribution {}! '
'This might be a configuration mistake.'
.format(name), RuntimeWarning)Pros and cons of the above implementation:
|
|
Great. I am happy to help with this. |
|
@sile Your suggested change seems to work. I tested it. def _check_distribution(self, name, distribution):
# type: (str, BaseDistribution) -> None
old_distribution = self.distributions.get(name, distribution)
if old_distribution != distribution:
warnings.warn('Inconsistent parameter values for distribution {}! '
'This might be a configuration mistake.'
.format(name), RuntimeWarning)What do you think? Should I change it? Your call. |
|
@PhilipMay Thank you for checking my suggested code! Personally, I prefer simpler code, so it would be appreciated if you could create a PR to reflect the above change. |
|
Created PR here: #937 |
PR for #797
and fix for #867
PR is not completed yet.