This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 63193feed46 Fix empty outputs. (#34927)
63193feed46 is described below

commit 63193feed4688ebeab5c6653e852d1f1140735ef
Author: claudevdm <[email protected]>
AuthorDate: Tue May 13 12:53:18 2025 -0400

    Fix empty outputs. (#34927)
    
    Co-authored-by: Claude <[email protected]>
---
 .../anomaly_detection_iforest.ipynb                | 44 +++++++++++-----------
 .../anomaly_detection_zscore.ipynb                 | 42 ++++++++++-----------
 2 files changed, 43 insertions(+), 43 deletions(-)

diff --git 
a/examples/notebooks/beam-ml/anomaly_detection/anomaly_detection_iforest.ipynb 
b/examples/notebooks/beam-ml/anomaly_detection/anomaly_detection_iforest.ipynb
index 2ce311dedf8..dd4fe79eb31 100644
--- 
a/examples/notebooks/beam-ml/anomaly_detection/anomaly_detection_iforest.ipynb
+++ 
b/examples/notebooks/beam-ml/anomaly_detection/anomaly_detection_iforest.ipynb
@@ -43,7 +43,7 @@
         "id": "IA9uYREbI3m3"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -101,7 +101,7 @@
       "metadata": {
         "id": "L_18eUf7QU2I"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# GCP project id\n",
         "PROJECT_ID = 'apache-beam-testing'  # @param {type:'string'}\n",
@@ -129,7 +129,7 @@
         "id": "A_49Y2aTQeiH"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -150,7 +150,7 @@
         "id": "5hpDAMOyQfHP"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -163,7 +163,7 @@
         "id": "jAKBvrgq-J3f"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -175,7 +175,7 @@
         "id": "KlkX-iwVm42J"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -206,7 +206,7 @@
         "id": "vb6ubiSyipuG"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -236,7 +236,7 @@
         "id": "P9MzeokSiPxK"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -251,7 +251,7 @@
         "id": "01JdmTuXuqY_"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -366,7 +366,7 @@
         "id": "4WgxpmAPQrbv"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -388,7 +388,7 @@
         "id": "fnidxXybxuFD"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -415,7 +415,7 @@
         "id": "iwkrY8oXSAlQ"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -438,7 +438,7 @@
         "id": "jP_M9pY2mp1C"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -476,7 +476,7 @@
         "id": "ghFoWPAeS6SH"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -498,7 +498,7 @@
         "id": "Gh-bU6vsD9vD"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -510,7 +510,7 @@
         "id": "0C0qur71DiN3"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -540,7 +540,7 @@
         "id": "-uspd0osDocV"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -572,7 +572,7 @@
         "id": "KkyuDIVoePnv"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -591,7 +591,7 @@
         "id": "x_lEnelMj1fD"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -604,7 +604,7 @@
         "id": "N5w0K5B1jnIm"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -644,7 +644,7 @@
         "id": "gWRplG09kXmh"
       },
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     }
   ]
-}
\ No newline at end of file
+}
diff --git 
a/examples/notebooks/beam-ml/anomaly_detection/anomaly_detection_zscore.ipynb 
b/examples/notebooks/beam-ml/anomaly_detection/anomaly_detection_zscore.ipynb
index fe726b85917..1cf91b544b2 100644
--- 
a/examples/notebooks/beam-ml/anomaly_detection/anomaly_detection_zscore.ipynb
+++ 
b/examples/notebooks/beam-ml/anomaly_detection/anomaly_detection_zscore.ipynb
@@ -8,7 +8,7 @@
         "cellView": "form",
         "id": "2d79fe3a-952b-478f-ba78-44cafddc91d1"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# @title ###### Licensed to the Apache Software Foundation (ASF), 
Version 2.0 (the \"License\")\n",
         "\n",
@@ -91,7 +91,7 @@
       },
       "id": "SafqA6dALKvo",
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -110,7 +110,7 @@
       "metadata": {
         "id": "8fb71376-b0eb-474b-ab51-2161dfa60e2d"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# Imports Required for the notebook\n",
         "import json\n",
@@ -168,7 +168,7 @@
       "metadata": {
         "id": "29cda7f0-a24e-4e74-ba6e-166413ab532c"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# GCP-related constant are listed below\n",
         "\n",
@@ -207,7 +207,7 @@
       },
       "id": "51jml7JvMpbD",
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -259,7 +259,7 @@
       },
       "id": "S4hqN5tPxm-n",
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "code",
@@ -274,7 +274,7 @@
       },
       "id": "IUD3giMzyxer",
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -306,7 +306,7 @@
       },
       "id": "ZaXkJeHqx58p",
       "execution_count": null,
-      "outputs": []
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}]
     },
     {
       "cell_type": "markdown",
@@ -335,7 +335,7 @@
       "metadata": {
         "id": "37c1613e-e2ef-4f2c-8999-cce01563e180"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# The size of a segment in the synthetic data set. Each segment 
represents\n",
         "# a collection of data points generated from either a fixed 
distribution\n",
@@ -397,7 +397,7 @@
       "metadata": {
         "id": "8e6f4f59-c6e5-4991-84d9-14eab18eb699"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "plt.figure(figsize=(12, 4))\n",
         "plt.xlim(0, 1000)\n",
@@ -422,7 +422,7 @@
       "metadata": {
         "id": "11017009-f97e-4805-9cbb-6a9d4ddb68d3"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "def create_topic_if_not_exists(project_id:str, topic_name:str, 
enable_message_ordering=False):\n",
         "    if enable_message_ordering:\n",
@@ -465,7 +465,7 @@
       "metadata": {
         "id": "66784c36-9f9e-410e-850b-3b8da29ff5ce"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# for input data\n",
         "input_publisher = create_topic_if_not_exists(PROJECT_ID, INPUT_TOPIC, 
True)\n",
@@ -493,7 +493,7 @@
       "metadata": {
         "id": "907f2469-1687-4ef3-bafd-9c4ec963b7e9"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "def publish_data(publisher, project_id: str, topic: str, data: 
Iterable[Any], delay=0.01, enable_message_ordering=False) -> None:\n",
         "    topic_path = publisher.topic_path(project_id, topic)\n",
@@ -534,7 +534,7 @@
         "scrolled": true,
         "id": "6e8b069d-9d94-4938-a87e-bd5f9f7620c0"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "def message_to_beam_row(msg: bytes) -> beam.Row:\n",
         "    try:\n",
@@ -591,7 +591,7 @@
       "metadata": {
         "id": "e4ca8af3-d74c-4d95-aeba-c34cb791525f"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "x = []\n",
         "y = []\n",
@@ -605,7 +605,7 @@
       "metadata": {
         "id": "b6bf369f-2b20-4834-b457-e9b1f0a596ca"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "def collect_result(subscriber):\n",
         "    subscription_path = 
pubsub_v1.SubscriberClient.subscription_path(PROJECT_ID, OUTPUT_SUB)\n",
@@ -646,7 +646,7 @@
       "metadata": {
         "id": "a3433ea1-70ae-408d-84b2-27118a3fd898"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# Refresh this cell until we see results from the output pubsub\n",
         "print(len(x))"
@@ -659,7 +659,7 @@
       "metadata": {
         "id": "31f24bfc-b91d-4e67-b804-732dc65e7525"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# When we see the output, run this cell. It will generate a plot 
every 5 seconds\n",
         "# to show how the data stream is processed.\n",
@@ -704,7 +704,7 @@
       "metadata": {
         "id": "350b8b1a-3010-4ecd-924f-010308bb5eb2"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# deleting input and output subscriptions\n",
         "subscriber = pubsub_v1.SubscriberClient()\n",
@@ -731,7 +731,7 @@
       "metadata": {
         "id": "10dc95cf-94ab-4a51-882b-88559340d4d2"
       },
-      "outputs": [],
+      "outputs": [{"output_type": "stream", "name": "stdout", "text": ["\n"]}],
       "source": [
         "# deleting input and output topics\n",
         "publisher = pubsub_v1.PublisherClient()\n",
@@ -776,4 +776,4 @@
   },
   "nbformat": 4,
   "nbformat_minor": 5
-}
\ No newline at end of file
+}

Reply via email to