title: How can I save XGboost base_learners?
body: <p>I am learning an ensemble model using XGBoost algorithm</p>
  
  <p>When I printed base_learners, it seems to be stored as a dictionary type.
  like this :</p>
  
  <pre><code>{'dnn': &lt;keras.engine.sequential.Sequential object at 0x000001BB50B97C88&gt;, 'random forest': RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',
              max_depth=4, max_features='sqrt', max_leaf_nodes=None,
              min_impurity_decrease=0.0, min_impurity_split=None,
              min_samples_leaf=2, min_samples_split=2,
              min_weight_fraction_leaf=0.0, n_estimators=100, n_jobs=-1,
              oob_score=False, random_state=42, verbose=0, warm_start=False), 'extra trees': ExtraTreesClassifier(bootstrap=False, class_weight=None, criterion='gini',
             max_depth=4, max_features='auto', max_leaf_nodes=None,
             min_impurity_decrease=0.0, min_impurity_split=None,
             min_samples_leaf=2, min_samples_split=2,
             min_weight_fraction_leaf=0.0, n_estimators=100, n_jobs=-1,
             oob_score=False, random_state=42, verbose=0, warm_start=False)}
  </code></pre>
  
  <p>To use 'base_learner' in another file, How can I save that?
  I can't use save_model(). because that is not model</p>
  
  <p>And, also I can't using pickle module. I don't know why.</p>
  
  <p>But I think multithreaded error problems.</p>
  
  <p>When I using pickle module, I got the following error message:</p>
  
  <pre><code>pickle.dump(base_learners, open('./models/base_learners.pkl', 'wb'))
  TypeError: can't pickle _thread.RLock objects
  </code></pre>
  
  <p>How can I resolve this problem?</p>