ej0cl6/deep-active-learning

Error with coreset strategy

kaushikpavani opened this issue · 4 comments

Tried coreset strategy with various initializations: NUM_INIT_LB and NUM_QUERY. All of them produce errors as shown below. Looks like 'sols{}.pkl' is not being generated.

(pytorch_p36) [ec2-user@ip-172-31-38-51 deep-active-learning]$ python run.py
/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
number of labeled pool: 1000
number of unlabeled pool: 39000
number of testing pool: 10000
MNIST
SEED 1
CoreSet
Round 0
testing accuracy 0.7458
Round 1
calculate distance matrix
/home/ec2-user/src/deep-active-learning/query_strategies/core_set.py:24: RuntimeWarning: invalid value encountered in sqrt
dist_mat = np.sqrt(dist_mat)
0:00:22.086067
calculate greedy solution
greedy solution 0/50
greedy solution 10/50
greedy solution 20/50
greedy solution 30/50
greedy solution 40/50
0:00:13.353899

/home/ec2-user/src/deep-active-learning/query_strategies/core_set.py(64)query()
63
---> 64 sols = pickle.load(open('sols{}.pkl'.format(SEED), 'rb'))
65

ipdb>

Exiting Debugger.

I stuck at this point. The 'sols{}.pkl' file will be made in the code 'core_set_solve.py'. But I have no idea what to type in. Suggested command is needed. Thanks in advance

I stuck at this point. The 'sols{}.pkl' file will be made in the code 'core_set_solve.py'. But I have no idea what to type in. Suggested command is needed. Thanks in advance

If my understanding is right, at the ipdb line we should stop and run 'core_set_solve.py' file. For example, if we use a seed 5, then we can obtain 'mip5.pkl' from running 'run.py', then we load this file to 'core_set_solve.py' and get the corresponding 'sols5.pkl'. Then we come back to run 'run.py'.

I stuck at this point. The 'sols{}.pkl' file will be made in the code 'core_set_solve.py'. But I have no idea what to type in. Suggested command is needed. Thanks in advance

If my understanding is right, at the ipdb line we should stop and run 'core_set_solve.py' file. For example, if we use a seed 5, then we can obtain 'mip5.pkl' from running 'run.py', then we load this file to 'core_set_solve.py' and get the corresponding 'sols5.pkl'. Then we come back to run 'run.py'.

Thanks for the explanation!

Currently, the package has been updated and does not support core-set method anymore. Please refer to the original repo (https://github.com/ozansener/active_learning_coreset) of core-set method for more details.