Repository: mozilla/bugbug

Issue:
[model:backout] TypeError: All intermediate steps should be transformers and implement fit and transform
Failing on [bugbug integration test](https://github.com/mozilla/bugbug/runs/19338314086):

```
+ bugbug-train backout --limit 30000 --no-download
2023-12-05 17:34:09,725:INFO:scripts.trainer:Skipping download of the databases
2023-12-05 17:34:09,725:INFO:scripts.trainer:Training *backout* model
2023-12-05 17:34:09,781:INFO:bugbug.models.backout:157 commits were backed out
2023-12-05 17:34:09,781:INFO:bugbug.models.backout:299 commits were not backed out
2023-12-05 17:34:09,866:INFO:bugbug.model:X: (456, 3), y: (456,)
Traceback (most recent call last):
  File "/usr/local/bin/bugbug-train", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/scripts/trainer.py", line 141, in main
    retriever.go(args)
  File "/usr/local/lib/python3.10/site-packages/scripts/trainer.py", line 41, in go
    metrics = model_obj.train(limit=args.limit)
  File "/usr/local/lib/python3.10/site-packages/bugbug/model.py", line 399, in train
    scores = cross_validate(
  File "/usr/local/lib/python3.10/site-packages/sklearn/model_selection/_validation.py", line 285, in cross_validate
    _warn_or_raise_about_fit_failures(results, error_score)
  File "/usr/local/lib/python3.10/site-packages/sklearn/model_selection/_validation.py", line 367, in _warn_or_raise_about_fit_failures
    raise ValueError(all_fits_failed_message)
ValueError: 
All the 5 fits failed.
It is very likely that your model is misconfigured.
You can try to debug the error by setting error_score='raise'.

Below are more details about the failures:
--------------------------------------------------------------------------------
5 fits failed with the following error:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/sklearn/model_selection/_validation.py", line 686, in _fit_and_score
    estimator.fit(X_train, y_train, **fit_params)
  File "/usr/local/lib/python3.10/site-packages/sklearn/pipeline.py", line 378, in fit
    Xt = self._fit(X, y, **fit_params_steps)
  File "/usr/local/lib/python3.10/site-packages/sklearn/pipeline.py", line 316, in _fit
    self._validate_steps()
  File "/usr/local/lib/python3.10/site-packages/sklearn/pipeline.py", line 207, in _validate_steps
    raise TypeError(
TypeError: All intermediate steps should be transformers and implement fit and transform or be the string 'passthrough' 'RandomUnderSampler(random_state=0)' (type <class 'imblearn.under_sampling._prototype_selection._random_under_sampler.RandomUnderSampler'>) doesn't
```


Discussion:
Regressed by #3877

Resolving patch:
diff --git a/bugbug/models/backout.py b/bugbug/models/backout.py
--- a/bugbug/models/backout.py
+++ b/bugbug/models/backout.py
@@ -74,7 +74,7 @@ def __init__(self, lemmatization=False, bug_data=False):
             feature_cleanup.synonyms(),
         ]
 
-        self.extraction_pipeline = ImblearnPipeline(
+        self.extraction_pipeline = Pipeline(
             [
                 (
                     "commit_extractor",
@@ -85,7 +85,7 @@ def __init__(self, lemmatization=False, bug_data=False):
             ]
         )
 
-        self.clf = Pipeline(
+        self.clf = ImblearnPipeline(
             [
                 (
                     "union",


Test patch: