title: Why appears UserWarning: Loky-backed parallel loops cannot be called in a multiprocessing, setting n_jobs=1 while using svm sklearn?
body: <p>I'm doing multiples experiments, so I use the multiprocess package like this,</p>
  <pre><code>with multiprocessing.Pool(processes=20) as pool:
  results = pool.starmap(run_exp_dep_sim, zip(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg10,arg9,arg16,arg11,arg12,arg13,arg14,arg15))
  </code></pre>
  <p>and in run_exp_dep_sim the svm model is run:</p>
  <pre><code>def run_exp_dep_sim(num_exp, pos_data, neg_data, test_data, test_labels, train_labels,score1,score2, 
                    chose,tau, dif, fuzzy, remove_stop, train_data, compress, concatenate):
  #other stuff where I don't use svm                    
  else:
      seed_val = 42
      np.random.seed(seed_val)
      parameters = {'C': [.05, .12, .25, .5, 1, 2, 4]}
      results, x, y,z,dic1,dic2 = classificator_pos_neg(pos_data, neg_data, test_data,score1,score2,kw1,kw2,
                  tau=tau,chose=chose,dif = dif, fuzzy = fuzzy,remove_stop=remove_stop, train_data =train_data,compress = compress)
  
      if compress == True: 
          svr = svm.LinearSVC(class_weight='balanced', dual=False)
      else: 
          svr = svm.LinearSVC(class_weight='balanced', dual=True)
              
      grid_anorexia = GridSearchCV(estimator=svr, param_grid=parameters, n_jobs=8, scoring='f1_macro', cv=5)
      grid_anorexia.fit(z, train_labels)
  
      y_pred = grid_anorexia.predict(results)
      a1 = grid_anorexia.best_params_
  
      return f1_score(test_labels, y_pred),a1
      
  </code></pre>
  <p>The compress== True it's because the matrices pass on to the classificator have two columns and I read in the documentation about the  change of dual respect the number of samples and the number of features.</p>
  <p>So, I have the werining: UserWarning: Loky-backed parallel loops cannot be called in a multiprocessing, setting n_jobs=1</p>
  <p>What can I do to resolve this?</p>