title: How to pickle individual steps in sklearn's Pipeline?
body: <p>I am using <code>Pipeline</code> from sklearn to classify text.</p>
  
  <p>In this example <code>Pipeline</code>, I have a <code>TfidfVectorizer</code> and some custom features wrapped with <code>FeatureUnion</code> and a classifier as the <code>Pipeline</code> steps, I then fit the training data and do the prediction:</p>
  
  <pre><code>from sklearn.pipeline import FeatureUnion, Pipeline
  from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.svm import LinearSVC
  
  X = ['I am a sentence', 'an example']
  Y = [1, 2]
  X_dev = ['another sentence']
  
  # classifier
  LinearSVC1 = LinearSVC(tol=1e-4,  C = 0.10000000000000001)
  
  pipeline = Pipeline([
      ('features', FeatureUnion([
         ('tfidf', TfidfVectorizer(ngram_range=(1, 3), max_features= 4000)), 
         ('custom_features', CustomFeatures())])),
      ('clf', LinearSVC1),
      ])
  
  pipeline.fit(X, Y)
  y_pred = pipeline.predict(X_dev)
  
  # etc.
  </code></pre>
  
  <p>Here I need to pickle the <code>TfidfVectorizer</code> step and leave the <code>custom_features</code> unpickled, since I still do experiments with them. The idea is to make the pipeline faster by pickling the tfidf step.</p>
  
  <p>I know I can pickle the whole <code>Pipeline</code> with <code>joblib.dump</code>, but how do I pickle individual steps?</p>