|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "markdown",
|
5 |
| - "id": "completed-question", |
| 5 | + "id": "amended-resort", |
6 | 6 | "metadata": {},
|
7 | 7 | "source": [
|
8 | 8 | "# Hospital 2\n",
|
|
13 | 13 | {
|
14 | 14 | "cell_type": "code",
|
15 | 15 | "execution_count": 1,
|
16 |
| - "id": "cubic-international", |
| 16 | + "id": "selected-strategy", |
17 | 17 | "metadata": {},
|
18 | 18 | "outputs": [],
|
19 | 19 | "source": [
|
|
26 | 26 | {
|
27 | 27 | "cell_type": "code",
|
28 | 28 | "execution_count": 2,
|
29 |
| - "id": "piano-joyce", |
| 29 | + "id": "meaning-fiber", |
30 | 30 | "metadata": {},
|
31 | 31 | "outputs": [],
|
32 | 32 | "source": [
|
|
36 | 36 | {
|
37 | 37 | "cell_type": "code",
|
38 | 38 | "execution_count": 3,
|
39 |
| - "id": "complex-direction", |
| 39 | + "id": "published-channels", |
40 | 40 | "metadata": {},
|
41 | 41 | "outputs": [],
|
42 | 42 | "source": [
|
43 | 43 | "WEBHOOK_HOST = \"0.0.0.0\"\n",
|
44 | 44 | "WEBHOOK_PORT = 8062\n",
|
45 | 45 | "WEBHOOK_BASE = \"\"\n",
|
46 |
| - "ADMIN_URL = \"http://hospital1-agent:8061\"\n", |
| 46 | + "ADMIN_URL = \"http://hospital2-agent:8061\"\n", |
47 | 47 | "\n",
|
48 | 48 | "agent_config = {\n",
|
49 | 49 | " \"webhook_host\": WEBHOOK_HOST,\n",
|
|
56 | 56 | {
|
57 | 57 | "cell_type": "code",
|
58 | 58 | "execution_count": 4,
|
59 |
| - "id": "thirty-scratch", |
| 59 | + "id": "bigger-civilian", |
60 | 60 | "metadata": {},
|
61 | 61 | "outputs": [],
|
62 | 62 | "source": [
|
|
65 | 65 | },
|
66 | 66 | {
|
67 | 67 | "cell_type": "markdown",
|
68 |
| - "id": "afraid-marijuana", |
| 68 | + "id": "moderate-connecticut", |
69 | 69 | "metadata": {},
|
70 | 70 | "source": [
|
71 | 71 | "## Copy from Researcher"
|
72 | 72 | ]
|
73 | 73 | },
|
74 | 74 | {
|
75 | 75 | "cell_type": "code",
|
76 |
| - "execution_count": 6, |
77 |
| - "id": "based-blackberry", |
| 76 | + "execution_count": 7, |
| 77 | + "id": "advised-greene", |
78 | 78 | "metadata": {},
|
79 | 79 | "outputs": [],
|
80 | 80 | "source": [
|
81 |
| - "research_invite = {\"@type\": \"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation\", \"@id\": \"06fa0413-825f-4600-8bec-a582e5d75acc\", \"label\": \"Health Researcher\", \"serviceEndpoint\": \"http://172.17.0.1:8040\", \"recipientKeys\": [\"HrC95BgohtYLsTHjn6g4UspCx8tWzviGAg7PbvnRWHjZ\"]}" |
| 81 | + "research_invite = {\"@type\": \"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation\", \"@id\": \"cc5fd255-89c9-4e2c-8f2a-a799474821c9\", \"label\": \"Health Researcher\", \"recipientKeys\": [\"Bw9KodyAtMJTkFoYHjqdZWsxQPQAX7jgjxuc5BoepnhQ\"], \"serviceEndpoint\": \"http://172.30.144.131:8040\"}" |
82 | 82 | ]
|
83 | 83 | },
|
84 | 84 | {
|
85 | 85 | "cell_type": "code",
|
86 |
| - "execution_count": 7, |
87 |
| - "id": "dated-beverage", |
| 86 | + "execution_count": 8, |
| 87 | + "id": "third-kansas", |
88 | 88 | "metadata": {},
|
89 | 89 | "outputs": [
|
90 | 90 | {
|
91 |
| - "name": "stdout", |
92 |
| - "output_type": "stream", |
93 |
| - "text": [ |
94 |
| - "Connection Handler Called\n", |
95 |
| - "Connection b16c712d-640e-4948-8ac6-ac767f3cddc2 in State invitation\n", |
96 |
| - "Connection Handler Called\n", |
97 |
| - "Connection b16c712d-640e-4948-8ac6-ac767f3cddc2 in State request\n", |
98 |
| - "Connection Handler Called\n", |
99 |
| - "Connection b16c712d-640e-4948-8ac6-ac767f3cddc2 in State response\n", |
100 |
| - "Connection Handler Called\n", |
101 |
| - "Connection b16c712d-640e-4948-8ac6-ac767f3cddc2 in State active\n", |
102 |
| - "Pending connection moved to active. Challenging with auth policy if set\n", |
103 |
| - "Trusted Research Connection Established - b16c712d-640e-4948-8ac6-ac767f3cddc2\n", |
104 |
| - "ML Message from b16c712d-640e-4948-8ac6-ac767f3cddc2\n", |
105 |
| - "Open file\n", |
106 |
| - "learning\n", |
107 |
| - "untrained_model.pt\n", |
108 |
| - "HOSPITAL MODEL LOADED\n", |
109 |
| - "HOSPITAL IS TRAINING\n", |
110 |
| - "loss at epoch 0 : tensor(0.2577)\n" |
111 |
| - ] |
112 |
| - }, |
113 |
| - { |
114 |
| - "name": "stderr", |
115 |
| - "output_type": "stream", |
116 |
| - "text": [ |
117 |
| - "/opt/conda/lib/python3.7/site-packages/torch/autograd/__init__.py:132: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.)\n", |
118 |
| - " allow_unreachable=True) # allow_unreachable flag\n" |
119 |
| - ] |
120 |
| - }, |
121 |
| - { |
122 |
| - "name": "stdout", |
123 |
| - "output_type": "stream", |
124 |
| - "text": [ |
125 |
| - "loss at epoch 5000 : tensor(0.1234)\n", |
126 |
| - "loss at epoch 10000 : tensor(0.1123)\n", |
127 |
| - "loss at epoch 15000 : tensor(0.1070)\n", |
128 |
| - "loss at epoch 20000 : tensor(0.1005)\n", |
129 |
| - "loss at epoch 25000 : tensor(0.0970)\n", |
130 |
| - "loss at epoch 30000 : tensor(0.0950)\n", |
131 |
| - "loss at epoch 35000 : tensor(0.0935)\n", |
132 |
| - "loss at epoch 40000 : tensor(0.0925)\n", |
133 |
| - "loss at epoch 45000 : tensor(0.0917)\n", |
134 |
| - "Learnt \n", |
135 |
| - "Trained file open\n", |
136 |
| - "connection ID b16c712d-640e-4948-8ac6-ac767f3cddc2\n" |
| 91 | + "ename": "KeyboardInterrupt", |
| 92 | + "evalue": "", |
| 93 | + "output_type": "error", |
| 94 | + "traceback": [ |
| 95 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
| 96 | + "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", |
| 97 | + "\u001b[0;32m<ipython-input-8-7ca3898bbdc5>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mhospital2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mestablish_research_connection\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresearch_invite\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", |
| 98 | + "\u001b[0;32m/workspace/hospital.py\u001b[0m in \u001b[0;36mestablish_research_connection\u001b[0;34m(self, invitation)\u001b[0m\n\u001b[1;32m 369\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpending_connections\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpending_connection\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 370\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 371\u001b[0;31m \u001b[0mloop\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_until_complete\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpending_connection\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"is_trusted\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 372\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 373\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mpending_connection\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"is_trusted\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 99 | + "\u001b[0;32m/opt/conda/lib/python3.7/site-packages/nest_asyncio.py\u001b[0m in \u001b[0;36mrun_until_complete\u001b[0;34m(self, future)\u001b[0m\n\u001b[1;32m 90\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_log_destroy_pending\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 91\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdone\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 92\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run_once\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 93\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_stopping\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 94\u001b[0m \u001b[0;32mbreak\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 100 | + "\u001b[0;32m/opt/conda/lib/python3.7/site-packages/nest_asyncio.py\u001b[0m in \u001b[0;36m_run_once\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 117\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0;36m0.01\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_is_proactorloop\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 118\u001b[0m else None)\n\u001b[0;32m--> 119\u001b[0;31m \u001b[0mevent_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_selector\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mselect\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 120\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_process_events\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mevent_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 121\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", |
| 101 | + "\u001b[0;32m/opt/conda/lib/python3.7/selectors.py\u001b[0m in \u001b[0;36mselect\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 466\u001b[0m \u001b[0mready\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 467\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 468\u001b[0;31m \u001b[0mfd_event_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_selector\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpoll\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax_ev\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 469\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mInterruptedError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 470\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mready\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 102 | + "\u001b[0;31mKeyboardInterrupt\u001b[0m: " |
137 | 103 | ]
|
138 | 104 | }
|
139 | 105 | ],
|
|
144 | 110 | {
|
145 | 111 | "cell_type": "code",
|
146 | 112 | "execution_count": null,
|
147 |
| - "id": "cardiovascular-typing", |
| 113 | + "id": "pleasant-football", |
148 | 114 | "metadata": {},
|
149 | 115 | "outputs": [],
|
150 | 116 | "source": []
|
|
166 | 132 | "name": "python",
|
167 | 133 | "nbconvert_exporter": "python",
|
168 | 134 | "pygments_lexer": "ipython3",
|
169 |
| - "version": "3.8.5" |
| 135 | + "version": "3.7.6" |
170 | 136 | }
|
171 | 137 | },
|
172 | 138 | "nbformat": 4,
|
|
0 commit comments