{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":70203,"databundleVersionId":8068726,"sourceType":"competition"},{"sourceId":53923,"sourceType":"modelInstanceVersion","isSourceIdPinned":true,"modelInstanceId":45216}],"dockerImageVersionId":30699,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session\n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-05-23T05:12:25.529462Z","iopub.execute_input":"2024-05-23T05:12:25.529815Z","iopub.status.idle":"2024-05-23T05:12:36.167066Z","shell.execute_reply.started":"2024-05-23T05:12:25.529784Z","shell.execute_reply":"2024-05-23T05:12:36.166165Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# imports\nimport os\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport torch\nimport torchaudio\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader, Subset, random_split\nfrom torch.utils.data import Dataset\nimport torch.nn as nn\nimport torchvision.models as models\nfrom torchaudio.transforms import MelSpectrogram, Resample\nfrom IPython.display import Audio\nfrom tqdm import tqdm","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:29:23.558614Z","iopub.execute_input":"2024-05-23T05:29:23.559312Z","iopub.status.idle":"2024-05-23T05:29:23.565127Z","shell.execute_reply.started":"2024-05-23T05:29:23.559279Z","shell.execute_reply":"2024-05-23T05:29:23.564244Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"audio_filepath = '/kaggle/input/birdclef-2024/train_audio/'\nBASE_path = '/kaggle/input/birdclef-2024'","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:15:03.392865Z","iopub.execute_input":"2024-05-23T05:15:03.393466Z","iopub.status.idle":"2024-05-23T05:15:03.397716Z","shell.execute_reply.started":"2024-05-23T05:15:03.393439Z","shell.execute_reply":"2024-05-23T05:15:03.396764Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv('/kaggle/input/birdclef-2024/train_metadata.csv')\ndf.head(10)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:15:03.399285Z","iopub.execute_input":"2024-05-23T05:15:03.400017Z","iopub.status.idle":"2024-05-23T05:15:03.601165Z","shell.execute_reply.started":"2024-05-23T05:15:03.399985Z","shell.execute_reply":"2024-05-23T05:15:03.600285Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.shape","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:10.343696Z","iopub.execute_input":"2024-05-23T05:17:10.344929Z","iopub.status.idle":"2024-05-23T05:17:10.352162Z","shell.execute_reply.started":"2024-05-23T05:17:10.344880Z","shell.execute_reply":"2024-05-23T05:17:10.350863Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def load_audio(file_path):\n    waveform, sample_rate = torchaudio.load(file_path)\n    if waveform.shape[0] > 1:\n        waveform = torch.mean(waveform, dim=0, keepdim=True)\n    return waveform.squeeze(0), sample_rate","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:11.702483Z","iopub.execute_input":"2024-05-23T05:17:11.703166Z","iopub.status.idle":"2024-05-23T05:17:11.708120Z","shell.execute_reply.started":"2024-05-23T05:17:11.703134Z","shell.execute_reply":"2024-05-23T05:17:11.707144Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"audio_path = os.path.join(audio_filepath, df['filename'][0])\naudio, rate = load_audio(audio_path)\n\nprint(audio)\nAudio(audio.numpy(), rate=rate)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:12.718018Z","iopub.execute_input":"2024-05-23T05:17:12.718908Z","iopub.status.idle":"2024-05-23T05:17:12.926863Z","shell.execute_reply.started":"2024-05-23T05:17:12.718875Z","shell.execute_reply":"2024-05-23T05:17:12.925860Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def crop_or_pad_audio(audio, target_length, sample_rate):\n    # Calculate the target length in samples\n    target_samples = int(target_length * sample_rate)\n\n    # Get the current length of the audio\n    current_samples = audio.shape[0]\n\n    # If the current length is greater than the target length, crop the audio\n    if current_samples > target_samples:\n        audio = audio[:target_samples]\n    # If the current length is less than the target length, pad the audio\n    elif current_samples < target_samples:\n        # Calculate the number of samples to pad\n        num_padding = target_samples - current_samples\n        # Pad the audio with zeros at the end\n        audio = torch.nn.functional.pad(audio, (0, num_padding))\n    \n    return audio","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:13.080618Z","iopub.execute_input":"2024-05-23T05:17:13.080956Z","iopub.status.idle":"2024-05-23T05:17:13.086423Z","shell.execute_reply.started":"2024-05-23T05:17:13.080927Z","shell.execute_reply":"2024-05-23T05:17:13.085631Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"audio = crop_or_pad_audio(audio, target_length=10, sample_rate=32000)\nprint(audio)\nAudio(audio.numpy(), rate=32000)\n","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:13.487059Z","iopub.execute_input":"2024-05-23T05:17:13.487382Z","iopub.status.idle":"2024-05-23T05:17:13.507942Z","shell.execute_reply.started":"2024-05-23T05:17:13.487355Z","shell.execute_reply":"2024-05-23T05:17:13.507048Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def get_melspectrogram(audio):\n    nfft = 2048\n    window = 2048\n    hop_length = 1024\n    sample_rate = 32000\n    n_mels = 256\n    f_min = 0\n    f_max = 16000\n\n    # Ensure the audio tensor is in float32 format\n    audio = audio.float()\n\n    # Create a spectrogram\n    spectrogram_transform = torchaudio.transforms.Spectrogram(\n        n_fft=nfft,\n        win_length=window,\n        hop_length=hop_length,\n        power=2\n    )\n    spect = spectrogram_transform(audio)\n\n    # Convert the spectrogram to mel scale\n    mel_spectrogram_transform = torchaudio.transforms.MelScale(\n        n_mels=n_mels,\n        sample_rate=sample_rate,\n        f_min=f_min,\n        f_max=f_max,\n        n_stft=spect.size(0)  # the number of frequency bins in the spectrogram\n    )\n    mel_spectrogram = mel_spectrogram_transform(spect)\n    \n    mel_spectrogram = mel_spectrogram.transpose(0, 1)\n\n    return mel_spectrogram","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:14.489411Z","iopub.execute_input":"2024-05-23T05:17:14.490314Z","iopub.status.idle":"2024-05-23T05:17:14.496731Z","shell.execute_reply.started":"2024-05-23T05:17:14.490278Z","shell.execute_reply":"2024-05-23T05:17:14.495866Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def plot_melspectrogram(mel_spectrogram):\n    # Convert PyTorch tensor to NumPy array and transpose for plotting\n    mel_spectrogram_np = mel_spectrogram.numpy().T\n\n    plt.figure()\n    # Use imshow to plot the mel spectrogram\n    plt.imshow(mel_spectrogram_np, cmap='viridis')\n\n    plt.colorbar(format='%+2.0f dB')\n    plt.title('Mel-Spectrogram')\n    plt.xlabel('Time')\n    plt.ylabel('Frequency')\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:15.164929Z","iopub.execute_input":"2024-05-23T05:17:15.165622Z","iopub.status.idle":"2024-05-23T05:17:15.170803Z","shell.execute_reply.started":"2024-05-23T05:17:15.165592Z","shell.execute_reply":"2024-05-23T05:17:15.169985Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"mel_spectrogram = get_melspectrogram(audio)\nprint('Audio shape:', audio.shape)\nprint('Melspectrogram shape:', mel_spectrogram.shape)\nplot_melspectrogram(mel_spectrogram)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:15.607771Z","iopub.execute_input":"2024-05-23T05:17:15.608113Z","iopub.status.idle":"2024-05-23T05:17:16.074448Z","shell.execute_reply.started":"2024-05-23T05:17:15.608088Z","shell.execute_reply":"2024-05-23T05:17:16.073511Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def get_dbscale_melspectrogram(mel_spectrogram, top_db=80):\n    # Convert power/amplitude to decibels\n    transform = torchaudio.transforms.AmplitudeToDB(stype=\"power\", top_db=80)\n    \n    dbscale_mel_spectrogram = transform(mel_spectrogram)\n    \n    return dbscale_mel_spectrogram","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:16.076006Z","iopub.execute_input":"2024-05-23T05:17:16.076284Z","iopub.status.idle":"2024-05-23T05:17:16.081222Z","shell.execute_reply.started":"2024-05-23T05:17:16.076259Z","shell.execute_reply":"2024-05-23T05:17:16.080354Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def plot_dbscale_melspectrogram(dbscale_mel_spectrogram):\n    # Convert PyTorch tensor to NumPy array and transpose for plotting\n    dbscale_mel_spectrogram_np = dbscale_mel_spectrogram.numpy().T\n\n    plt.figure()\n    # Use imshow to plot the mel spectrogram\n    plt.imshow(dbscale_mel_spectrogram_np, cmap='viridis')\n\n    plt.colorbar(format='%+2.0f dB')\n    plt.title('DB-Scaled Mel-Spectrogram')\n    plt.xlabel('Time')\n    plt.ylabel('Frequency')\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:16.525238Z","iopub.execute_input":"2024-05-23T05:17:16.526043Z","iopub.status.idle":"2024-05-23T05:17:16.531376Z","shell.execute_reply.started":"2024-05-23T05:17:16.526009Z","shell.execute_reply":"2024-05-23T05:17:16.530512Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dbscale_mel_spectrogram = get_dbscale_melspectrogram(mel_spectrogram)\nprint('Audio shape:', audio.shape)\nprint('DB Scale Mel Spectrogram shape:', dbscale_mel_spectrogram.shape)\nplot_dbscale_melspectrogram(dbscale_mel_spectrogram)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:16.936665Z","iopub.execute_input":"2024-05-23T05:17:16.937174Z","iopub.status.idle":"2024-05-23T05:17:17.354793Z","shell.execute_reply.started":"2024-05-23T05:17:16.937138Z","shell.execute_reply":"2024-05-23T05:17:17.353851Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ndef frequency_mask(spect, param=10):\n    # Initialize the FrequencyMasking transform\n    frequency_masking = torchaudio.transforms.FrequencyMasking(freq_mask_param=param)\n    \n    # Apply the frequency mask\n    masked_spect = frequency_masking(spect)\n    \n    return masked_spect","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:17.356194Z","iopub.execute_input":"2024-05-23T05:17:17.356485Z","iopub.status.idle":"2024-05-23T05:17:17.361505Z","shell.execute_reply.started":"2024-05-23T05:17:17.356460Z","shell.execute_reply":"2024-05-23T05:17:17.360597Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"freq_masked_spectrogram = frequency_mask(dbscale_mel_spectrogram)\nprint('Audio shape:', audio.shape)\nprint('DB Scaled Mel Spectrogram shape:', freq_masked_spectrogram.shape)\nplot_dbscale_melspectrogram(freq_masked_spectrogram)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:17.729137Z","iopub.execute_input":"2024-05-23T05:17:17.729469Z","iopub.status.idle":"2024-05-23T05:17:18.146623Z","shell.execute_reply.started":"2024-05-23T05:17:17.729443Z","shell.execute_reply":"2024-05-23T05:17:18.145743Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def time_mask(spect, param=10):\n    # Initialize the TimeMasking transform\n    time_masking = torchaudio.transforms.TimeMasking(time_mask_param=param)\n    \n    # Apply the time mask\n    masked_spect = time_masking(spect)\n    \n    return masked_spect","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:18.158018Z","iopub.execute_input":"2024-05-23T05:17:18.158606Z","iopub.status.idle":"2024-05-23T05:17:18.163139Z","shell.execute_reply.started":"2024-05-23T05:17:18.158576Z","shell.execute_reply":"2024-05-23T05:17:18.162221Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"time_masked_spectrogram = time_mask(freq_masked_spectrogram)\nprint('Audio shape:', audio.shape)\nprint('DB Scaled Mel Spectrogram shape:', time_masked_spectrogram.shape)\nplot_dbscale_melspectrogram(time_masked_spectrogram)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:18.606343Z","iopub.execute_input":"2024-05-23T05:17:18.606672Z","iopub.status.idle":"2024-05-23T05:17:19.161334Z","shell.execute_reply.started":"2024-05-23T05:17:18.606645Z","shell.execute_reply":"2024-05-23T05:17:19.160455Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def preprocess_spectrogram(spectrogram):\n    # Ensure the input is a PyTorch tensor\n    if not isinstance(spectrogram, torch.Tensor):\n        spectrogram = torch.tensor(spectrogram)\n\n    # Expand dimensions to create a single-channel image\n    spectrogram_image = spectrogram.unsqueeze(0)  # Adds a channel dimension\n\n    # Replicate the single channel to create a three-channel (RGB) image\n    spectrogram_image = spectrogram_image.repeat(3, 1, 1)  # Repeat across the channel dimension\n\n    # Define the resize transformation\n    resize = transforms.Resize((224, 224), antialias = None)  # Expected size for pretrained ResNet and ViT architectures\n\n    # Apply resize transformation\n    spectrogram_image = resize(spectrogram_image)\n\n    return spectrogram_image\n\nspect_image = preprocess_spectrogram(dbscale_mel_spectrogram)\nprint('Spectrogram shape:', spect_image.shape)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:17:19.854892Z","iopub.execute_input":"2024-05-23T05:17:19.855250Z","iopub.status.idle":"2024-05-23T05:17:19.875154Z","shell.execute_reply.started":"2024-05-23T05:17:19.855222Z","shell.execute_reply":"2024-05-23T05:17:19.874240Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_path = '/kaggle/input/birdclef-2024/unlabeled_soundscapes'\npaths = []\nfor root, _, files in os.walk(test_path):\n    for file in files:\n        if file.endswith('.ogg'):  # Ensure only .ogg files are included\n            paths.append(os.path.join(root, file))\n\n# Create a DataFrame from the list of file paths\ntest_df = pd.DataFrame(paths, columns=['filepath'])\ntest_df.head(10)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:19:08.490635Z","iopub.execute_input":"2024-05-23T05:19:08.491470Z","iopub.status.idle":"2024-05-23T05:19:10.282618Z","shell.execute_reply.started":"2024-05-23T05:19:08.491436Z","shell.execute_reply":"2024-05-23T05:19:10.281679Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_filepath = test_df['filepath'].tolist()\n\ndef load_and_process_test_data(file_path):\n    audio, sample_rate = load_audio(file_path)\n    audio = crop_or_pad_audio(audio,10,sample_rate)\n    mel_spect = get_melspectrogram(audio)\n    freq_masked_spect = frequency_mask(mel_spect)\n    time_masked_spect = time_mask(freq_masked_spect)\n    spect_image = preprocess_spectrogram(time_masked_spect)\n    return spect_image, file_path\n\nclass Audio_preprocessing_test_dataset(Dataset):\n    def __init__(self, file_paths):\n        self.file_paths = file_paths\n\n    def __len__(self):\n        return len(self.file_paths)\n\n    def __getitem__(self, index):\n        # Here, load_and_process_data should handle loading the file and all preprocessing steps\n        data, path = load_and_process_test_data(self.file_paths[index])\n        return data, path\n\ntest_dataset = Audio_preprocessing_test_dataset(test_filepath)\ntest_loader = torch.utils.data.DataLoader(test_dataset, batch_size=1, shuffle=False)\n","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:19:14.303487Z","iopub.execute_input":"2024-05-23T05:19:14.303859Z","iopub.status.idle":"2024-05-23T05:19:14.312792Z","shell.execute_reply.started":"2024-05-23T05:19:14.303831Z","shell.execute_reply":"2024-05-23T05:19:14.311583Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(test_loader)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:19:14.956690Z","iopub.execute_input":"2024-05-23T05:19:14.957080Z","iopub.status.idle":"2024-05-23T05:19:14.963034Z","shell.execute_reply.started":"2024-05-23T05:19:14.957053Z","shell.execute_reply":"2024-05-23T05:19:14.962161Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for data in test_loader:\n    print(data)\n    print(len(data))\n    img = data[0]\n    img_np = img.cpu().numpy()\n    print(img_np.shape)\n    img_np = np.transpose(img_np[0], (1, 2, 0))\n    plt.imshow(img_np, cmap='viridis')\n    plt.axis('off')\n    plt.show()\n    break","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:27:42.282756Z","iopub.execute_input":"2024-05-23T05:27:42.283158Z","iopub.status.idle":"2024-05-23T05:27:42.614641Z","shell.execute_reply.started":"2024-05-23T05:27:42.283125Z","shell.execute_reply":"2024-05-23T05:27:42.613466Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Define the test function\ndef test_model(model, test_loader, device):\n    model.eval()\n    predictions = []\n    idx = []\n\n    with torch.no_grad():\n        for inputs, paths in tqdm(test_loader):\n            path = paths[0].split('/')[-1].replace('.ogg','')\n            inputs = inputs.to(device)\n            outputs = model(inputs)\n            preds = torch.softmax(outputs, dim=1)\n            predictions.append(preds.cpu().numpy())\n            \n            idx.append(path)\n    predictions = np.concatenate(predictions, axis=0)\n    return idx, predictions\n\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\nmodel = models.resnet18(weights=None)\nmodel.fc = nn.Linear(model.fc.in_features, 182)\ncheckpoint = torch.load('/kaggle/input/birdclef_resnet18/pytorch/checkpoint_25/1/resnet18_checkpoint_25.pt', map_location=device)\n\n# Load the model checkpoint\nmodel.load_state_dict(checkpoint, strict=False)\n\n# Move the model to the appropriate device\nmodel = model.to(device)\n\nindex, predictions = test_model(model, test_loader, device)\ndf_predictions = pd.DataFrame(predictions, columns=[f'class_{i}' for i in range(182)])\ndf_predictions.insert(0, 'row_id', index)\ndf_predictions.head(10)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T05:29:28.620389Z","iopub.execute_input":"2024-05-23T05:29:28.621095Z","iopub.status.idle":"2024-05-23T05:59:57.710373Z","shell.execute_reply.started":"2024-05-23T05:29:28.621064Z","shell.execute_reply":"2024-05-23T05:59:57.709484Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"class_names = df['primary_label'].unique()\nclass_names","metadata":{"execution":{"iopub.status.busy":"2024-05-23T06:15:45.678398Z","iopub.execute_input":"2024-05-23T06:15:45.678769Z","iopub.status.idle":"2024-05-23T06:15:45.690733Z","shell.execute_reply.started":"2024-05-23T06:15:45.678739Z","shell.execute_reply":"2024-05-23T06:15:45.689931Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.DataFrame(predictions, columns=class_names)\ndf.insert(0, 'row_id', index)\ndf.head(10)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T06:15:53.005269Z","iopub.execute_input":"2024-05-23T06:15:53.006222Z","iopub.status.idle":"2024-05-23T06:15:53.041861Z","shell.execute_reply.started":"2024-05-23T06:15:53.006180Z","shell.execute_reply":"2024-05-23T06:15:53.040944Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.to_csv('submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2024-05-23T06:16:03.741885Z","iopub.execute_input":"2024-05-23T06:16:03.742786Z","iopub.status.idle":"2024-05-23T06:16:05.918740Z","shell.execute_reply.started":"2024-05-23T06:16:03.742754Z","shell.execute_reply":"2024-05-23T06:16:05.917753Z"},"trusted":true},"execution_count":null,"outputs":[]}]}