Skip to content

Commit 81501cb

Browse files
authored
Merge pull request #90 from Azure-Samples/clean-up-branch
update the clean up resources files to use the same utils function
2 parents 6ba329f + b088955 commit 81501cb

File tree

15 files changed

+59
-78
lines changed

15 files changed

+59
-78
lines changed

labs/GPT-4o-inferencing/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
}
2726
],
@@ -41,7 +40,7 @@
4140
"name": "python",
4241
"nbconvert_exporter": "python",
4342
"pygments_lexer": "ipython3",
44-
"version": "3.13.1"
43+
"version": "3.12.8"
4544
}
4645
},
4746
"nbformat": 4,

labs/access-controlling/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
},
2726
{
@@ -69,7 +68,7 @@
6968
"name": "python",
7069
"nbconvert_exporter": "python",
7170
"pygments_lexer": "ipython3",
72-
"version": "3.13.1"
71+
"version": "3.12.8"
7372
}
7473
},
7574
"nbformat": 4,

labs/ai-foundry-sdk/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
}
2726
],
@@ -41,7 +40,7 @@
4140
"name": "python",
4241
"nbconvert_exporter": "python",
4342
"pygments_lexer": "ipython3",
44-
"version": "3.13.1"
43+
"version": "3.12.8"
4544
}
4645
},
4746
"nbformat": 4,

labs/built-in-logging/clean-up-resources.ipynb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"# type: ignore\n",
19-
"\n",
20-
"import os\n",
21-
"import sys\n",
18+
"import os, sys\n",
2219
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
23-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2421
"\n",
2522
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
26-
"resource_group_name = f\"lab-{deployment_name}\"\n",
27-
"\n",
28-
"cleanUpResources(deployment_name, resource_group_name)"
23+
"utils.cleanup_resources(deployment_name)"
2924
]
3025
}
3126
],
@@ -45,7 +40,7 @@
4540
"name": "python",
4641
"nbconvert_exporter": "python",
4742
"pygments_lexer": "ipython3",
48-
"version": "3.13.1"
43+
"version": "3.12.8"
4944
}
5045
},
5146
"nbformat": 4,

labs/content-filtering/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
}
2726
],
@@ -41,7 +40,7 @@
4140
"name": "python",
4241
"nbconvert_exporter": "python",
4342
"pygments_lexer": "ipython3",
44-
"version": "3.13.1"
43+
"version": "3.12.8"
4544
}
4645
},
4746
"nbformat": 4,

labs/function-calling/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
}
2726
],
@@ -41,7 +40,7 @@
4140
"name": "python",
4241
"nbconvert_exporter": "python",
4342
"pygments_lexer": "ipython3",
44-
"version": "3.13.1"
43+
"version": "3.12.8"
4544
}
4645
},
4746
"nbformat": 4,

labs/message-storing/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
}
2726
],
@@ -41,7 +40,7 @@
4140
"name": "python",
4241
"nbconvert_exporter": "python",
4342
"pygments_lexer": "ipython3",
44-
"version": "3.13.1"
43+
"version": "3.12.8"
4544
}
4645
},
4746
"nbformat": 4,

labs/model-routing/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
}
2726
],
@@ -41,7 +40,7 @@
4140
"name": "python",
4241
"nbconvert_exporter": "python",
4342
"pygments_lexer": "ipython3",
44-
"version": "3.13.1"
43+
"version": "3.12.8"
4544
}
4645
},
4746
"nbformat": 4,

labs/prompt-flow/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
}
2726
],
@@ -41,7 +40,7 @@
4140
"name": "python",
4241
"nbconvert_exporter": "python",
4342
"pygments_lexer": "ipython3",
44-
"version": "3.13.1"
43+
"version": "3.12.8"
4544
}
4645
},
4746
"nbformat": 4,

labs/response-streaming/clean-up-resources.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import os\n",
19-
"import sys\n",
18+
"import os, sys\n",
2019
"sys.path.insert(1, '../../shared') # add the shared directory to the Python path\n",
21-
"from functions import cleanUpResources\n",
20+
"import utils\n",
2221
"\n",
2322
"deployment_name = os.path.basename(os.path.dirname(globals()['__vsc_ipynb_file__']))\n",
24-
"cleanUpResources(deployment_name)"
23+
"utils.cleanup_resources(deployment_name)"
2524
]
2625
}
2726
],
@@ -41,7 +40,7 @@
4140
"name": "python",
4241
"nbconvert_exporter": "python",
4342
"pygments_lexer": "ipython3",
44-
"version": "3.13.1"
43+
"version": "3.12.8"
4544
}
4645
},
4746
"nbformat": 4,

0 commit comments

Comments
 (0)