How to specify scale_pos_weight value at runtime in Hyperopt?
Use Sklearns class_weight.compute_class_weight, which will return an array of weights.
My problem here is binary hence i had two elements in the array. We need to increase the weightage of the minority class. The target variable 1 was my minority class, thus I set the maximum scale_pos_weight so to the value from the second element in the array.
 clas_wts_arr = class_weight.compute_class_weight('balanced',np.unique(y_trn),y_trn)   
 self.scale_pos_wt = clas_wts_arr[1]

As part of the space dictionary passed to the objective fn defined within fmin we include scale_pos_weight like the following
'scale_pos_weight' :hp.choice('scale_pos_weight',scl_ps_wt)

if the fmin object has been defined as follows
            best = fmin(fn=objective,
                    space=space,
                    algo=tpe.suggest,
                    max_evals=self.NUM_EVALS, 
                    trials=trials)

Best will have the index of the best value in the array . Using this index we get the actual value of scale_pos_weight . We use this value to set the scale_pos_weight in best .
 best['scale_pos_weight'] = scl_ps_wt[best['scale_pos_weight']]

Now, use can set best as parameter to you classifier.