prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Apple M1 support
  ## Your Environment
  * Operating system: macOS in an M1 apple computer
  
  ## Describe your issue
  As reported by @alejandrovillegas, installation currently fails in MacBooks with M1 processors. See attached log for more details.
  [m1_issue.txt](https://github.com/mindsdb/lightwood/files/7042557/m1_issue.txt)
  
  
  
  </issue>
  <code>
  [start of lightwood/mixer/__init__.py]
  1 from lightwood.mixer.base import BaseMixer
  2 from lightwood.mixer.unit import Unit
  3 from lightwood.mixer.neural import Neural
  4 from lightwood.mixer.neural_ts import NeuralTs
  5 from lightwood.mixer.xgboost import XGBoostMixer
  6 from lightwood.mixer.random_forest import RandomForest
  7 from lightwood.mixer.sktime import SkTime
  8 from lightwood.mixer.arima import ARIMAMixer
  9 from lightwood.mixer.ets import ETSMixer
  10 from lightwood.mixer.gluonts import GluonTSMixer
  11 from lightwood.mixer.regression import Regression
  12 
  13 try:
  14     from lightwood.mixer.qclassic import QClassic
  15 except Exception:
  16     QClassic = None
  17 
  18 try:
  19     from lightwood.mixer.nhits import NHitsMixer
  20 except Exception:
  21     NHitsMixer = None
  22 
  23 try:
  24     from lightwood.mixer.prophet import ProphetMixer
  25 except Exception:
  26     ProphetMixer = None
  27 
  28 try:
  29     from lightwood.mixer.lightgbm import LightGBM
  30     from lightwood.mixer.lightgbm_array import LightGBMArray
  31 except Exception:
  32     LightGBM = None
  33     LightGBMArray = None
  34 
  35 __all__ = ['BaseMixer', 'Neural', 'NeuralTs', 'LightGBM', 'RandomForest', 'LightGBMArray', 'Unit', 'Regression',
  36            'SkTime', 'QClassic', 'ProphetMixer', 'ETSMixer', 'ARIMAMixer', 'NHitsMixer', 'GluonTSMixer', 'XGBoostMixer']
  37
  [end of lightwood/mixer/__init__.py]
  [start of lightwood/helpers/seed.py]
  1 import random
  2 import torch
  3 import numpy as np
  4 import mxnet as mx
  5 
  6 
  7 def seed(seed_nr: int) -> None:
  8     torch.manual_seed(seed_nr)
  9     torch.backends.cudnn.deterministic = True
  10     torch.backends.cudnn.benchmark = False
  11     np.random.seed(seed_nr)
  12     random.seed(seed_nr)
  13     mx.random.seed(seed_nr)
  14
  [end of lightwood/helpers/seed.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/lightwood/helpers/seed.py b/lightwood/helpers/seed.py
  --- a/lightwood/helpers/seed.py
  +++ b/lightwood/helpers/seed.py
  @@ -1,7 +1,11 @@
   import random
   import torch
   import numpy as np
  -import mxnet as mx
  +
  +try:
  +    import mxnet as mx
  +except Exception:
  +    mx = None
   
   
   def seed(seed_nr: int) -> None:
  @@ -10,4 +14,6 @@
       torch.backends.cudnn.benchmark = False
       np.random.seed(seed_nr)
       random.seed(seed_nr)
  -    mx.random.seed(seed_nr)
  +
  +    if mx is not None:
  +        mx.random.seed(seed_nr)
  diff --git a/lightwood/mixer/__init__.py b/lightwood/mixer/__init__.py
  --- a/lightwood/mixer/__init__.py
  +++ b/lightwood/mixer/__init__.py
  @@ -7,7 +7,6 @@
   from lightwood.mixer.sktime import SkTime
   from lightwood.mixer.arima import ARIMAMixer
   from lightwood.mixer.ets import ETSMixer
  -from lightwood.mixer.gluonts import GluonTSMixer
   from lightwood.mixer.regression import Regression
   
   try:
  @@ -25,6 +24,11 @@
   except Exception:
       ProphetMixer = None
   
  +try:
  +    from lightwood.mixer.gluonts import GluonTSMixer
  +except Exception:
  +    GluonTSMixer = None
  +
   try:
       from lightwood.mixer.lightgbm import LightGBM
       from lightwood.mixer.lightgbm_array import LightGBMArray
  
verification_info: {"golden_diff": "diff --git a/lightwood/helpers/seed.py b/lightwood/helpers/seed.py\n--- a/lightwood/helpers/seed.py\n+++ b/lightwood/helpers/seed.py\n@@ -1,7 +1,11 @@\n import random\n import torch\n import numpy as np\n-import mxnet as mx\n+\n+try:\n+    import mxnet as mx\n+except Exception:\n+    mx = None\n \n \n def seed(seed_nr: int) -> None:\n@@ -10,4 +14,6 @@\n     torch.backends.cudnn.benchmark = False\n     np.random.seed(seed_nr)\n     random.seed(seed_nr)\n-    mx.random.seed(seed_nr)\n+\n+    if mx is not None:\n+        mx.random.seed(seed_nr)\ndiff --git a/lightwood/mixer/__init__.py b/lightwood/mixer/__init__.py\n--- a/lightwood/mixer/__init__.py\n+++ b/lightwood/mixer/__init__.py\n@@ -7,7 +7,6 @@\n from lightwood.mixer.sktime import SkTime\n from lightwood.mixer.arima import ARIMAMixer\n from lightwood.mixer.ets import ETSMixer\n-from lightwood.mixer.gluonts import GluonTSMixer\n from lightwood.mixer.regression import Regression\n \n try:\n@@ -25,6 +24,11 @@\n except Exception:\n     ProphetMixer = None\n \n+try:\n+    from lightwood.mixer.gluonts import GluonTSMixer\n+except Exception:\n+    GluonTSMixer = None\n+\n try:\n     from lightwood.mixer.lightgbm import LightGBM\n     from lightwood.mixer.lightgbm_array import LightGBMArray\n", "issue": "Apple M1 support\n## Your Environment\r\n* Operating system: macOS in an M1 apple computer\r\n\r\n## Describe your issue\r\nAs reported by @alejandrovillegas, installation currently fails in MacBooks with M1 processors. See attached log for more details.\r\n[m1_issue.txt](https://github.com/mindsdb/lightwood/files/7042557/m1_issue.txt)\r\n\r\n\n", "before_files": [{"content": "from lightwood.mixer.base import BaseMixer\nfrom lightwood.mixer.unit import Unit\nfrom lightwood.mixer.neural import Neural\nfrom lightwood.mixer.neural_ts import NeuralTs\nfrom lightwood.mixer.xgboost import XGBoostMixer\nfrom lightwood.mixer.random_forest import RandomForest\nfrom lightwood.mixer.sktime import SkTime\nfrom lightwood.mixer.arima import ARIMAMixer\nfrom lightwood.mixer.ets import ETSMixer\nfrom lightwood.mixer.gluonts import GluonTSMixer\nfrom lightwood.mixer.regression import Regression\n\ntry:\n    from lightwood.mixer.qclassic import QClassic\nexcept Exception:\n    QClassic = None\n\ntry:\n    from lightwood.mixer.nhits import NHitsMixer\nexcept Exception:\n    NHitsMixer = None\n\ntry:\n    from lightwood.mixer.prophet import ProphetMixer\nexcept Exception:\n    ProphetMixer = None\n\ntry:\n    from lightwood.mixer.lightgbm import LightGBM\n    from lightwood.mixer.lightgbm_array import LightGBMArray\nexcept Exception:\n    LightGBM = None\n    LightGBMArray = None\n\n__all__ = ['BaseMixer', 'Neural', 'NeuralTs', 'LightGBM', 'RandomForest', 'LightGBMArray', 'Unit', 'Regression',\n           'SkTime', 'QClassic', 'ProphetMixer', 'ETSMixer', 'ARIMAMixer', 'NHitsMixer', 'GluonTSMixer', 'XGBoostMixer']\n", "path": "lightwood/mixer/__init__.py"}, {"content": "import random\nimport torch\nimport numpy as np\nimport mxnet as mx\n\n\ndef seed(seed_nr: int) -> None:\n    torch.manual_seed(seed_nr)\n    torch.backends.cudnn.deterministic = True\n    torch.backends.cudnn.benchmark = False\n    np.random.seed(seed_nr)\n    random.seed(seed_nr)\n    mx.random.seed(seed_nr)\n", "path": "lightwood/helpers/seed.py"}]}