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

Possible bug in PoolLast's is_empty method #1

Open
Ridicus opened this issue Jul 30, 2024 · 4 comments
Open

Possible bug in PoolLast's is_empty method #1

Ridicus opened this issue Jul 30, 2024 · 4 comments

Comments

@Ridicus
Copy link

Ridicus commented Jul 30, 2024

In class PoolLast from shadeils.py we can find (line 73):

def is_empty(self):
    counts = self.improvements.values()
    return np.all(counts == 0)

Given the fact that the result of dictionary class's method values() returns some type of a collection,
no matter the contents of the dictionary, the comparison values() == 0 will always yield False.

As a result, if not pool_global.is_empty(): statement found in line 292 will always be executed .

I assume that the behaviour is unintended, but does it have an impact on the performance, overall logic of the method?

@dmolina
Copy link
Owner

dmolina commented Jul 30, 2024

Thank you for detecting that. Fortunately, I think it is not relevant, because, as I remember, the experiments were carried out with a pool non empty. Anyway, I will check, and give you a more complete information (and a fix) later.

@Ridicus
Copy link
Author

Ridicus commented Jul 30, 2024

Thank you for your response!

I need SHADE-ILS for my own research, and because of that I have downloaded
and started to organise your code.

I have noticed that a lot of it is not being used (got rid of ~3/4 of it at the moment),
and removal of it had no impact on the method.

Would you mind if I shared refurbished code with you so you could update
your own repository?

@dmolina
Copy link
Owner

dmolina commented Jul 30, 2024

I need SHADE-ILS for my own research, and because of that I have downloaded and started to organise your code.

Ok.

I have noticed that a lot of it is not being used (got rid of ~3/4 of it at the moment), and removal of it had no impact on the method.

Yes, sometimes it happens. I write several options that finally did not work, and some code is actually not used at all. However, when I publish the paper, I prefer to submit the source code used for the experimental section, so sometimes that code was not removed.

Would you mind if I shared refurbished code with you so you could update your own repository?

I do not mind, however, in order to maintain localled the original source code, I prefer to have for now in another branch.
Anyway, if you need any help (I have worked a lot in LSGO, give tutorials, and several colllaborations), does not hesitate in contact with me.

@Ridicus
Copy link
Author

Ridicus commented Jul 30, 2024

Thank you for your response!

I am waiting for your insights on the bug :)

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

No branches or pull requests

2 participants