Skip to content
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

Potential bug for SearchSpace length #7155

Closed
roger-zhao opened this issue Dec 23, 2020 · 3 comments
Closed

Potential bug for SearchSpace length #7155

roger-zhao opened this issue Dec 23, 2020 · 3 comments

Comments

@roger-zhao
Copy link
Contributor

if self._length is None:

here, when _length is None, then initiate it to current search space length, it's almost good most of times, however if user/developer get len of search space when space is empty, then a unreasonable _length 1 will be produced( the result of empty list for np.prod is 1), so it's better for adding an extra condition such as " len(self.space_map.values()) != 0" . :)

@comaniac
Copy link
Contributor

Thanks for the proposal. Could you send a PR?

@roger-zhao
Copy link
Contributor Author

@comaniac No problem!

@junrushao
Copy link
Member

Closed via #7175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants