Skip to content

Commit fd36b57

Browse files
committed
Enables config for magic to come from a variable
1 parent e2fb1d7 commit fd36b57

File tree

5 files changed

+58
-50
lines changed

5 files changed

+58
-50
lines changed

docs/how-tos/use-in-jupyter-notebook.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Then to use it:
2525
```
2626
Other arguments (--help to print this.):
2727
-m, --module_name: Module name to provide. Default is jupyter_module.
28-
-c, --config: JSON config string.
28+
-c, --config: JSON config string, or variable name containing config to use.
2929
-r, --rebuild-drivers: Flag to rebuild drivers.
3030
-d, --display: Flag to visualize dataflow.
3131
-v, --verbosity: of standard output. 0 to hide. 1 is normal, default.

examples/jupyter_notebook_magic/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Then to use it:
1313
```
1414
Other arguments (--help to print this.):
1515
-m, --module_name: Module name to provide. Default is jupyter_module.
16-
-c, --config: JSON config string.
16+
-c, --config: JSON config string, or variable name containing config to use.
1717
-r, --rebuild-drivers: Flag to rebuild drivers.
1818
-d, --display: Flag to visualize dataflow.
1919
-v, --verbosity: of standard output. 0 to hide. 1 is normal, default.

examples/jupyter_notebook_magic/example.ipynb

+40-36
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,12 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": null,
66
"id": "initial_id",
77
"metadata": {
8-
"collapsed": true,
9-
"ExecuteTime": {
10-
"end_time": "2024-02-09T21:51:25.527987Z",
11-
"start_time": "2024-02-09T21:51:20.873326Z"
12-
}
8+
"collapsed": true
139
},
14-
"outputs": [
15-
{
16-
"name": "stderr",
17-
"output_type": "stream",
18-
"text": [
19-
"/Users/stefankrawczyk/.pyenv/versions/knowledge_retrieval-py39/lib/python3.9/site-packages/pyspark/pandas/__init__.py:50: UserWarning: 'PYARROW_IGNORE_TIMEZONE' environment variable was not set. It is required to set this environment variable to '1' in both driver and executor sides if you use pyarrow>=2.0.0. pandas-on-Spark will set it for you but it does not work if there is a Spark context already launched.\n",
20-
" warnings.warn(\n"
21-
]
22-
}
23-
],
10+
"outputs": [],
2411
"source": [
2512
"# load some extensions / magic...\n",
2613
"%load_ext hamilton.plugins.jupyter_magic"
@@ -37,12 +24,12 @@
3724
"metadata": {
3825
"collapsed": false,
3926
"ExecuteTime": {
40-
"end_time": "2024-02-11T23:52:54.506852Z",
41-
"start_time": "2024-02-11T23:52:54.499090Z"
27+
"end_time": "2024-02-12T06:43:34.092710Z",
28+
"start_time": "2024-02-12T06:43:34.083883Z"
4229
}
4330
},
4431
"id": "f829eb1d88585ff",
45-
"execution_count": 135
32+
"execution_count": 153
4633
},
4734
{
4835
"cell_type": "code",
@@ -53,7 +40,7 @@
5340
"text": [
5441
"Help for %%cell_to_module magic:\n",
5542
" -m, --module_name: Module name to provide. Default is jupyter_module.\n",
56-
" -c, --config: JSON config string.\n",
43+
" -c, --config: JSON config string, or variable name containing config to use.\n",
5744
" -r, --rebuild-drivers: Flag to rebuild drivers.\n",
5845
" -d, --display: Flag to visualize dataflow.\n",
5946
" -v, --verbosity: of standard output. 0 to hide. 1 is normal, default.\n"
@@ -67,12 +54,12 @@
6754
"metadata": {
6855
"collapsed": false,
6956
"ExecuteTime": {
70-
"end_time": "2024-02-12T00:16:58.828854Z",
71-
"start_time": "2024-02-12T00:16:58.820889Z"
57+
"end_time": "2024-02-12T06:43:35.276130Z",
58+
"start_time": "2024-02-12T06:43:35.265833Z"
7259
}
7360
},
7461
"id": "f84593b0496cadd1",
75-
"execution_count": 149
62+
"execution_count": 154
7663
},
7764
{
7865
"cell_type": "code",
@@ -242,28 +229,45 @@
242229
"id": "fcedb47a8a4c1792",
243230
"execution_count": 139
244231
},
232+
{
233+
"cell_type": "code",
234+
"outputs": [],
235+
"source": [
236+
"# some configuration \n",
237+
"conf = {\"some_key\":\"some_value\"}"
238+
],
239+
"metadata": {
240+
"collapsed": false,
241+
"ExecuteTime": {
242+
"end_time": "2024-02-12T07:14:38.358130Z",
243+
"start_time": "2024-02-12T07:14:38.353824Z"
244+
}
245+
},
246+
"id": "cfd9cbe7f9630ade",
247+
"execution_count": 160
248+
},
245249
{
246250
"cell_type": "code",
247251
"outputs": [
248252
{
249253
"name": "stdout",
250254
"output_type": "stream",
251255
"text": [
252-
"Rebuilt dr3 with module hello, using it's config of {}\n"
256+
"Rebuilt dr3 with module hello, using it's config of {'some_key': 'some_value'}\n"
253257
]
254258
},
255259
{
256260
"data": {
257261
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Generated by graphviz version 9.0.0 (20230911.1827)\n -->\n<!-- Pages: 1 -->\n<svg width=\"187pt\" height=\"287pt\"\n viewBox=\"0.00 0.00 186.77 287.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 283)\">\n<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-283 182.77,-283 182.77,4 -4,4\"/>\n<g id=\"clust1\" class=\"cluster\">\n<title>cluster__legend</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"8,-142 8,-271 92.85,-271 92.85,-142 8,-142\"/>\n<text text-anchor=\"middle\" x=\"50.42\" y=\"-253.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Legend</text>\n</g>\n<!-- some_key -->\n<g id=\"node1\" class=\"node\">\n<title>some_key</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"85.42,-50 9.42,-50 9.42,0 91.42,0 91.42,-44 85.42,-50\"/>\n<polyline fill=\"none\" stroke=\"black\" points=\"85.42,-50 85.42,-44\"/>\n<polyline fill=\"none\" stroke=\"black\" points=\"91.42,-44 85.42,-44\"/>\n<text text-anchor=\"start\" x=\"17.42\" y=\"-33.7\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">some_key</text>\n<text text-anchor=\"start\" x=\"18.92\" y=\"-5.7\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">typing.Any</text>\n</g>\n<!-- hello -->\n<g id=\"node2\" class=\"node\">\n<title>hello</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M65.42,-131.8C65.42,-131.8 35.42,-131.8 35.42,-131.8 29.42,-131.8 23.42,-125.8 23.42,-119.8 23.42,-119.8 23.42,-80.2 23.42,-80.2 23.42,-74.2 29.42,-68.2 35.42,-68.2 35.42,-68.2 65.42,-68.2 65.42,-68.2 71.42,-68.2 77.42,-74.2 77.42,-80.2 77.42,-80.2 77.42,-119.8 77.42,-119.8 77.42,-125.8 71.42,-131.8 65.42,-131.8\"/>\n<text text-anchor=\"start\" x=\"34.67\" y=\"-108.7\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">hello</text>\n<text text-anchor=\"start\" x=\"42.92\" y=\"-80.7\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">str</text>\n</g>\n<!-- world -->\n<g id=\"node3\" class=\"node\">\n<title>world</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M166.77,-131.8C166.77,-131.8 132.42,-131.8 132.42,-131.8 126.42,-131.8 120.42,-125.8 120.42,-119.8 120.42,-119.8 120.42,-80.2 120.42,-80.2 120.42,-74.2 126.42,-68.2 132.42,-68.2 132.42,-68.2 166.77,-68.2 166.77,-68.2 172.77,-68.2 178.77,-74.2 178.77,-80.2 178.77,-80.2 178.77,-119.8 178.77,-119.8 178.77,-125.8 172.77,-131.8 166.77,-131.8\"/>\n<text text-anchor=\"start\" x=\"131.22\" y=\"-108.7\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">world</text>\n<text text-anchor=\"start\" x=\"142.1\" y=\"-80.7\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">str</text>\n</g>\n<!-- hello&#45;&gt;world -->\n<g id=\"edge1\" class=\"edge\">\n<title>hello&#45;&gt;world</title>\n<path fill=\"none\" stroke=\"black\" d=\"M77.72,-100C87.28,-100 98.3,-100 108.77,-100\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"108.72,-103.5 118.72,-100 108.72,-96.5 108.72,-103.5\"/>\n</g>\n<!-- config -->\n<g id=\"node4\" class=\"node\">\n<title>config</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"71.42,-240 23.42,-240 23.42,-204 77.42,-204 77.42,-234 71.42,-240\"/>\n<polyline fill=\"none\" stroke=\"black\" points=\"71.42,-240 71.42,-234\"/>\n<polyline fill=\"none\" stroke=\"black\" points=\"77.42,-234 71.42,-234\"/>\n<text text-anchor=\"middle\" x=\"50.42\" y=\"-216.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">config</text>\n</g>\n<!-- function -->\n<g id=\"node5\" class=\"node\">\n<title>function</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M72.85,-186.3C72.85,-186.3 28,-186.3 28,-186.3 22,-186.3 16,-180.3 16,-174.3 16,-174.3 16,-161.7 16,-161.7 16,-155.7 22,-149.7 28,-149.7 28,-149.7 72.85,-149.7 72.85,-149.7 78.85,-149.7 84.85,-155.7 84.85,-161.7 84.85,-161.7 84.85,-174.3 84.85,-174.3 84.85,-180.3 78.85,-186.3 72.85,-186.3\"/>\n<text text-anchor=\"middle\" x=\"50.42\" y=\"-162.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">function</text>\n</g>\n</g>\n</svg>\n",
258-
"text/plain": "<graphviz.graphs.Digraph at 0x1413af400>"
262+
"text/plain": "<graphviz.graphs.Digraph at 0x140f98b20>"
259263
},
260-
"execution_count": 145,
264+
"execution_count": 158,
261265
"metadata": {},
262266
"output_type": "execute_result"
263267
}
264268
],
265269
"source": [
266-
"%%cell_to_module -m hello --display --config '{\"some_key\":\"some_value\"}' --rebuild-drivers\n",
270+
"%%cell_to_module -m hello --display --config conf --rebuild-drivers\n",
267271
"# shows how to pass in configuration for display\n",
268272
"from hamilton.function_modifiers import config\n",
269273
"\n",
@@ -281,22 +285,22 @@
281285
"metadata": {
282286
"collapsed": false,
283287
"ExecuteTime": {
284-
"end_time": "2024-02-12T00:09:24.839893Z",
285-
"start_time": "2024-02-12T00:09:24.522432Z"
288+
"end_time": "2024-02-12T06:44:33.948011Z",
289+
"start_time": "2024-02-12T06:44:33.538837Z"
286290
}
287291
},
288292
"id": "f7c21d5eaa95cc0a",
289-
"execution_count": 145
293+
"execution_count": 158
290294
},
291295
{
292296
"cell_type": "code",
293297
"outputs": [
294298
{
295299
"data": {
296300
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Generated by graphviz version 9.0.0 (20230911.1827)\n -->\n<!-- Pages: 1 -->\n<svg width=\"528pt\" height=\"414pt\"\n viewBox=\"0.00 0.00 527.98 413.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 409.8)\">\n<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-409.8 523.98,-409.8 523.98,4 -4,4\"/>\n<g id=\"clust1\" class=\"cluster\">\n<title>cluster__legend</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"8,-213.8 8,-397.8 92.85,-397.8 92.85,-213.8 8,-213.8\"/>\n<text text-anchor=\"middle\" x=\"50.43\" y=\"-380.5\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Legend</text>\n</g>\n<!-- hello -->\n<g id=\"node1\" class=\"node\">\n<title>hello</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M65.43,-63.6C65.43,-63.6 35.43,-63.6 35.43,-63.6 29.43,-63.6 23.43,-57.6 23.43,-51.6 23.43,-51.6 23.43,-12 23.43,-12 23.43,-6 29.43,0 35.43,0 35.43,0 65.43,0 65.43,0 71.43,0 77.43,-6 77.43,-12 77.43,-12 77.43,-51.6 77.43,-51.6 77.43,-57.6 71.43,-63.6 65.43,-63.6\"/>\n<text text-anchor=\"start\" x=\"34.68\" y=\"-40.5\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">hello</text>\n<text text-anchor=\"start\" x=\"42.93\" y=\"-12.5\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">str</text>\n</g>\n<!-- world -->\n<g id=\"node3\" class=\"node\">\n<title>world</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M189.28,-63.6C189.28,-63.6 154.93,-63.6 154.93,-63.6 148.93,-63.6 142.93,-57.6 142.93,-51.6 142.93,-51.6 142.93,-12 142.93,-12 142.93,-6 148.93,0 154.93,0 154.93,0 189.28,0 189.28,0 195.28,0 201.28,-6 201.28,-12 201.28,-12 201.28,-51.6 201.28,-51.6 201.28,-57.6 195.28,-63.6 189.28,-63.6\"/>\n<text text-anchor=\"start\" x=\"153.73\" y=\"-40.5\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">world</text>\n<text text-anchor=\"start\" x=\"164.6\" y=\"-12.5\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">str</text>\n</g>\n<!-- hello&#45;&gt;world -->\n<g id=\"edge1\" class=\"edge\">\n<title>hello&#45;&gt;world</title>\n<path fill=\"none\" stroke=\"black\" d=\"M77.69,-31.8C93.42,-31.8 113.72,-31.8 131.38,-31.8\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"131.3,-35.3 141.3,-31.8 131.3,-28.3 131.3,-35.3\"/>\n</g>\n<!-- llm_client -->\n<g id=\"node2\" class=\"node\">\n<title>llm_client</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M344.13,-227.6C344.13,-227.6 283.53,-227.6 283.53,-227.6 277.53,-227.6 271.53,-221.6 271.53,-215.6 271.53,-215.6 271.53,-176 271.53,-176 271.53,-170 277.53,-164 283.53,-164 283.53,-164 344.13,-164 344.13,-164 350.13,-164 356.13,-170 356.13,-176 356.13,-176 356.13,-215.6 356.13,-215.6 356.13,-221.6 350.13,-227.6 344.13,-227.6\"/>\n<text text-anchor=\"start\" x=\"282.33\" y=\"-204.5\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">llm_client</text>\n<text text-anchor=\"start\" x=\"290.58\" y=\"-176.5\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">OpenAI</text>\n</g>\n<!-- joke_response -->\n<g id=\"node7\" class=\"node\">\n<title>joke_response</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M507.98,-186.6C507.98,-186.6 415.88,-186.6 415.88,-186.6 409.88,-186.6 403.88,-180.6 403.88,-174.6 403.88,-174.6 403.88,-135 403.88,-135 403.88,-129 409.88,-123 415.88,-123 415.88,-123 507.98,-123 507.98,-123 513.98,-123 519.98,-129 519.98,-135 519.98,-135 519.98,-174.6 519.98,-174.6 519.98,-180.6 513.98,-186.6 507.98,-186.6\"/>\n<text text-anchor=\"start\" x=\"414.68\" y=\"-163.5\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">joke_response</text>\n<text text-anchor=\"start\" x=\"454.43\" y=\"-135.5\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">str</text>\n</g>\n<!-- llm_client&#45;&gt;joke_response -->\n<g id=\"edge4\" class=\"edge\">\n<title>llm_client&#45;&gt;joke_response</title>\n<path fill=\"none\" stroke=\"black\" d=\"M356.3,-184.16C367.65,-180.97 380.27,-177.43 392.69,-173.95\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"393.39,-177.39 402.07,-171.32 391.5,-170.65 393.39,-177.39\"/>\n</g>\n<!-- joke_messages -->\n<g id=\"node4\" class=\"node\">\n<title>joke_messages</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M362.88,-145.6C362.88,-145.6 264.78,-145.6 264.78,-145.6 258.78,-145.6 252.78,-139.6 252.78,-133.6 252.78,-133.6 252.78,-94 252.78,-94 252.78,-88 258.78,-82 264.78,-82 264.78,-82 362.88,-82 362.88,-82 368.88,-82 374.88,-88 374.88,-94 374.88,-94 374.88,-133.6 374.88,-133.6 374.88,-139.6 368.88,-145.6 362.88,-145.6\"/>\n<text text-anchor=\"start\" x=\"263.58\" y=\"-122.5\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">joke_messages</text>\n<text text-anchor=\"start\" x=\"305.58\" y=\"-94.5\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">list</text>\n</g>\n<!-- joke_messages&#45;&gt;joke_response -->\n<g id=\"edge5\" class=\"edge\">\n<title>joke_messages&#45;&gt;joke_response</title>\n<path fill=\"none\" stroke=\"black\" d=\"M375.09,-130.71C380.99,-132.37 387,-134.05 392.96,-135.73\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"391.58,-138.98 402.16,-138.31 393.48,-132.24 391.58,-138.98\"/>\n</g>\n<!-- some_key -->\n<g id=\"node5\" class=\"node\">\n<title>some_key</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"85.43,-203.8 9.43,-203.8 9.43,-153.8 91.43,-153.8 91.43,-197.8 85.43,-203.8\"/>\n<polyline fill=\"none\" stroke=\"black\" points=\"85.43,-203.8 85.43,-197.8\"/>\n<polyline fill=\"none\" stroke=\"black\" points=\"91.43,-197.8 85.43,-197.8\"/>\n<text text-anchor=\"start\" x=\"17.43\" y=\"-187.5\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">some_key</text>\n<text text-anchor=\"start\" x=\"18.93\" y=\"-159.5\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">typing.Any</text>\n</g>\n<!-- joke_prompt -->\n<g id=\"node6\" class=\"node\">\n<title>joke_prompt</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M211.78,-145.6C211.78,-145.6 132.43,-145.6 132.43,-145.6 126.43,-145.6 120.43,-139.6 120.43,-133.6 120.43,-133.6 120.43,-94 120.43,-94 120.43,-88 126.43,-82 132.43,-82 132.43,-82 211.78,-82 211.78,-82 217.78,-82 223.78,-88 223.78,-94 223.78,-94 223.78,-133.6 223.78,-133.6 223.78,-139.6 217.78,-145.6 211.78,-145.6\"/>\n<text text-anchor=\"start\" x=\"131.23\" y=\"-122.5\" font-family=\"Helvetica,sans-Serif\" font-weight=\"bold\" font-size=\"14.00\">joke_prompt</text>\n<text text-anchor=\"start\" x=\"164.6\" y=\"-94.5\" font-family=\"Helvetica,sans-Serif\" font-style=\"italic\" font-size=\"14.00\">str</text>\n</g>\n<!-- joke_prompt&#45;&gt;joke_messages -->\n<g id=\"edge2\" class=\"edge\">\n<title>joke_prompt&#45;&gt;joke_messages</title>\n<path fill=\"none\" stroke=\"black\" d=\"M223.94,-113.8C229.55,-113.8 235.34,-113.8 241.14,-113.8\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"240.77,-117.3 250.77,-113.8 240.77,-110.3 240.77,-117.3\"/>\n</g>\n<!-- _joke_prompt_inputs -->\n<g id=\"node8\" class=\"node\">\n<title>_joke_prompt_inputs</title>\n<polygon fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\" points=\"89.98,-136.1 10.88,-136.1 10.88,-91.5 89.98,-91.5 89.98,-136.1\"/>\n<text text-anchor=\"start\" x=\"25.68\" y=\"-108\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">topic</text>\n<text text-anchor=\"start\" x=\"60.18\" y=\"-108\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">str</text>\n</g>\n<!-- _joke_prompt_inputs&#45;&gt;joke_prompt -->\n<g id=\"edge3\" class=\"edge\">\n<title>_joke_prompt_inputs&#45;&gt;joke_prompt</title>\n<path fill=\"none\" stroke=\"black\" d=\"M90.28,-113.8C96.25,-113.8 102.54,-113.8 108.87,-113.8\"/>\n<polygon fill=\"black\" stroke=\"black\" points=\"108.72,-117.3 118.72,-113.8 108.72,-110.3 108.72,-117.3\"/>\n</g>\n<!-- config -->\n<g id=\"node9\" class=\"node\">\n<title>config</title>\n<polygon fill=\"none\" stroke=\"black\" points=\"71.43,-366.8 23.43,-366.8 23.43,-330.8 77.43,-330.8 77.43,-360.8 71.43,-366.8\"/>\n<polyline fill=\"none\" stroke=\"black\" points=\"71.43,-366.8 71.43,-360.8\"/>\n<polyline fill=\"none\" stroke=\"black\" points=\"77.43,-360.8 71.43,-360.8\"/>\n<text text-anchor=\"middle\" x=\"50.43\" y=\"-343\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">config</text>\n</g>\n<!-- input -->\n<g id=\"node10\" class=\"node\">\n<title>input</title>\n<polygon fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\" points=\"77.43,-313.1 23.43,-313.1 23.43,-276.5 77.43,-276.5 77.43,-313.1\"/>\n<text text-anchor=\"middle\" x=\"50.43\" y=\"-289\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">input</text>\n</g>\n<!-- function -->\n<g id=\"node11\" class=\"node\">\n<title>function</title>\n<path fill=\"#b4d8e4\" stroke=\"black\" d=\"M72.85,-258.1C72.85,-258.1 28,-258.1 28,-258.1 22,-258.1 16,-252.1 16,-246.1 16,-246.1 16,-233.5 16,-233.5 16,-227.5 22,-221.5 28,-221.5 28,-221.5 72.85,-221.5 72.85,-221.5 78.85,-221.5 84.85,-227.5 84.85,-233.5 84.85,-233.5 84.85,-246.1 84.85,-246.1 84.85,-252.1 78.85,-258.1 72.85,-258.1\"/>\n<text text-anchor=\"middle\" x=\"50.43\" y=\"-234\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">function</text>\n</g>\n</g>\n</svg>\n",
297-
"text/plain": "<graphviz.graphs.Digraph at 0x141b09a90>"
301+
"text/plain": "<graphviz.graphs.Digraph at 0x1419b23a0>"
298302
},
299-
"execution_count": 146,
303+
"execution_count": 161,
300304
"metadata": {},
301305
"output_type": "execute_result"
302306
}
@@ -307,20 +311,20 @@
307311
"dr3 = (\n",
308312
" driver.Builder()\n",
309313
" .with_modules(joke, hello)\n",
310-
" .with_config({\"some_key\": \"some_value\"})\n",
314+
" .with_config(conf)\n",
311315
" .build()\n",
312316
" )\n",
313317
"dr3.display_all_functions()"
314318
],
315319
"metadata": {
316320
"collapsed": false,
317321
"ExecuteTime": {
318-
"end_time": "2024-02-12T00:10:16.866113Z",
319-
"start_time": "2024-02-12T00:10:16.568762Z"
322+
"end_time": "2024-02-12T07:14:42.774982Z",
323+
"start_time": "2024-02-12T07:14:42.185210Z"
320324
}
321325
},
322326
"id": "fb7135d8a7078a40",
323-
"execution_count": 146
327+
"execution_count": 161
324328
},
325329
{
326330
"cell_type": "code",

0 commit comments

Comments
 (0)