|
54 | 54 | }, |
55 | 55 | { |
56 | 56 | "cell_type": "code", |
57 | | - "execution_count": null, |
| 57 | + "execution_count": 2, |
58 | 58 | "id": "1224b921-17e3-49fd-8abb-63459eeb2c28", |
59 | 59 | "metadata": {}, |
60 | 60 | "outputs": [], |
|
117 | 117 | }, |
118 | 118 | { |
119 | 119 | "cell_type": "code", |
120 | | - "execution_count": null, |
| 120 | + "execution_count": 3, |
121 | 121 | "id": "305807f8-0205-481a-9d71-e8b88b504019", |
122 | 122 | "metadata": {}, |
123 | | - "outputs": [], |
| 123 | + "outputs": [ |
| 124 | + { |
| 125 | + "name": "stdout", |
| 126 | + "output_type": "stream", |
| 127 | + "text": [ |
| 128 | + "Container with id 'vectorstore' created\n", |
| 129 | + "Container with id 'vectorcache' created\n" |
| 130 | + ] |
| 131 | + } |
| 132 | + ], |
124 | 133 | "source": [ |
125 | 134 | "db = cosmos_client.create_database_if_not_exists(cosmos_database)\n", |
126 | 135 | "\n", |
|
197 | 206 | }, |
198 | 207 | { |
199 | 208 | "cell_type": "code", |
200 | | - "execution_count": null, |
| 209 | + "execution_count": 4, |
201 | 210 | "id": "7ccf697d-f12c-4205-8a93-114ff3c3c86e", |
202 | 211 | "metadata": {}, |
203 | 212 | "outputs": [], |
|
227 | 236 | }, |
228 | 237 | { |
229 | 238 | "cell_type": "code", |
230 | | - "execution_count": null, |
| 239 | + "execution_count": 7, |
231 | 240 | "id": "efc296c5-82e3-4fc1-bff5-ea62893341f8", |
232 | 241 | "metadata": {}, |
233 | | - "outputs": [], |
| 242 | + "outputs": [ |
| 243 | + { |
| 244 | + "data": { |
| 245 | + "text/plain": [ |
| 246 | + "4489" |
| 247 | + ] |
| 248 | + }, |
| 249 | + "execution_count": 7, |
| 250 | + "metadata": {}, |
| 251 | + "output_type": "execute_result" |
| 252 | + } |
| 253 | + ], |
234 | 254 | "source": [ |
235 | 255 | "# Unzip the data file\n", |
236 | 256 | "with zipfile.ZipFile(\"../../DataSet/Movies/MovieLens-4489-256D.zip\", 'r') as zip_ref: \n", |
237 | | - " zip_ref.extractall(\"/Data\")\n", |
| 257 | + " zip_ref.extractall(\"../../DataSet/Movies/\")\n", |
238 | 258 | "zip_ref.close()\n", |
239 | 259 | "# Load the data file\n", |
240 | 260 | "data =[]\n", |
241 | | - "with open('/Data/MovieLens-4489-256D.json', 'r') as d:\n", |
| 261 | + "with open('../../DataSet/Movies/MovieLens-4489-256D.json', 'r') as d:\n", |
242 | 262 | " data = json.load(d)\n", |
243 | 263 | "# View the number of documents in the data (4489)\n", |
244 | 264 | "len(data) " |
|
255 | 275 | }, |
256 | 276 | { |
257 | 277 | "cell_type": "code", |
258 | | - "execution_count": null, |
| 278 | + "execution_count": 8, |
259 | 279 | "id": "f4555af4-cf1e-483f-a6e0-1d27fc139c8b", |
260 | 280 | "metadata": {}, |
261 | 281 | "outputs": [], |
|
267 | 287 | }, |
268 | 288 | { |
269 | 289 | "cell_type": "code", |
270 | | - "execution_count": null, |
| 290 | + "execution_count": 9, |
271 | 291 | "id": "becc3ad5-851c-4d44-8f6d-52a368d87b83", |
272 | 292 | "metadata": {}, |
273 | | - "outputs": [], |
| 293 | + "outputs": [ |
| 294 | + { |
| 295 | + "name": "stdout", |
| 296 | + "output_type": "stream", |
| 297 | + "text": [ |
| 298 | + "Starting doc load, please wait...\n", |
| 299 | + "Sent 100 documents for insertion into collection.\n", |
| 300 | + "Sent 200 documents for insertion into collection.\n", |
| 301 | + "Sent 300 documents for insertion into collection.\n", |
| 302 | + "Sent 400 documents for insertion into collection.\n", |
| 303 | + "Sent 500 documents for insertion into collection.\n", |
| 304 | + "Sent 600 documents for insertion into collection.\n", |
| 305 | + "Sent 700 documents for insertion into collection.\n", |
| 306 | + "Sent 800 documents for insertion into collection.\n", |
| 307 | + "Sent 900 documents for insertion into collection.\n", |
| 308 | + "Sent 1000 documents for insertion into collection.\n", |
| 309 | + "Sent 1100 documents for insertion into collection.\n", |
| 310 | + "Sent 1200 documents for insertion into collection.\n", |
| 311 | + "Sent 1300 documents for insertion into collection.\n", |
| 312 | + "Sent 1400 documents for insertion into collection.\n", |
| 313 | + "Sent 1500 documents for insertion into collection.\n", |
| 314 | + "Sent 1600 documents for insertion into collection.\n", |
| 315 | + "Sent 1700 documents for insertion into collection.\n", |
| 316 | + "Sent 1800 documents for insertion into collection.\n", |
| 317 | + "Sent 1900 documents for insertion into collection.\n", |
| 318 | + "Sent 2000 documents for insertion into collection.\n", |
| 319 | + "Sent 2100 documents for insertion into collection.\n", |
| 320 | + "Sent 2200 documents for insertion into collection.\n", |
| 321 | + "Sent 2300 documents for insertion into collection.\n", |
| 322 | + "Sent 2400 documents for insertion into collection.\n", |
| 323 | + "Sent 2500 documents for insertion into collection.\n", |
| 324 | + "Sent 2600 documents for insertion into collection.\n", |
| 325 | + "Sent 2700 documents for insertion into collection.\n", |
| 326 | + "Sent 2800 documents for insertion into collection.\n", |
| 327 | + "Sent 2900 documents for insertion into collection.\n", |
| 328 | + "Sent 3000 documents for insertion into collection.\n", |
| 329 | + "Sent 3100 documents for insertion into collection.\n", |
| 330 | + "Sent 3200 documents for insertion into collection.\n", |
| 331 | + "Sent 3300 documents for insertion into collection.\n", |
| 332 | + "Sent 3400 documents for insertion into collection.\n", |
| 333 | + "Sent 3500 documents for insertion into collection.\n", |
| 334 | + "Sent 3600 documents for insertion into collection.\n", |
| 335 | + "Sent 3700 documents for insertion into collection.\n", |
| 336 | + "Sent 3800 documents for insertion into collection.\n", |
| 337 | + "Sent 3900 documents for insertion into collection.\n", |
| 338 | + "Sent 4000 documents for insertion into collection.\n", |
| 339 | + "Sent 4100 documents for insertion into collection.\n", |
| 340 | + "Sent 4200 documents for insertion into collection.\n", |
| 341 | + "Sent 4300 documents for insertion into collection.\n", |
| 342 | + "Sent 4400 documents for insertion into collection.\n", |
| 343 | + "All 4489 documents inserted!\n", |
| 344 | + "Time taken: 92.83 seconds (92.834 milliseconds)\n" |
| 345 | + ] |
| 346 | + } |
| 347 | + ], |
274 | 348 | "source": [ |
275 | 349 | "import asyncio\n", |
276 | 350 | "import time\n", |
|
623 | 697 | "name": "python", |
624 | 698 | "nbconvert_exporter": "python", |
625 | 699 | "pygments_lexer": "ipython3", |
626 | | - "version": "3.12.2" |
| 700 | + "version": "3.11.0" |
627 | 701 | } |
628 | 702 | }, |
629 | 703 | "nbformat": 4, |
|
0 commit comments