prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Wrong class number for LVIS 1.0 dataset
  **Checklist**
  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.
  
  **Describe the bug**
  Wrong class number for LVIS 1.0 dataset
  
  **Reproduction**
  1. What command or script did you run?
  N.A.
  2. Did you make any modifications on the code or config? Did you understand what you have modified?
  Nope
  3. What dataset did you use?
  LVIS1.0
  
  **Environment**
  N.A.
  
  **Error traceback**
  N.A.
  
  **Bug fix**
  For the config file for LVIS1.0 dataset, the class number should be 1203 instead of 1230 as indicated on the official website:
  https://www.lvisdataset.org/dataset
  
  https://github.com/open-mmlab/mmdetection/blob/9596b9a4c916ae601f9a8a641c3a0ea47265abec/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py#L8
  
  
  </issue>
  <code>
  [start of configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py]
  1 _base_ = [
  2     '../_base_/models/mask_rcnn_r50_fpn.py',
  3     '../_base_/datasets/lvis_v1_instance.py',
  4     '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
  5 ]
  6 model = dict(
  7     roi_head=dict(
  8         bbox_head=dict(num_classes=1230), mask_head=dict(num_classes=1230)))
  9 test_cfg = dict(
  10     rcnn=dict(
  11         score_thr=0.0001,
  12         # LVIS allows up to 300
  13         max_per_img=300))
  14 img_norm_cfg = dict(
  15     mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
  16 train_pipeline = [
  17     dict(type='LoadImageFromFile'),
  18     dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
  19     dict(
  20         type='Resize',
  21         img_scale=[(1333, 640), (1333, 672), (1333, 704), (1333, 736),
  22                    (1333, 768), (1333, 800)],
  23         multiscale_mode='value',
  24         keep_ratio=True),
  25     dict(type='RandomFlip', flip_ratio=0.5),
  26     dict(type='Normalize', **img_norm_cfg),
  27     dict(type='Pad', size_divisor=32),
  28     dict(type='DefaultFormatBundle'),
  29     dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
  30 ]
  31 data = dict(train=dict(dataset=dict(pipeline=train_pipeline)))
  32
  [end of configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.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/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py b/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py
  --- a/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py
  +++ b/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py
  @@ -5,7 +5,7 @@
   ]
   model = dict(
       roi_head=dict(
  -        bbox_head=dict(num_classes=1230), mask_head=dict(num_classes=1230)))
  +        bbox_head=dict(num_classes=1203), mask_head=dict(num_classes=1203)))
   test_cfg = dict(
       rcnn=dict(
           score_thr=0.0001,
  
verification_info: {"golden_diff": "diff --git a/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py b/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py\n--- a/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py\n+++ b/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py\n@@ -5,7 +5,7 @@\n ]\n model = dict(\n     roi_head=dict(\n-        bbox_head=dict(num_classes=1230), mask_head=dict(num_classes=1230)))\n+        bbox_head=dict(num_classes=1203), mask_head=dict(num_classes=1203)))\n test_cfg = dict(\n     rcnn=dict(\n         score_thr=0.0001,\n", "issue": "Wrong class number for LVIS 1.0 dataset\n**Checklist**\r\n1. I have searched related issues but cannot get the expected help.\r\n2. The bug has not been fixed in the latest version.\r\n\r\n**Describe the bug**\r\nWrong class number for LVIS 1.0 dataset\r\n\r\n**Reproduction**\r\n1. What command or script did you run?\r\nN.A.\r\n2. Did you make any modifications on the code or config? Did you understand what you have modified?\r\nNope\r\n3. What dataset did you use?\r\nLVIS1.0\r\n\r\n**Environment**\r\nN.A.\r\n\r\n**Error traceback**\r\nN.A.\r\n\r\n**Bug fix**\r\nFor the config file for LVIS1.0 dataset, the class number should be 1203 instead of 1230 as indicated on the official website:\r\nhttps://www.lvisdataset.org/dataset\r\n\r\nhttps://github.com/open-mmlab/mmdetection/blob/9596b9a4c916ae601f9a8a641c3a0ea47265abec/configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py#L8\r\n\n", "before_files": [{"content": "_base_ = [\n    '../_base_/models/mask_rcnn_r50_fpn.py',\n    '../_base_/datasets/lvis_v1_instance.py',\n    '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'\n]\nmodel = dict(\n    roi_head=dict(\n        bbox_head=dict(num_classes=1230), mask_head=dict(num_classes=1230)))\ntest_cfg = dict(\n    rcnn=dict(\n        score_thr=0.0001,\n        # LVIS allows up to 300\n        max_per_img=300))\nimg_norm_cfg = dict(\n    mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)\ntrain_pipeline = [\n    dict(type='LoadImageFromFile'),\n    dict(type='LoadAnnotations', with_bbox=True, with_mask=True),\n    dict(\n        type='Resize',\n        img_scale=[(1333, 640), (1333, 672), (1333, 704), (1333, 736),\n                   (1333, 768), (1333, 800)],\n        multiscale_mode='value',\n        keep_ratio=True),\n    dict(type='RandomFlip', flip_ratio=0.5),\n    dict(type='Normalize', **img_norm_cfg),\n    dict(type='Pad', size_divisor=32),\n    dict(type='DefaultFormatBundle'),\n    dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),\n]\ndata = dict(train=dict(dataset=dict(pipeline=train_pipeline)))\n", "path": "configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py"}]}