Skip to content

Commit

Permalink
Updated integrity tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adlerjan committed Jul 12, 2023
1 parent 25ce8aa commit ed4a857
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 14 deletions.
37 changes: 36 additions & 1 deletion docssource/notebooks/beamformer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "949ea95d",
"metadata": {},
"outputs": [
Expand All @@ -212,6 +212,41 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2023-07-12 12:17:15,153\tERROR import_thread.py:80 -- ImportThread: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:65423 {grpc_message:\"Stream removed\", grpc_status:2, created_time:\"2023-07-12T10:17:15.152759853+00:00\"}\"\n",
">\n",
"Exception in thread ray_listen_error_messages:\n",
"Traceback (most recent call last):\n",
" File \"C:\\Users\\Stealth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py\", line 1016, in _bootstrap_inner\n",
"2023-07-12 12:17:15,155\tERROR worker.py:914 -- print_logs: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:65423 {grpc_message:\"Stream removed\", grpc_status:2, created_time:\"2023-07-12T10:17:15.153007658+00:00\"}\"\n",
">\n",
" self.run()\n",
" File \"C:\\Users\\Stealth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py\", line 953, in run\n",
" self._target(*self._args, **self._kwargs)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\worker.py\", line 2004, in listen_error_messages\n",
" _, error_data = worker.gcs_error_subscriber.poll()\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\gcs_pubsub.py\", line 300, in poll\n",
" self._poll_locked(timeout=timeout)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\gcs_pubsub.py\", line 217, in _poll_locked\n",
" fut.result(timeout=1)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\grpc\\_channel.py\", line 744, in result\n",
" raise self\n",
"grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:65423 {grpc_message:\"Stream removed\", grpc_status:2, created_time:\"2023-07-12T10:17:15.152992559+00:00\"}\"\n",
">\n"
]
}
],
"source": [
Expand Down
8 changes: 8 additions & 0 deletions docssource/notebooks/channel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mThe Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. View Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
]
}
],
"source": [
Expand Down
35 changes: 35 additions & 0 deletions docssource/notebooks/fec_coding.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,41 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Exception in thread ray_listen_error_messages:\n",
"Traceback (most recent call last):\n",
" File \"C:\\Users\\Stealth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py\", line 1016, in _bootstrap_inner\n",
"2023-07-12 12:17:21,973\tERROR worker.py:914 -- print_logs: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:61812 {grpc_message:\"Stream removed\", grpc_status:2, created_time:\"2023-07-12T10:17:21.971775063+00:00\"}\"\n",
">\n",
"2023-07-12 12:17:21,975\tERROR import_thread.py:80 -- ImportThread: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:61812 {grpc_message:\"Stream removed\", grpc_status:2, created_time:\"2023-07-12T10:17:21.971759664+00:00\"}\"\n",
">\n",
" self.run()\n",
" File \"C:\\Users\\Stealth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py\", line 953, in run\n",
" self._target(*self._args, **self._kwargs)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\worker.py\", line 2004, in listen_error_messages\n",
" _, error_data = worker.gcs_error_subscriber.poll()\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\gcs_pubsub.py\", line 300, in poll\n",
" self._poll_locked(timeout=timeout)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\gcs_pubsub.py\", line 217, in _poll_locked\n",
" fut.result(timeout=1)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\grpc\\_channel.py\", line 744, in result\n",
" raise self\n",
"grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:61812 {created_time:\"2023-07-12T10:17:21.971524624+00:00\", grpc_status:2, grpc_message:\"Stream removed\"}\"\n",
">\n"
]
}
],
"source": [
Expand Down
37 changes: 36 additions & 1 deletion docssource/notebooks/roc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -257,6 +257,41 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2023-07-12 12:17:23,006\tERROR import_thread.py:80 -- ImportThread: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:63539 {created_time:\"2023-07-12T10:17:23.005852994+00:00\", grpc_status:2, grpc_message:\"Stream removed\"}\"\n",
">\n",
"Exception in thread ray_listen_error_messages:\n",
"Traceback (most recent call last):\n",
" File \"C:\\Users\\Stealth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py\", line 1016, in _bootstrap_inner\n",
" self.run()\n",
" File \"C:\\Users\\Stealth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py\", line 953, in run\n",
"2023-07-12 12:17:23,007\tERROR worker.py:914 -- print_logs: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:63539 {grpc_message:\"Stream removed\", grpc_status:2, created_time:\"2023-07-12T10:17:23.005866971+00:00\"}\"\n",
">\n",
" self._target(*self._args, **self._kwargs)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\worker.py\", line 2004, in listen_error_messages\n",
" _, error_data = worker.gcs_error_subscriber.poll()\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\gcs_pubsub.py\", line 300, in poll\n",
" self._poll_locked(timeout=timeout)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\gcs_pubsub.py\", line 217, in _poll_locked\n",
" fut.result(timeout=1)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\grpc\\_channel.py\", line 744, in result\n",
" raise self\n",
"grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:63539 {created_time:\"2023-07-12T10:17:23.005598227+00:00\", grpc_status:2, grpc_message:\"Stream removed\"}\"\n",
">\n"
]
}
],
"source": [
Expand Down
37 changes: 36 additions & 1 deletion docssource/notebooks/waveform.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "4b1f6f00",
"metadata": {},
"outputs": [
Expand All @@ -286,6 +286,41 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2023-07-12 12:17:23,966\tERROR import_thread.py:80 -- ImportThread: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:63657 {grpc_message:\"Stream removed\", grpc_status:2, created_time:\"2023-07-12T10:17:23.965801815+00:00\"}\"\n",
">\n",
"Exception in thread ray_listen_error_messages:\n",
"Traceback (most recent call last):\n",
" File \"C:\\Users\\Stealth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py\", line 1016, in _bootstrap_inner\n",
"2023-07-12 12:17:23,968\tERROR worker.py:914 -- print_logs: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:63657 {created_time:\"2023-07-12T10:17:23.966120062+00:00\", grpc_status:2, grpc_message:\"Stream removed\"}\"\n",
">\n",
" self.run()\n",
" File \"C:\\Users\\Stealth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py\", line 953, in run\n",
" self._target(*self._args, **self._kwargs)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\worker.py\", line 2004, in listen_error_messages\n",
" _, error_data = worker.gcs_error_subscriber.poll()\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\gcs_pubsub.py\", line 300, in poll\n",
" self._poll_locked(timeout=timeout)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\ray\\_private\\gcs_pubsub.py\", line 217, in _poll_locked\n",
" fut.result(timeout=1)\n",
" File \"d:\\envs\\hermes-310\\lib\\site-packages\\grpc\\_channel.py\", line 744, in result\n",
" raise self\n",
"grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:\n",
"\tstatus = StatusCode.UNKNOWN\n",
"\tdetails = \"Stream removed\"\n",
"\tdebug_error_string = \"UNKNOWN:Error received from peer ipv4:127.0.0.1:63657 {grpc_message:\"Stream removed\", grpc_status:2, created_time:\"2023-07-12T10:17:23.966104202+00:00\"}\"\n",
">\n"
]
}
],
"source": [
Expand Down
22 changes: 11 additions & 11 deletions tests/integrity_tests/documentation/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@ def test_audiodevice(self) -> None:
"""Test the audio device loop example notebook"""

notebook = self.__load_notebook("audio.ipynb")
self.__patch_notebook(notebook, 1,
self.__patch_notebook(notebook, 2,
patches={0: "from hermespy.hardware_loop import PhysicalDeviceDummy"})
self.__patch_notebook(notebook, 3,
self.__patch_notebook(notebook, 4,
patches={0: "device = PhysicalDeviceDummy()"})
self.__test_notebook(notebook)

def test_beamformer(self) -> None:
"""Test the beamforming example notebook"""

notebook = self.__load_notebook("beamformer.ipynb")
self.__patch_notebook(notebook, 7,
self.__patch_notebook(notebook, 8,
inserts={2: "import ray as ray\n", 9: "ray.init(local_mode=True)"},
patches={9: "simulation = Simulation(console_mode=ConsoleMode.SILENT, num_actors=1)",
24: "simulation.num_samples = 1"})
Expand All @@ -129,7 +129,7 @@ def test_channel(self) -> None:
"""Test the channel implementation example notebook"""

notebook = self.__load_notebook("channel.ipynb")
self.__patch_notebook(notebook, 3,
self.__patch_notebook(notebook, 4,
patches={9: "simulation = Simulation(console_mode=ConsoleMode.SILENT, num_samples=1, num_actors=1)"},
inserts={1: "import ray as ray", 8: "ray.init(local_mode=True)"})
self.__test_notebook(notebook)
Expand All @@ -144,7 +144,7 @@ def test_evaluator(self) -> None:
"""Test the evaluator implementation example notebook"""

notebook = self.__load_notebook("evaluator.ipynb")
self.__patch_notebook(notebook, 3,
self.__patch_notebook(notebook, 4,
inserts={0: "import ray as ray\n", 6: "ray.init(local_mode=True)"},
patches={6: "simulation = Simulation(console_mode=ConsoleMode.SILENT, num_actors=1, num_samples=1)"})
self.__test_notebook(notebook)
Expand All @@ -153,7 +153,7 @@ def test_fec(self) -> None:
"""Test the forward error correction implementation example notebook"""

notebook = self.__load_notebook("fec_coding.ipynb")
self.__patch_notebook(notebook, 7,
self.__patch_notebook(notebook, 8,
inserts={0: "import ray as ray\n", 5: "ray.init(local_mode=True)"},
patches={5: "simulation = Simulation(console_mode=ConsoleMode.SILENT, num_actors=1)",
17: "simulation.num_samples = 1"})
Expand All @@ -163,7 +163,7 @@ def test_precoding(self) -> None:
"""Test the MIMO precoding implementation example notebook"""

notebook = self.__load_notebook("precoding.ipynb")
self.__patch_notebook(notebook, 3,
self.__patch_notebook(notebook, 4,
inserts={0: "import ray as ray\n", 5: "ray.init(local_mode=True)"},
patches={5: "simulation = Simulation(console_mode=ConsoleMode.SILENT, num_actors=1, num_samples=1)"})
self.__test_notebook(notebook)
Expand All @@ -172,19 +172,19 @@ def test_roc(self) -> None:
"""Test the receiver operation characteristics example notebook"""

notebook = self.__load_notebook("roc.ipynb")
self.__patch_notebook(notebook, 1,
self.__patch_notebook(notebook, 2,
inserts={0: "import ray as ray\n", 16: "ray.init(local_mode=True)"})
self.__patch_notebook(notebook, 5,
self.__patch_notebook(notebook, 6,
patches={22: "simulation.num_samples = 1"})
self.__patch_notebook(notebook, 7,
self.__patch_notebook(notebook, 8,
patches={11: "hardware_loop.num_samples = 1"})
self.__test_notebook(notebook)

def test_waveform(self) -> None:
"""Test the communication waveform implementation example notebook"""

notebook = self.__load_notebook("waveform.ipynb")
self.__patch_notebook(notebook, 9,
self.__patch_notebook(notebook, 10,
patches={3: "simulation = Simulation(console_mode=ConsoleMode.SILENT, num_actors=1)",
11: "simulation.num_samples = 1"},
inserts={0: "import ray as ray", 3: "ray.init(local_mode=True)"})
Expand Down

0 comments on commit ed4a857

Please sign in to comment.