{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":13836,"databundleVersionId":1718836,"sourceType":"competition"}],"dockerImageVersionId":30920,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import math, re, os\nimport tensorflow as tf\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n# from kaggle_datasets import KaggleDatasets\nfrom tensorflow import keras\nfrom functools import partial\nfrom sklearn.model_selection import train_test_split\nprint(\"Tensorflow version \" + tf.__version__)","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:42.092660Z","iopub.execute_input":"2025-04-10T13:59:42.092945Z","iopub.status.idle":"2025-04-10T13:59:54.696121Z","shell.execute_reply.started":"2025-04-10T13:59:42.092914Z","shell.execute_reply":"2025-04-10T13:59:54.695226Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"try:\n    tpu = tf.distribute.cluster_resolver.TPUClusterResolver()\n    print('Device:', tpu.master())\n    tf.config.experimental_connect_to_cluster(tpu)\n    tf.tpu.experimental.initialize_tpu_system(tpu)\n    strategy = tf.distribute.experimental.TPUStrategy(tpu)\nexcept:\n    strategy = tf.distribute.get_strategy()\nprint('Number of replicas:', strategy.num_replicas_in_sync)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.697245Z","iopub.execute_input":"2025-04-10T13:59:54.697774Z","iopub.status.idle":"2025-04-10T13:59:54.703515Z","shell.execute_reply.started":"2025-04-10T13:59:54.697740Z","shell.execute_reply":"2025-04-10T13:59:54.702689Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# set some parameters\nAUTOTUNE = tf.data.experimental.AUTOTUNE\nGCS_PATH = \"/kaggle/input/cassava-leaf-disease-classification\"\nBATCH_SIZE = 16 * strategy.num_replicas_in_sync\nIMAGE_SIZE = [256, 256]\nCLASSES = ['0', '1', '2', '3', '4']\nEPOCHS = 20","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.705819Z","iopub.execute_input":"2025-04-10T13:59:54.706214Z","iopub.status.idle":"2025-04-10T13:59:54.736695Z","shell.execute_reply.started":"2025-04-10T13:59:54.706191Z","shell.execute_reply":"2025-04-10T13:59:54.735838Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# image preprocessing functions\ndef decode_image(image):\n    image = tf.image.decode_jpeg(image, channels=3)\n    image = tf.image.resize(image, IMAGE_SIZE)\n    image = tf.cast(image, tf.float32) / 255.0\n    image = tf.reshape(image, [*IMAGE_SIZE, 3])\n    return image","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.738079Z","iopub.execute_input":"2025-04-10T13:59:54.738286Z","iopub.status.idle":"2025-04-10T13:59:54.753537Z","shell.execute_reply.started":"2025-04-10T13:59:54.738268Z","shell.execute_reply":"2025-04-10T13:59:54.752772Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# read tfrecords\ndef read_tfrecord(example, labeled):\n    tfrecord_format = {\n        \"image\": tf.io.FixedLenFeature([], tf.string),\n        \"target\": tf.io.FixedLenFeature([], tf.int64)\n    } if labeled else {\n        \"image\": tf.io.FixedLenFeature([], tf.string),\n        \"image_name\": tf.io.FixedLenFeature([], tf.string)\n    }\n    example = tf.io.parse_single_example(example, tfrecord_format)\n    image = decode_image(example['image'])\n    if labeled:\n        label = tf.cast(example['target'], tf.int32)\n        return image, label\n    idnum = example['image_name']\n    return image, idnum","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.754341Z","iopub.execute_input":"2025-04-10T13:59:54.754620Z","iopub.status.idle":"2025-04-10T13:59:54.769150Z","shell.execute_reply.started":"2025-04-10T13:59:54.754592Z","shell.execute_reply":"2025-04-10T13:59:54.768367Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# load dataset\ndef load_dataset(filenames, labeled=True, ordered=False):\n    ignore_order = tf.data.Options()\n    if not ordered:\n        ignore_order.experimental_deterministic = False # disable order, increase speed\n    dataset = tf.data.TFRecordDataset(filenames, num_parallel_reads=AUTOTUNE) # automatically interleaves reads from multiple files\n    dataset = dataset.with_options(ignore_order) # uses data as soon as it streams in, rather than in its original order\n    dataset = dataset.map(partial(read_tfrecord, labeled=labeled), num_parallel_calls=AUTOTUNE)\n    return dataset","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.770138Z","iopub.execute_input":"2025-04-10T13:59:54.770421Z","iopub.status.idle":"2025-04-10T13:59:54.783712Z","shell.execute_reply.started":"2025-04-10T13:59:54.770392Z","shell.execute_reply":"2025-04-10T13:59:54.782895Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"TRAINING_FILENAMES, VALID_FILENAMES = train_test_split(\n    tf.io.gfile.glob(GCS_PATH + '/train_tfrecords/ld_train*.tfrec'),\n    test_size=0.2, random_state=5\n)\n\nTEST_FILENAMES = tf.io.gfile.glob(GCS_PATH + '/test_tfrecords/ld_test*.tfrec')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.784525Z","iopub.execute_input":"2025-04-10T13:59:54.784779Z","iopub.status.idle":"2025-04-10T13:59:54.821775Z","shell.execute_reply.started":"2025-04-10T13:59:54.784743Z","shell.execute_reply":"2025-04-10T13:59:54.821181Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# data augmentation\ndef data_augment(image, label):\n    image = tf.image.random_flip_left_right(image)\n    return image, label","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.822538Z","iopub.execute_input":"2025-04-10T13:59:54.822724Z","iopub.status.idle":"2025-04-10T13:59:54.826166Z","shell.execute_reply.started":"2025-04-10T13:59:54.822708Z","shell.execute_reply":"2025-04-10T13:59:54.825468Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def get_training_dataset():\n    dataset = load_dataset(TRAINING_FILENAMES, labeled=True)  \n    dataset = dataset.map(data_augment, num_parallel_calls=AUTOTUNE)  \n    dataset = dataset.repeat()\t\t\t\t\t\t\t\t\t\t\t# the training dataset must repeat for several epochs\n    dataset = dataset.shuffle(2048)\t\t\t\t\t\t\t\t\t\t# shuffle the dataset\t\t\t\t\t\t\t\t\n    dataset = dataset.batch(BATCH_SIZE)\n    dataset = dataset.prefetch(AUTOTUNE)\n    return dataset","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.828538Z","iopub.execute_input":"2025-04-10T13:59:54.828729Z","iopub.status.idle":"2025-04-10T13:59:54.839834Z","shell.execute_reply.started":"2025-04-10T13:59:54.828713Z","shell.execute_reply":"2025-04-10T13:59:54.839029Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def get_validation_dataset(ordered=False):\n    dataset = load_dataset(VALID_FILENAMES, labeled=True, ordered=ordered) \n    dataset = dataset.batch(BATCH_SIZE)\n    dataset = dataset.cache()\n    dataset = dataset.prefetch(AUTOTUNE)\n    return dataset","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.841603Z","iopub.execute_input":"2025-04-10T13:59:54.841837Z","iopub.status.idle":"2025-04-10T13:59:54.855437Z","shell.execute_reply.started":"2025-04-10T13:59:54.841813Z","shell.execute_reply":"2025-04-10T13:59:54.854673Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def get_test_dataset(ordered=False):\n    dataset = load_dataset(TEST_FILENAMES, labeled=False, ordered=ordered)\n    dataset = dataset.batch(BATCH_SIZE)\n    dataset = dataset.prefetch(AUTOTUNE)\n    return dataset","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.856209Z","iopub.execute_input":"2025-04-10T13:59:54.856393Z","iopub.status.idle":"2025-04-10T13:59:54.869845Z","shell.execute_reply.started":"2025-04-10T13:59:54.856377Z","shell.execute_reply":"2025-04-10T13:59:54.869138Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def count_data_items(filenames):\n    n = [int(re.compile(r\"-([0-9]*)\\.\").search(filename).group(1)) for filename in filenames]\n    return np.sum(n)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.870724Z","iopub.execute_input":"2025-04-10T13:59:54.871035Z","iopub.status.idle":"2025-04-10T13:59:54.886696Z","shell.execute_reply.started":"2025-04-10T13:59:54.870999Z","shell.execute_reply":"2025-04-10T13:59:54.885822Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"NUM_TRAINING_IMAGES = count_data_items(TRAINING_FILENAMES)\nNUM_VALIDATION_IMAGES = count_data_items(VALID_FILENAMES)\nNUM_TEST_IMAGES = count_data_items(TEST_FILENAMES)\n\nprint('Dataset: {} training images, {} validation images, {} (unlabeled) test images'.format(\n    NUM_TRAINING_IMAGES, NUM_VALIDATION_IMAGES, NUM_TEST_IMAGES))","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.887410Z","iopub.execute_input":"2025-04-10T13:59:54.887603Z","iopub.status.idle":"2025-04-10T13:59:54.904536Z","shell.execute_reply.started":"2025-04-10T13:59:54.887587Z","shell.execute_reply":"2025-04-10T13:59:54.903847Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(\"Training data shapes:\")\nfor image, label in get_training_dataset().take(3):\n    print(image.numpy().shape, label.numpy().shape)\nprint(\"Training data label examples:\", label.numpy())\nprint(\"Validation data shapes:\")\nfor image, label in get_validation_dataset().take(3):\n    print(image.numpy().shape, label.numpy().shape)\nprint(\"Validation data label examples:\", label.numpy())\nprint(\"Test data shapes:\")\nfor image, idnum in get_test_dataset().take(3):\n    print(image.numpy().shape, idnum.numpy().shape)\nprint(\"Test data IDs:\", idnum.numpy().astype('U')) # U=unicode string","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T13:59:54.905225Z","iopub.execute_input":"2025-04-10T13:59:54.905414Z","iopub.status.idle":"2025-04-10T14:00:01.363802Z","shell.execute_reply.started":"2025-04-10T13:59:54.905397Z","shell.execute_reply":"2025-04-10T14:00:01.362854Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# numpy and matplotlib defaults\nnp.set_printoptions(threshold=15, linewidth=80)\n\ndef batch_to_numpy_images_and_labels(data):\n    images, labels = data\n    numpy_images = images.numpy()\n    numpy_labels = labels.numpy()\n    if numpy_labels.dtype == object: # binary string in this case, these are image ID strings\n        numpy_labels = [None for _ in enumerate(numpy_images)]\n    # If no labels, only image IDs, return None for labels (this is the case for test data)\n    return numpy_images, numpy_labels\n\ndef title_from_label_and_target(label, correct_label):\n    if correct_label is None:\n        return CLASSES[label], True\n    correct = (label == correct_label)\n    return \"{} [{}{}{}]\".format(CLASSES[label], 'OK' if correct else 'NO', u\"\\u2192\" if not correct else '',\n                                CLASSES[correct_label] if not correct else ''), correct\n\ndef display_one_plant(image, title, subplot, red=False, titlesize=16):\n    plt.subplot(*subplot)\n    plt.axis('off')\n    plt.imshow(image)\n    if len(title) > 0:\n        plt.title(title, fontsize=int(titlesize) if not red else int(titlesize/1.2), color='red' if red else 'black', fontdict={'verticalalignment':'center'}, pad=int(titlesize/1.5))\n    return (subplot[0], subplot[1], subplot[2]+1)\n\ndef display_batch_of_images(databatch, predictions=None):\n    \"\"\"This will work with:\n    display_batch_of_images(images)\n    display_batch_of_images(images, predictions)\n    display_batch_of_images((images, labels))\n    display_batch_of_images((images, labels), predictions)\n    \"\"\"\n    # data\n    images, labels = batch_to_numpy_images_and_labels(databatch)\n    if labels is None:\n        labels = [None for _ in enumerate(images)]\n        \n    # auto-squaring: this will drop data that does not fit into square or square-ish rectangle\n    rows = int(math.sqrt(len(images)))\n    cols = len(images)//rows\n        \n    # size and spacing\n    FIGSIZE = 13.0\n    SPACING = 0.1\n    subplot=(rows,cols,1)\n    if rows < cols:\n        plt.figure(figsize=(FIGSIZE,FIGSIZE/cols*rows))\n    else:\n        plt.figure(figsize=(FIGSIZE/rows*cols,FIGSIZE))\n    \n    # display\n    for i, (image, label) in enumerate(zip(images[:rows*cols], labels[:rows*cols])):\n        title = '' if label is None else CLASSES[label]\n        correct = True\n        if predictions is not None:\n            title, correct = title_from_label_and_target(predictions[i], label)\n        dynamic_titlesize = FIGSIZE*SPACING/max(rows,cols)*40+3 # magic formula tested to work from 1x1 to 10x10 images\n        subplot = display_one_plant(image, title, subplot, not correct, titlesize=dynamic_titlesize)\n    \n    #layout\n    plt.tight_layout()\n    if label is None and predictions is None:\n        plt.subplots_adjust(wspace=0, hspace=0)\n    else:\n        plt.subplots_adjust(wspace=SPACING, hspace=SPACING)\n    plt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:00:01.364626Z","iopub.execute_input":"2025-04-10T14:00:01.364988Z","iopub.status.idle":"2025-04-10T14:00:01.378573Z","shell.execute_reply.started":"2025-04-10T14:00:01.364937Z","shell.execute_reply":"2025-04-10T14:00:01.377717Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# load our test dataset for EDA\ntesting_dataset = get_test_dataset()\ntesting_dataset = testing_dataset.unbatch().batch(20)\ntest_batch = iter(testing_dataset)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:00:01.379498Z","iopub.execute_input":"2025-04-10T14:00:01.379800Z","iopub.status.idle":"2025-04-10T14:00:01.467316Z","shell.execute_reply.started":"2025-04-10T14:00:01.379771Z","shell.execute_reply":"2025-04-10T14:00:01.466515Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# we only have one test image\ndisplay_batch_of_images(next(test_batch))","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:00:01.468152Z","iopub.execute_input":"2025-04-10T14:00:01.468446Z","iopub.status.idle":"2025-04-10T14:00:01.845759Z","shell.execute_reply.started":"2025-04-10T14:00:01.468419Z","shell.execute_reply":"2025-04-10T14:00:01.844653Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"lr_scheduler = keras.optimizers.schedules.ExponentialDecay(\n    initial_learning_rate=1e-5, \n    decay_steps=10000, \n    decay_rate=0.9)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:00:01.846757Z","iopub.execute_input":"2025-04-10T14:00:01.847038Z","iopub.status.idle":"2025-04-10T14:00:01.911240Z","shell.execute_reply.started":"2025-04-10T14:00:01.847013Z","shell.execute_reply":"2025-04-10T14:00:01.910352Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"with strategy.scope():       \n    img_adjust_layer = tf.keras.layers.Lambda(tf.keras.applications.resnet50.preprocess_input, input_shape=[*IMAGE_SIZE, 3])\n    \n    base_model = tf.keras.applications.ResNet50(weights='imagenet', include_top=False)\n    base_model.trainable = False\n    \n    model = tf.keras.Sequential([\n        tf.keras.layers.BatchNormalization(),\n        img_adjust_layer,\n        base_model,\n        tf.keras.layers.GlobalAveragePooling2D(),\n        tf.keras.layers.Dense(8, activation='relu'),\n        #tf.keras.layers.BatchNormalization(renorm=True),\n        tf.keras.layers.Dense(len(CLASSES), activation='softmax')  \n    ])\n    \n    model.compile(\n        optimizer=tf.keras.optimizers.Adam(learning_rate=lr_scheduler, epsilon=0.001),\n        loss='sparse_categorical_crossentropy',  \n        metrics=['sparse_categorical_accuracy'])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:00:01.912105Z","iopub.execute_input":"2025-04-10T14:00:01.912411Z","iopub.status.idle":"2025-04-10T14:00:04.997313Z","shell.execute_reply.started":"2025-04-10T14:00:01.912377Z","shell.execute_reply":"2025-04-10T14:00:04.996567Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# load data\ntrain_dataset = get_training_dataset()\nvalid_dataset = get_validation_dataset()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:00:04.998145Z","iopub.execute_input":"2025-04-10T14:00:04.998419Z","iopub.status.idle":"2025-04-10T14:00:05.083946Z","shell.execute_reply.started":"2025-04-10T14:00:04.998397Z","shell.execute_reply":"2025-04-10T14:00:05.083294Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"STEPS_PER_EPOCH = NUM_TRAINING_IMAGES // BATCH_SIZE\nVALID_STEPS = NUM_VALIDATION_IMAGES // BATCH_SIZE\n\nhistory = model.fit(train_dataset, \n                    steps_per_epoch=STEPS_PER_EPOCH, \n                    epochs=EPOCHS,\n                    validation_data=valid_dataset,\n                    validation_steps=VALID_STEPS)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:00:05.084628Z","iopub.execute_input":"2025-04-10T14:00:05.084844Z","iopub.status.idle":"2025-04-10T14:24:43.018237Z","shell.execute_reply.started":"2025-04-10T14:00:05.084825Z","shell.execute_reply":"2025-04-10T14:24:43.017471Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print out variables available to us\nprint(history.history.keys())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:24:43.019052Z","iopub.execute_input":"2025-04-10T14:24:43.019356Z","iopub.status.idle":"2025-04-10T14:24:43.023944Z","shell.execute_reply.started":"2025-04-10T14:24:43.019329Z","shell.execute_reply":"2025-04-10T14:24:43.023096Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# create learning curves to evaluate model performance\nhistory_frame = pd.DataFrame(history.history)\nhistory_frame.loc[:, ['loss', 'val_loss']].plot()\nhistory_frame.loc[:, ['sparse_categorical_accuracy', 'val_sparse_categorical_accuracy']].plot();","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:24:43.024811Z","iopub.execute_input":"2025-04-10T14:24:43.025119Z","iopub.status.idle":"2025-04-10T14:24:43.500891Z","shell.execute_reply.started":"2025-04-10T14:24:43.025089Z","shell.execute_reply":"2025-04-10T14:24:43.500027Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# this code will convert our test image data to a float32 \ndef to_float32(image, label):\n    return tf.cast(image, tf.float32), label","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:24:43.501665Z","iopub.execute_input":"2025-04-10T14:24:43.501880Z","iopub.status.idle":"2025-04-10T14:24:43.505683Z","shell.execute_reply.started":"2025-04-10T14:24:43.501861Z","shell.execute_reply":"2025-04-10T14:24:43.504875Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test_ds = get_test_dataset(ordered=True) \ntest_ds = test_ds.map(to_float32)\n\nprint('Computing predictions...')\ntest_images_ds = testing_dataset\ntest_images_ds = test_ds.map(lambda image, idnum: image)\nprobabilities = model.predict(test_images_ds)\npredictions = np.argmax(probabilities, axis=-1)\nprint(predictions)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:24:43.506499Z","iopub.execute_input":"2025-04-10T14:24:43.506793Z","iopub.status.idle":"2025-04-10T14:24:47.393981Z","shell.execute_reply.started":"2025-04-10T14:24:43.506761Z","shell.execute_reply":"2025-04-10T14:24:47.393071Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"model.summary()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:34:34.803154Z","iopub.execute_input":"2025-04-10T14:34:34.803452Z","iopub.status.idle":"2025-04-10T14:34:34.828580Z","shell.execute_reply.started":"2025-04-10T14:34:34.803427Z","shell.execute_reply":"2025-04-10T14:34:34.827873Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"model_dir = \"/kaggle/working/model\"\n\nif not os.path.exists(model_dir):\n    os.makedirs(model_dir)\n\nmodel.save(os.path.join(model_dir, \"baseline_model.h5\"))\nmodel.save(os.path.join(model_dir, \"baseline_model.keras\"))","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-10T14:36:16.787157Z","iopub.execute_input":"2025-04-10T14:36:16.787499Z","iopub.status.idle":"2025-04-10T14:36:17.877580Z","shell.execute_reply.started":"2025-04-10T14:36:16.787473Z","shell.execute_reply":"2025-04-10T14:36:17.876613Z"}},"outputs":[],"execution_count":null}]}