prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Model.load_from_checkpoint tries to open file path as URL and fail
  ## 🐛 Bug
   load_from_checkpoint tries to classify if the input is a file path or an URL and detects the hard drive letter as a scheme and then classify wrongly the input because of this.
  urllib.error.URLError: \<urlopen error unknown url type: d\>
  
  My input:
  D:\Prog\Projects\AceriNet\research_seed\checkpoints\acerinet\bnacerinet0_target=OVA_OK_penalized=None_loss_fn=ce_normalized=True_balanced=FalseFalse_seed=42_val_loss=0.374_val_auroc=0.9041_v0.ckpt
  
  ### To Reproduce
  
  Steps to reproduce the behavior:
  Use any path with a hard drive letter at the start (windows formatting) for pl.LightningModule().load_from_checkpoint(path)
  
  
  </issue>
  <code>
  [start of pytorch_lightning/utilities/cloud_io.py]
  1 import torch
  2 
  3 from urllib.parse import urlparse
  4 
  5 
  6 def load(path_or_url: str, map_location=None):
  7     parsed = urlparse(path_or_url)
  8     if parsed.scheme == '':
  9         # local file
  10         return torch.load(path_or_url, map_location=map_location)
  11     return torch.hub.load_state_dict_from_url(path_or_url, map_location=map_location)
  12
  [end of pytorch_lightning/utilities/cloud_io.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/pytorch_lightning/utilities/cloud_io.py b/pytorch_lightning/utilities/cloud_io.py
  --- a/pytorch_lightning/utilities/cloud_io.py
  +++ b/pytorch_lightning/utilities/cloud_io.py
  @@ -1,11 +1,12 @@
   import torch
   
  +from pathlib import Path
   from urllib.parse import urlparse
   
   
   def load(path_or_url: str, map_location=None):
       parsed = urlparse(path_or_url)
  -    if parsed.scheme == '':
  -        # local file
  +    if parsed.scheme == '' or Path(path_or_url).is_file():
  +        # no scheme or local file
           return torch.load(path_or_url, map_location=map_location)
       return torch.hub.load_state_dict_from_url(path_or_url, map_location=map_location)
  
verification_info: {"golden_diff": "diff --git a/pytorch_lightning/utilities/cloud_io.py b/pytorch_lightning/utilities/cloud_io.py\n--- a/pytorch_lightning/utilities/cloud_io.py\n+++ b/pytorch_lightning/utilities/cloud_io.py\n@@ -1,11 +1,12 @@\n import torch\n \n+from pathlib import Path\n from urllib.parse import urlparse\n \n \n def load(path_or_url: str, map_location=None):\n     parsed = urlparse(path_or_url)\n-    if parsed.scheme == '':\n-        # local file\n+    if parsed.scheme == '' or Path(path_or_url).is_file():\n+        # no scheme or local file\n         return torch.load(path_or_url, map_location=map_location)\n     return torch.hub.load_state_dict_from_url(path_or_url, map_location=map_location)\n", "issue": "Model.load_from_checkpoint tries to open file path as URL and fail\n## \ud83d\udc1b Bug\r\n load_from_checkpoint tries to classify if the input is a file path or an URL and detects the hard drive letter as a scheme and then classify wrongly the input because of this.\r\nurllib.error.URLError: \\<urlopen error unknown url type: d\\>\r\n\r\nMy input:\r\nD:\\Prog\\Projects\\AceriNet\\research_seed\\checkpoints\\acerinet\\bnacerinet0_target=OVA_OK_penalized=None_loss_fn=ce_normalized=True_balanced=FalseFalse_seed=42_val_loss=0.374_val_auroc=0.9041_v0.ckpt\r\n\r\n### To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\nUse any path with a hard drive letter at the start (windows formatting) for pl.LightningModule().load_from_checkpoint(path)\r\n\n", "before_files": [{"content": "import torch\n\nfrom urllib.parse import urlparse\n\n\ndef load(path_or_url: str, map_location=None):\n    parsed = urlparse(path_or_url)\n    if parsed.scheme == '':\n        # local file\n        return torch.load(path_or_url, map_location=map_location)\n    return torch.hub.load_state_dict_from_url(path_or_url, map_location=map_location)\n", "path": "pytorch_lightning/utilities/cloud_io.py"}]}