Skip to content

Commit 091859f

Browse files
authored
Merge pull request #27 from rushtehrani/chore/update-example
chore: Update Couler example
2 parents 0986d96 + 4e2b501 commit 091859f

1 file changed

Lines changed: 21 additions & 15 deletions

File tree

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 6,
5+
"execution_count": 1,
66
"metadata": {},
77
"outputs": [],
88
"source": [
9-
"import couler.argo as couler\n",
9+
"import couler.argo as argo\n",
1010
"from onepanel.couler import Submitter"
1111
]
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": 9,
15+
"execution_count": 2,
1616
"metadata": {},
1717
"outputs": [],
1818
"source": [
1919
"def job_a(message):\n",
20-
" couler.run_container(\n",
20+
" argo.run_container(\n",
2121
" image=\"docker/whalesay:latest\",\n",
2222
" command=[\"cowsay\"],\n",
2323
" args=[message],\n",
@@ -26,7 +26,7 @@
2626
"\n",
2727
"\n",
2828
"def job_b(message):\n",
29-
" couler.run_container(\n",
29+
" argo.run_container(\n",
3030
" image=\"docker/whalesay:latest\",\n",
3131
" command=[\"cowsay\"],\n",
3232
" args=[message],\n",
@@ -35,7 +35,7 @@
3535
"\n",
3636
"\n",
3737
"def job_c(message):\n",
38-
" couler.run_container(\n",
38+
" argo.run_container(\n",
3939
" image=\"docker/whalesay:latest\",\n",
4040
" command=[\"cowsay\"],\n",
4141
" args=[message],\n",
@@ -44,7 +44,7 @@
4444
"\n",
4545
"\n",
4646
"def job_d(message):\n",
47-
" couler.run_container(\n",
47+
" argo.run_container(\n",
4848
" image=\"docker/whalesay:latest\",\n",
4949
" command=[\"cowsay\"],\n",
5050
" args=[message],\n",
@@ -59,7 +59,7 @@
5959
"\n",
6060
"\n",
6161
"def dag():\n",
62-
" couler.dag(\n",
62+
" argo.dag(\n",
6363
" [\n",
6464
" [lambda: job_a(message=\"A\")],\n",
6565
" [lambda: job_a(message=\"A\"), lambda: job_b(message=\"B\")], # A -> B\n",
@@ -83,13 +83,13 @@
8383
"token = 'fba7ce2f2cb83546f0de74b6f8a134ec'\n",
8484
"host = 'https://app.example.com/api' # Onepanel API URL\n",
8585
"\n",
86-
"submitter = Submitter(workflow_name='couler', username=username, token=token, host)\n",
86+
"submitter = Submitter(workflow_name='python-defined-dag', username=username, token=token, host)\n",
8787
"```"
8888
]
8989
},
9090
{
9191
"cell_type": "code",
92-
"execution_count": 10,
92+
"execution_count": 3,
9393
"metadata": {},
9494
"outputs": [
9595
{
@@ -102,27 +102,33 @@
102102
}
103103
],
104104
"source": [
105-
"submitter = Submitter(workflow_name='couler')"
105+
"submitter = Submitter(workflow_name='python-defined-dag')"
106106
]
107107
},
108108
{
109109
"cell_type": "code",
110-
"execution_count": 11,
110+
"execution_count": 4,
111111
"metadata": {},
112112
"outputs": [
113113
{
114114
"name": "stderr",
115115
"output_type": "stream",
116116
"text": [
117-
"INFO:root:Workflow Template updated\n",
118117
"INFO:root:Workflow Executed\n"
119118
]
120119
}
121120
],
122121
"source": [
123122
"dag()\n",
124-
"couler.run(submitter)"
123+
"argo.run(submitter)"
125124
]
125+
},
126+
{
127+
"cell_type": "code",
128+
"execution_count": null,
129+
"metadata": {},
130+
"outputs": [],
131+
"source": []
126132
}
127133
],
128134
"metadata": {
@@ -146,4 +152,4 @@
146152
},
147153
"nbformat": 4,
148154
"nbformat_minor": 4
149-
}
155+
}

0 commit comments

Comments
 (0)