prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [model:regressor] AttributeError: 'IsotonicRegressionCalibrator' object has no attribute 'n_features_in_'
  https://community-tc.services.mozilla.com/tasks/HncpjvKKRcSnxL_GJ8PV9A/runs/0/logs/public/logs/live.log
  ```
  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 418, in train
      logger.info("Number of features: %d", self.clf.steps[-1][1].n_features_in_)
  AttributeError: 'IsotonicRegressionCalibrator' object has no attribute 'n_features_in_'
  ```
  
  </issue>
  <code>
  [start of bugbug/model_calibration.py]
  1 # -*- coding: utf-8 -*-
  2 # This Source Code Form is subject to the terms of the Mozilla Public
  3 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4 # You can obtain one at http://mozilla.org/MPL/2.0/.
  5 
  6 from sklearn.base import BaseEstimator, ClassifierMixin
  7 from sklearn.calibration import CalibratedClassifierCV
  8 from sklearn.model_selection import train_test_split
  9 
  10 
  11 class IsotonicRegressionCalibrator(BaseEstimator, ClassifierMixin):
  12     def __init__(self, base_clf):
  13         self.base_clf = base_clf
  14         self.calibrated_clf = CalibratedClassifierCV(
  15             base_clf, cv="prefit", method="isotonic"
  16         )
  17 
  18     def fit(self, X_train, y_train):
  19         X_train, X_val, y_train, y_val = train_test_split(
  20             X_train, y_train, test_size=0.2, random_state=42
  21         )
  22         self.base_clf.fit(X_train, y_train)
  23         self.calibrated_clf.fit(X_val, y_val)
  24 
  25     def predict(self, X):
  26         return self.calibrated_clf.predict(X)
  27 
  28     def predict_proba(self, X):
  29         return self.calibrated_clf.predict_proba(X)
  30
  [end of bugbug/model_calibration.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/bugbug/model_calibration.py b/bugbug/model_calibration.py
  --- a/bugbug/model_calibration.py
  +++ b/bugbug/model_calibration.py
  @@ -27,3 +27,7 @@
   
       def predict_proba(self, X):
           return self.calibrated_clf.predict_proba(X)
  +
  +    @property
  +    def n_features_in_(self):
  +        return self.base_clf.n_features_in_
  
verification_info: {"golden_diff": "diff --git a/bugbug/model_calibration.py b/bugbug/model_calibration.py\n--- a/bugbug/model_calibration.py\n+++ b/bugbug/model_calibration.py\n@@ -27,3 +27,7 @@\n \n     def predict_proba(self, X):\n         return self.calibrated_clf.predict_proba(X)\n+\n+    @property\n+    def n_features_in_(self):\n+        return self.base_clf.n_features_in_\n", "issue": "[model:regressor] AttributeError: 'IsotonicRegressionCalibrator' object has no attribute 'n_features_in_'\nhttps://community-tc.services.mozilla.com/tasks/HncpjvKKRcSnxL_GJ8PV9A/runs/0/logs/public/logs/live.log\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/bugbug-train\", line 8, in <module>\r\n    sys.exit(main())\r\n  File \"/usr/local/lib/python3.10/site-packages/scripts/trainer.py\", line 141, in main\r\n    retriever.go(args)\r\n  File \"/usr/local/lib/python3.10/site-packages/scripts/trainer.py\", line 41, in go\r\n    metrics = model_obj.train(limit=args.limit)\r\n  File \"/usr/local/lib/python3.10/site-packages/bugbug/model.py\", line 418, in train\r\n    logger.info(\"Number of features: %d\", self.clf.steps[-1][1].n_features_in_)\r\nAttributeError: 'IsotonicRegressionCalibrator' object has no attribute 'n_features_in_'\r\n```\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nfrom sklearn.base import BaseEstimator, ClassifierMixin\nfrom sklearn.calibration import CalibratedClassifierCV\nfrom sklearn.model_selection import train_test_split\n\n\nclass IsotonicRegressionCalibrator(BaseEstimator, ClassifierMixin):\n    def __init__(self, base_clf):\n        self.base_clf = base_clf\n        self.calibrated_clf = CalibratedClassifierCV(\n            base_clf, cv=\"prefit\", method=\"isotonic\"\n        )\n\n    def fit(self, X_train, y_train):\n        X_train, X_val, y_train, y_val = train_test_split(\n            X_train, y_train, test_size=0.2, random_state=42\n        )\n        self.base_clf.fit(X_train, y_train)\n        self.calibrated_clf.fit(X_val, y_val)\n\n    def predict(self, X):\n        return self.calibrated_clf.predict(X)\n\n    def predict_proba(self, X):\n        return self.calibrated_clf.predict_proba(X)\n", "path": "bugbug/model_calibration.py"}]}