Closed oubathAI closed 3 years ago
Welcome to Talos community! Thanks so much for creating your first issue :)
I started to look at the code and for the moment it seems that the error comes from this line : https://github.com/autonomio/talos/blob/dbd27b46a019f6fbfb7b7f08b2eb0de3be0a41ad/talos/parameters/ParamSpace.py#L52
Instead of having self.param_index = list(range(len(self.param_index))))
it seems to me that we should have self.param_index = list(range(len(self.param_space)))))
Can you confirm if I'm right?
It seems that the above message proposes to add a trailing )
but nothing else?
Moreover, self.param_index = list(range(len(self.param_index)))
is doing what we want it to do i.e. reset the parameter index. Did you see this happen often, or just once?
It seems that the above message proposes to add a trailing
)
but nothing else?
No, it's not about trailing )
. Actually, I made a mistake when I made a copy/paste of the code, a mistake which added more )
. I was proposing to replace self.param_index = list(range(len(self.param_index)))
by self.param_index = list(range(len(self. param_space)))
; i.e I propose to reinitialize param_index
using new value of param_space
, since param_space
had been modified when boolean_limit
was applied.
Moreover,
self.param_index = list(range(len(self.param_index)))
is doing what we want it to do i.e. reset the parameter index.
I get it; but since param_space
is been modified when applying boolean_limit
:
https://github.com/autonomio/talos/blob/dbd27b46a019f6fbfb7b7f08b2eb0de3be0a41ad/talos/parameters/ParamSpace.py#L46-L52
It seems that param_index should be reinitialized using the new param space to avoid out of bound error.
Did you see this happen often, or just once?
It happens almost all the time when I execute a scan. Did you have the time to check the Google Colab I shared? The error is quite easily reproducible is less than 2 min.
I've made the change I proposed locally and I can confirm there's no more issue with this modification.
Makes sense. Thanks for pointing it out clearly.
Do you want to open a PR for it?
Oh it's just a line to change; no need a PR for this. I see you update talos regularly, so I let you update it with your next commit. Have a nice weekend !
Was this ever fixed? I just had the same issue and looking at the master branch it seems like the change @oubathAI proposed was never applied.
1) Confirm the below
2) Include the output of:
talos.__version__
:1.0.0
3) Explain clearly what you expect to happen
Execute a Scan using boolean_limit option without crashing
4) Explain what actually happened
When using boolean_limit option, Scan fails because of out of bounds error in param_space when reduction is applied.
5) Provide a code-complete reference
Scan()
commandNOTE: If the data is sensitive and can't be shared, create dummy data that mimics it.
A self-contained Jupyter Notebook, Google Colab, or similar is highly preferred and will speed up helping you with your issue.
I've simplified the workflow to reproduce the error faster. Please find it on Google Colab: Google Colab: https://colab.research.google.com/drive/1zTJUiSr3OiIfQDFp-R4AaoOxhajkjTX2?usp=sharing I can upload the code here if it's better.