Possible bug in get_query_strategy inside toolbox.py
Arshita27 opened this issue · comments
Lines 402 to 409 in 71d716d
When I tried to run ''QueryInstanceGraphDensity' it gave me an error: "Missing key 'train_idx' ", even when I was providing this key.
One possible bug could be that in line 402, kwargs.pop('train_idx', None) is being called which removes the train_idx key from the dictionary. Thus when it is called again in line 408, it gives an error as the key is no longer present due to the previous 'pop' statement.
Do let me know if I am missing out anything.
Hi,
Thank you for your reporting, and we will fix this problem in the next release which will be published recently.
For now, please import the 'QueryInstanceGraphDensity' strategy independently for using it.
Here is an example:
from alipy.query_strategy.query_labels import QueryInstanceGraphDensity
density_strategy = QueryInstanceGraphDensity(X, y ,train_idx)