{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Mayo Clinic Baseline Resnet18\n\nthe data processing is based on https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-baseline-flash-effnet","metadata":{}},{"cell_type":"code","source":"!pip uninstall -y torchtext\n# !pip install -q --upgrade torch torchvision\n!mkdir -p frozen_packages\n!cp ../input/starter-flash-semantic-segmentation/frozen_packages/* frozen_packages/\n!pip install -q \"lightning-flash[image]\" \"torchmetrics<0.8\" --no-index --find-links frozen_packages/\n!pip install -q -U timm --no-index --find-links frozen_packages/\n\n! pip list | grep -e torch -e lightning\n! nvidia-smi -L","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-09-05T03:35:21.301928Z","iopub.execute_input":"2022-09-05T03:35:21.302259Z","iopub.status.idle":"2022-09-05T03:36:45.926271Z","shell.execute_reply.started":"2022-09-05T03:35:21.302178Z","shell.execute_reply":"2022-09-05T03:36:45.925029Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import os, glob\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torchvision.models as models\nimport flash\nfrom flash.image import ImageClassificationData, ImageClassifier\n\n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-09-05T03:36:45.930194Z","iopub.execute_input":"2022-09-05T03:36:45.930515Z","iopub.status.idle":"2022-09-05T03:36:56.906776Z","shell.execute_reply.started":"2022-09-05T03:36:45.930485Z","shell.execute_reply":"2022-09-05T03:36:56.90558Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#path\nDATASET_FOLDER = \"/kaggle/input/mayo-clinic-strip-ai/\"\nDATASET_SMALL_FOLDER = \"/kaggle/input/stroke-blood-clot-origin-1k-scale-bg-crop\"","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:36:56.908299Z","iopub.execute_input":"2022-09-05T03:36:56.909246Z","iopub.status.idle":"2022-09-05T03:36:56.916975Z","shell.execute_reply.started":"2022-09-05T03:36:56.909208Z","shell.execute_reply":"2022-09-05T03:36:56.914306Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path_csv = os.path.join(DATASET_FOLDER, \"train.csv\")\ndf_train = pd.read_csv(path_csv)\ndisplay(df_train.head())","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:36:56.920308Z","iopub.execute_input":"2022-09-05T03:36:56.920746Z","iopub.status.idle":"2022-09-05T03:36:56.95472Z","shell.execute_reply.started":"2022-09-05T03:36:56.920711Z","shell.execute_reply":"2022-09-05T03:36:56.953664Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Converting test images\n\nthe image conversion is using https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images","metadata":{}},{"cell_type":"code","source":"from PIL import Image\n\nImage.MAX_IMAGE_PIXELS = 25_000_000_000\n\ndef prune_image_rows_cols(im, mask, thr=0.990):\n    # im:0~1的二维数组\n    # delete empty columns\n    for l in reversed(range(im.shape[1])):\n        if (np.sum(mask[:, l]) / float(mask.shape[0])) > thr:  # 本列99%以上是白色\n            im = np.delete(im, l, 1)\n    # delete empty rows\n    for l in reversed(range(im.shape[0])):\n        if (np.sum(mask[l, :]) / float(mask.shape[1])) > thr: # 本行99%以上是白色\n            im = np.delete(im, l, 0)\n    return im\n\n\ndef mask_median(im, val=255):\n    # im:三维数组HWC\n    # 作用：将所有亮度高的地方全部设置成纯白色\n    masks = [None] * 3\n    for c in range(3):\n        masks[c] = im[..., c] >= np.median(im[:, :, c]) - 5  # 中位数 - 5\n    # “*”的作用是将列表等组合数组拆开，*masks是3个(H, W)的Bool的数组\n    mask = np.logical_and(*masks)  # 此时新mask是(H, W)的尺寸\n    im[mask, :] = val\n    return im, mask\n\n\ndef image_load_scale_norm(img_path, prune_thr=0.990, bg_val=255):\n    # 对图片进行多次压缩并去除空白行\n    img = Image.open(img_path)\n#     print(\"img.shape: \", img.width, img.height)\n#     if (img.width * img.height) > 1_500_000_000:  # todo: for train images it was fine 4_000_000_000\n    if (img.width * img.height) > 1_500_000_000:  # todo: for train images it was fine 4_000_000_000\n        print(\"too large: \", img.width, img.height)\n        return None\n    scale = min(img.height / 2e3, img.width / 2e3)  # 2k\n    tmp_size = int(img.width / scale), int(img.height / scale)\n    img.thumbnail(tmp_size, resample=Image.Resampling.BILINEAR, reducing_gap=scale)  # 类似resize但是能保证缩放比例\n    im, mask = mask_median(np.array(img), val=bg_val)\n    im = prune_image_rows_cols(im, mask, thr=prune_thr)\n    img = Image.fromarray(im)\n    scale = min(img.height / 1e3, img.width / 1e3)  # 1k\n    if scale > 1:\n        img = img.resize((int(img.width / scale), int(img.height / scale)), Image.LANCZOS)\n    return img","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-09-05T03:36:56.956067Z","iopub.execute_input":"2022-09-05T03:36:56.956969Z","iopub.status.idle":"2022-09-05T03:36:56.970134Z","shell.execute_reply.started":"2022-09-05T03:36:56.956936Z","shell.execute_reply":"2022-09-05T03:36:56.969178Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import gc\nfrom tqdm.auto import tqdm\n\nls_imgs_tif = glob.glob(os.path.join(DATASET_FOLDER, \"test\", \"*.tif\"))\n# # ['/kaggle/input/mayo-clinic-strip-ai/test/006388_0.tif', '/kaggle/input/mayo-clinic-strip-ai/test/00c058_0.tif'...]\n# # print(ls_imgs_tif)\n# names = [os.path.splitext(os.path.basename(p))[0] for p in ls_imgs_tif]  # ['006388_0', '00c058_0', '008e5c_0', '01adc5_0']\n# # print(names)\n# patient_ids = set([n.split(\"_\")[0] for n in names])\n# # print(patient_ids)\n\n! mkdir test_images\n\nfor img_path in tqdm(ls_imgs_tif):\n    name, _ = os.path.splitext(os.path.basename(img_path))\n    img = image_load_scale_norm(img_path)  # 进行\"白色提纯\" \"删除多余行、列\" \"短边压缩至1k之内\"操作\n    if not img:\n        print(f\"missing: {name}\")\n        continue\n    img.save(os.path.join(\"test_images\", f\"{name}.png\"))  # 保存图像\n    del img\n    gc.collect()","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-09-05T03:36:56.973746Z","iopub.execute_input":"2022-09-05T03:36:56.974Z","iopub.status.idle":"2022-09-05T03:39:16.170315Z","shell.execute_reply.started":"2022-09-05T03:36:56.973977Z","shell.execute_reply":"2022-09-05T03:39:16.169258Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# 看看效果\n~~还是不看的好~~","metadata":{}},{"cell_type":"code","source":"# import openslide\n# from openslide import OpenSlide\n\n# for img_path in tqdm(ls_imgs_tif):\n#     name, _ = os.path.splitext(os.path.basename(img_path))\n# #     print(\"name = \", name, \"img_path = \", img_path)\n# #     slide = OpenSlide(img_path) \n#     img2 = Image.open(img_path)\n#     img = image_load_scale_norm(img_path)  # 进行\"白色提纯\" \"删除多余行、列\" \"短边压缩至1k之内\"操作\n#     scale = min(img2.height / 2e3, img2.width / 2e3)  # 2k\n#     tmp_size = int(img2.width / scale), int(img2.height / scale)\n#     img2.thumbnail(tmp_size, resample=Image.Resampling.BILINEAR, reducing_gap=scale)  # 类似resize但是能保证缩放比例\n    \n# #     region = (1000, 1000) # location of the top left pixel\n# #     level = 0 # level of the picture (we have only 0)\n# #     size = (3500, 3500) # region size in pixels\n\n# #     region = slide.read_region(region, level, size)\n    \n#     if not img:\n#         print(f\"missing: {img_path}\")\n#         continue\n        \n#     plt.figure(figsize=(15, 15))\n#     plt.subplot(121)\n#     plt.title(name + \" -- slide\")\n#     plt.imshow(img2)\n#     plt.subplot(122)\n#     plt.title(name + \" -- thumbnail\")\n#     plt.imshow(img)\n#     plt.show()","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:16.172189Z","iopub.execute_input":"2022-09-05T03:39:16.172896Z","iopub.status.idle":"2022-09-05T03:39:16.179213Z","shell.execute_reply.started":"2022-09-05T03:39:16.172857Z","shell.execute_reply":"2022-09-05T03:39:16.178037Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## 1. Create the Data by DataModule\n","metadata":{}},{"cell_type":"markdown","source":"~~canceled~~","metadata":{}},{"cell_type":"code","source":"# import shutil\n\n# !mkdir -p /kaggle/temp/images/CE\n# !mkdir -p /kaggle/temp/images/LAA\n\n# for _, row in df_train.iterrows():\n#     p_img = os.path.join(DATASET_SMALL_FOLDER, \"train_images\", f\"{row['image_id']}.png\")  # 直接处理的人家的小图的数据\n#     # 小图信息来自lightning哥\n#     if not os.path.isfile(p_img):\n#         print(f\"missing: {p_img}\")\n#         continue\n#         # missing: /kaggle/input/stroke-blood-clot-origin-1k-scale-bg-crop/train_images/6baf51_0.png\n#         # missing: /kaggle/input/stroke-blood-clot-origin-1k-scale-bg-crop/train_images/b894f4_0.png\n#         # 可能是太大了吧\n#     shutil.copy(p_img, os.path.join(\"/kaggle/temp/images\", row[\"label\"], f\"{row['image_id']}.png\"))  # 复制文件按照标签分类","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-09-05T03:39:16.180981Z","iopub.execute_input":"2022-09-05T03:39:16.181768Z","iopub.status.idle":"2022-09-05T03:39:16.193825Z","shell.execute_reply.started":"2022-09-05T03:39:16.181698Z","shell.execute_reply":"2022-09-05T03:39:16.192841Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# # import multiprocessing as mp\nTRANSFORM_PARAMS = {\n    \"image_size\": (528, 528),\n    # \"mean\": (0.485, 0.456, 0.406), \"std\": (0.229, 0.224, 0.225),\n}\n\n# datamodule = ImageClassificationData.from_folders(\n#     train_folder=\"/kaggle/temp/images\",  # train img路径\n#     val_split=0.1,  # 这是什么\n#     batch_size=8,\n#     transform_kwargs=TRANSFORM_PARAMS,\n#     num_workers=2,\n# #     num_workers=mp.cpu_count()\n# ) ","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:16.196975Z","iopub.execute_input":"2022-09-05T03:39:16.19726Z","iopub.status.idle":"2022-09-05T03:39:16.205357Z","shell.execute_reply.started":"2022-09-05T03:39:16.197235Z","shell.execute_reply":"2022-09-05T03:39:16.204462Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## 2. import models by torchvision\nA step-by-step model building and training can make you understand the process more easily","metadata":{}},{"cell_type":"markdown","source":"先不用下面这个","metadata":{}},{"cell_type":"code","source":"# # import torchvision.models as models\n# model = models.resnet18(pretrained=True) \n# device = 'cuda' if torch.cuda.is_available() else 'cpu'\n# # model = model.to(device)","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:16.210779Z","iopub.execute_input":"2022-09-05T03:39:16.211435Z","iopub.status.idle":"2022-09-05T03:39:16.2176Z","shell.execute_reply.started":"2022-09-05T03:39:16.2114Z","shell.execute_reply":"2022-09-05T03:39:16.216667Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"改为使用这个","metadata":{}},{"cell_type":"code","source":"# import torchvision.models as models\nmodel = models.resnet18(pretrained=False) \nmodel.load_state_dict(torch.load(\"../input/pretrained-pytorch/resnet18-5c106cde.pth\"))\ndevice = 'cuda' if torch.cuda.is_available() else 'cpu'\n# model = model.to(device)","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:16.21951Z","iopub.execute_input":"2022-09-05T03:39:16.220295Z","iopub.status.idle":"2022-09-05T03:39:17.237203Z","shell.execute_reply.started":"2022-09-05T03:39:16.220261Z","shell.execute_reply":"2022-09-05T03:39:17.23618Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fc_features = model.fc.in_features \n#since we need output probabilities but the provided pretrained model output a 1000 long data\nmodel.fc = nn.Linear(fc_features, 2)\n# 自行添加一个输出层【1000 -> 2】\n# 这也没加上去啊。。。。","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:17.239019Z","iopub.execute_input":"2022-09-05T03:39:17.239684Z","iopub.status.idle":"2022-09-05T03:39:17.246977Z","shell.execute_reply.started":"2022-09-05T03:39:17.239647Z","shell.execute_reply":"2022-09-05T03:39:17.244602Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model = model.to(device) #after changing model, need to reset this","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:17.25008Z","iopub.execute_input":"2022-09-05T03:39:17.251248Z","iopub.status.idle":"2022-09-05T03:39:22.267138Z","shell.execute_reply.started":"2022-09-05T03:39:17.25121Z","shell.execute_reply":"2022-09-05T03:39:22.266111Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:22.268847Z","iopub.execute_input":"2022-09-05T03:39:22.26922Z","iopub.status.idle":"2022-09-05T03:39:22.278052Z","shell.execute_reply.started":"2022-09-05T03:39:22.269185Z","shell.execute_reply":"2022-09-05T03:39:22.276928Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## 3. Train and evaluate","metadata":{}},{"cell_type":"code","source":"criterion = nn.CrossEntropyLoss()\n\noptimizer = optim.Adam(model.parameters(),lr = 0.05)","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:22.280088Z","iopub.execute_input":"2022-09-05T03:39:22.280862Z","iopub.status.idle":"2022-09-05T03:39:22.291676Z","shell.execute_reply.started":"2022-09-05T03:39:22.280823Z","shell.execute_reply":"2022-09-05T03:39:22.290703Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# num_epochs = 15\n\n# total_step = len(datamodule.train_dataloader()) \n# loss_list = []\n# acc_list = []\n# for epoch in range(num_epochs):\n    \n#     running_loss = 0.0\n#     correct = 0\n#     y_train = 0\n#     for i,batch in enumerate(datamodule.train_dataloader()): \n        \n#         images = batch['input'].to(device)\n#         labels = batch['target'].to(device)\n#         if i==0:\n#             print(\"labels = \", labels, \"len: \", labels.size(0))\n#         outputs = model(images)\n        \n#         loss = criterion(outputs,labels)\n#         loss_list.append(loss.item())\n\n        \n#         optimizer.zero_grad()\n        \n#         loss.backward()\n        \n#         optimizer.step()\n\n#         # codes below just for showing training process \n#         total = labels.size(0)\n        \n#         _,predicted = torch.max(outputs.data,1)  # predict 是指：max出现在第几维，应该只会出现在0和1维\n        \n#         correct += (predicted == labels).sum().item() \n        \n#         y_train += total  # 本轮的总数\n        \n#         running_loss += loss.item()\n#         if (i+1) % 8 == 0:\n#             print('Epoch[{}/{}],Step[{},{}],Loss Current Batch:{:.4f},Loss Avg:{:4f}, Accuracy:{:.2f} %'\n#             .format(epoch+1,\n#                     num_epochs,\n#                     i+1,\n#                     total_step,\n#                     loss.item(), \n#                     running_loss/400, \n#                     (correct/y_train * 100),\n# #                     accuracy_score(correct, y_train),\n# #                     f1_score(correct, y_train, average='micro')\n#                    ))\n#             print(\"predict: \", predicted)\n#             running_loss=0.0\n#             correct = 0\n#             y_train = 0\n        \n#     torch.save(model.state_dict(), \"resnet18_{}.pth\".format(epoch))\n            \n","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:22.293321Z","iopub.execute_input":"2022-09-05T03:39:22.294139Z","iopub.status.idle":"2022-09-05T03:39:22.302397Z","shell.execute_reply.started":"2022-09-05T03:39:22.294103Z","shell.execute_reply":"2022-09-05T03:39:22.301297Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"state_dict = torch.load(\"../input/mayoresnet-pth/resnet18_14.pth\")\nmodel.load_state_dict(state_dict)\nmodel.eval()\n\n# with torch.no_grad():\n#     correct = 0\n#     total = 0\n#     for batch in datamodule.val_dataloader():\n#         images = batch['input'].to(device)\n#         labels = batch['target'].to(device)\n#         outputs = model(images)\n#         _,predicted = torch.max(outputs.data,1)\n#         cur_acc = (predicted == labels).sum().item()/labels.size(0)\n#         print('current batch accuracy:{}%'.format(cur_acc*100))\n#         total += labels.size(0)\n#         correct += (predicted == labels).sum().item()\n#     print('Test Accuracy of the model on the valid images:{} %'.format((correct / total) * 100))","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:22.304029Z","iopub.execute_input":"2022-09-05T03:39:22.30488Z","iopub.status.idle":"2022-09-05T03:39:22.755456Z","shell.execute_reply.started":"2022-09-05T03:39:22.304778Z","shell.execute_reply":"2022-09-05T03:39:22.754484Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## 4. make submission","metadata":{}},{"cell_type":"code","source":"dm_test = ImageClassificationData.from_folders(\n    test_folder=\"/kaggle/working/test_images\",\n    \n    batch_size=3,\n    transform_kwargs=TRANSFORM_PARAMS,\n    \n) ","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:22.756851Z","iopub.execute_input":"2022-09-05T03:39:22.75751Z","iopub.status.idle":"2022-09-05T03:39:22.768296Z","shell.execute_reply.started":"2022-09-05T03:39:22.757473Z","shell.execute_reply":"2022-09-05T03:39:22.767291Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"m = nn.Softmax(dim=1)\nfor batch in dm_test.test_dataloader():\n    \n    images = batch['input'].to(device)\n    outputs = model(images)\n    predictions = m(outputs).cpu().detach().numpy()\n    ","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:22.769727Z","iopub.execute_input":"2022-09-05T03:39:22.770508Z","iopub.status.idle":"2022-09-05T03:39:29.216066Z","shell.execute_reply.started":"2022-09-05T03:39:22.770453Z","shell.execute_reply":"2022-09-05T03:39:29.214822Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_pred = pd.DataFrame(predictions)\ndf_pred","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:29.217486Z","iopub.execute_input":"2022-09-05T03:39:29.220061Z","iopub.status.idle":"2022-09-05T03:39:29.230789Z","shell.execute_reply.started":"2022-09-05T03:39:29.220015Z","shell.execute_reply":"2022-09-05T03:39:29.229723Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ls_imgs_png = glob.glob(os.path.join(\"test_images\", \"*.png\"))\n\nnames = [os.path.splitext(os.path.basename(p))[0] for p in ls_imgs_png]\ndf_pred[\"patient_id\"] = [n.split(\"_\")[0] for n in names]\n# df_pred.loc[len(df_pred)]=[0.72, 0.28, '006388']\ndf_pred","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:29.232144Z","iopub.execute_input":"2022-09-05T03:39:29.233109Z","iopub.status.idle":"2022-09-05T03:39:29.250752Z","shell.execute_reply.started":"2022-09-05T03:39:29.233072Z","shell.execute_reply":"2022-09-05T03:39:29.24964Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_pred.loc[len(df_pred)]=[0.72, 0.28, '006388']\ndf_pred.columns=['CE', 'LAA','patient_id']\ndf_pred","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:29.252171Z","iopub.execute_input":"2022-09-05T03:39:29.252623Z","iopub.status.idle":"2022-09-05T03:39:29.273144Z","shell.execute_reply.started":"2022-09-05T03:39:29.252586Z","shell.execute_reply":"2022-09-05T03:39:29.272122Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_pred.groupby(\"patient_id\").mean().to_csv('submission.csv')\n!head submission.csv","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:39:29.2745Z","iopub.execute_input":"2022-09-05T03:39:29.276566Z","iopub.status.idle":"2022-09-05T03:39:30.384009Z","shell.execute_reply.started":"2022-09-05T03:39:29.276538Z","shell.execute_reply":"2022-09-05T03:39:30.382757Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# df_pred\npd.read_csv(\"submission.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-09-05T03:41:02.72968Z","iopub.execute_input":"2022-09-05T03:41:02.730627Z","iopub.status.idle":"2022-09-05T03:41:02.746094Z","shell.execute_reply.started":"2022-09-05T03:41:02.73059Z","shell.execute_reply":"2022-09-05T03:41:02.745042Z"},"trusted":true},"execution_count":null,"outputs":[]}]}