|
53 | 53 | "outputs": [
|
54 | 54 | {
|
55 | 55 | "data": {
|
56 |
| - "text/plain": "<torch._C.Generator at 0x1218c0b70>" |
| 56 | + "text/plain": "<torch._C.Generator at 0x1193eb430>" |
57 | 57 | },
|
58 | 58 | "execution_count": 2,
|
59 | 59 | "metadata": {},
|
|
132 | 132 | "text": [
|
133 | 133 | "Extracting ../data/MNIST/raw/train-labels-idx1-ubyte.gz to ../data/MNIST/raw\n",
|
134 | 134 | "\n",
|
135 |
| - "Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz\n", |
| 135 | + "Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz\n" |
| 136 | + ] |
| 137 | + }, |
| 138 | + { |
| 139 | + "name": "stderr", |
| 140 | + "output_type": "stream", |
| 141 | + "text": [ |
| 142 | + "15.9%" |
| 143 | + ] |
| 144 | + }, |
| 145 | + { |
| 146 | + "name": "stdout", |
| 147 | + "output_type": "stream", |
| 148 | + "text": [ |
136 | 149 | "Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz to ../data/MNIST/raw/t10k-images-idx3-ubyte.gz\n"
|
137 | 150 | ]
|
138 | 151 | },
|
|
276 | 289 | }
|
277 | 290 | },
|
278 | 291 | "outputs": [
|
279 |
| - { |
280 |
| - "name": "stderr", |
281 |
| - "output_type": "stream", |
282 |
| - "text": [ |
283 |
| - "2022-12-07 17:00:23.979857: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA\n", |
284 |
| - "To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n" |
285 |
| - ] |
286 |
| - }, |
287 | 292 | {
|
288 | 293 | "name": "stdout",
|
289 | 294 | "output_type": "stream",
|
|
388 | 393 | "name": "#%%\n"
|
389 | 394 | }
|
390 | 395 | },
|
391 |
| - "outputs": [], |
| 396 | + "outputs": [ |
| 397 | + { |
| 398 | + "name": "stderr", |
| 399 | + "output_type": "stream", |
| 400 | + "text": [ |
| 401 | + "/Users/george/PycharmProjects/TileDB-ML/.venv/lib/python3.9/site-packages/tiledb/ctx.py:410: UserWarning: tiledb.default_ctx and scope_ctx will not function correctly due to bug in IPython contextvar support. You must supply a Ctx object to each function for custom configuration options. Please consider upgrading to ipykernel >= 6!Please see https://github.com/TileDB-Inc/TileDB-Py/issues/667 for more information.\n", |
| 402 | + " warnings.warn(\n" |
| 403 | + ] |
| 404 | + } |
| 405 | + ], |
392 | 406 | "source": [
|
393 | 407 | "uri = os.path.join(data_home, 'pytorch-mnist-1')\n",
|
394 | 408 | "tiledb_model_1 = PyTorchTileDBModel(uri=uri, model=network, optimizer=optimizer)\n",
|
395 | 409 | "\n",
|
396 |
| - "tiledb_model_1.save(update=False,\n", |
397 |
| - " meta={'epochs': epochs,\n", |
| 410 | + "tiledb_model_1.save(meta={'epochs': epochs,\n", |
398 | 411 | " 'train_loss': train_losses},\n",
|
399 | 412 | " summary_writer=writer)"
|
400 | 413 | ]
|
|
438 | 451 | ")\n",
|
439 | 452 | "Key: TILEDB_ML_MODEL_PYTHON_VERSION, Value: 3.9.9\n",
|
440 | 453 | "Key: TILEDB_ML_MODEL_STAGE, Value: STAGING\n",
|
| 454 | + "Key: TILEDB_ML_MODEL_VERSION, Value: \n", |
441 | 455 | "Key: epochs, Value: 1\n",
|
442 |
| - "Key: model_state_dict_size, Value: 90053\n", |
443 |
| - "Key: optimizer_state_dict_size, Value: 90064\n", |
| 456 | + "Key: model_size, Value: 90053\n", |
| 457 | + "Key: optimizer_size, Value: 90064\n", |
444 | 458 | "Key: tensorboard_size, Value: 22674\n",
|
445 | 459 | "Key: train_loss, Value: (2.358812093734741, 2.285137891769409, 2.3066349029541016, 2.2708795070648193, 2.2367401123046875, 2.24334716796875, 2.1832549571990967, 2.1485116481781006, 2.1049115657806396, 2.0044069290161133, 1.8622523546218872, 1.8843708038330078, 1.7973158359527588, 1.6879109144210815, 1.508046269416809, 1.764279842376709, 1.4700727462768555, 1.3514467477798462, 1.2905819416046143, 1.0177571773529053, 1.042162299156189, 1.0987662076950073, 1.2285516262054443, 1.1495932340621948, 0.8452475070953369, 0.9741130471229553, 0.8569056987762451, 0.9234588146209717, 1.0218565464019775, 0.8069543242454529, 0.8789511919021606, 0.8185049891471863, 0.8055434226989746, 0.8231522440910339, 0.8543609976768494, 0.7746452689170837, 0.718348503112793, 0.5433375239372253, 0.7593768239021301, 0.65492182970047, 0.6999298930168152, 0.8053513765335083, 0.790733814239502, 0.7599329948425293, 0.540409505367279, 0.6412327885627747, 0.6593738198280334)\n"
|
446 | 460 | ]
|
|
492 | 506 | ")\n",
|
493 | 507 | "Key: TILEDB_ML_MODEL_PYTHON_VERSION, Value: 3.9.9\n",
|
494 | 508 | "Key: TILEDB_ML_MODEL_STAGE, Value: STAGING\n",
|
| 509 | + "Key: TILEDB_ML_MODEL_VERSION, Value: \n", |
495 | 510 | "Key: epochs, Value: 1\n",
|
496 |
| - "Key: model_state_dict_size, Value: 90053\n", |
| 511 | + "Key: model_size, Value: 90053\n", |
497 | 512 | "Key: new_meta, Value: [\"Any kind of info\"]\n",
|
498 |
| - "Key: optimizer_state_dict_size, Value: 90064\n", |
| 513 | + "Key: optimizer_size, Value: 90064\n", |
499 | 514 | "Key: tensorboard_size, Value: 22674\n",
|
500 | 515 | "Key: train_loss, Value: (2.358812093734741, 2.285137891769409, 2.3066349029541016, 2.2708795070648193, 2.2367401123046875, 2.24334716796875, 2.1832549571990967, 2.1485116481781006, 2.1049115657806396, 2.0044069290161133, 1.8622523546218872, 1.8843708038330078, 1.7973158359527588, 1.6879109144210815, 1.508046269416809, 1.764279842376709, 1.4700727462768555, 1.3514467477798462, 1.2905819416046143, 1.0177571773529053, 1.042162299156189, 1.0987662076950073, 1.2285516262054443, 1.1495932340621948, 0.8452475070953369, 0.9741130471229553, 0.8569056987762451, 0.9234588146209717, 1.0218565464019775, 0.8069543242454529, 0.8789511919021606, 0.8185049891471863, 0.8055434226989746, 0.8231522440910339, 0.8543609976768494, 0.7746452689170837, 0.718348503112793, 0.5433375239372253, 0.7593768239021301, 0.65492182970047, 0.6999298930168152, 0.8053513765335083, 0.790733814239502, 0.7599329948425293, 0.540409505367279, 0.6412327885627747, 0.6593738198280334)\n"
|
501 | 516 | ]
|
|
669 | 684 | "number of fragments: 2\n",
|
670 | 685 | "\n",
|
671 | 686 | "===== FRAGMENT NUMBER 0 =====\n",
|
672 |
| - "fragment uri: file:///Users/george/PycharmProjects/TileDB-ML/examples/data/pytorch-mnist-1/__fragments/__1670425246498_1670425246498_5ca20757611a43009e22606647ee9b22_16\n", |
673 |
| - "timestamp range: (1670425246498, 1670425246498)\n", |
| 687 | + "fragment uri: file:///Users/george/PycharmProjects/TileDB-ML/examples/data/pytorch-mnist-1/__fragments/__1675169603990_1675169603990_aae704a1499649fe8ad3fd0e61d8f9b9_16\n", |
| 688 | + "timestamp range: (1675169603990, 1675169603990)\n", |
674 | 689 | "number of unconsolidated metadata: 2\n",
|
675 | 690 | "version: 16\n",
|
676 | 691 | "\n",
|
677 | 692 | "===== FRAGMENT NUMBER 1 =====\n",
|
678 |
| - "fragment uri: file:///Users/george/PycharmProjects/TileDB-ML/examples/data/pytorch-mnist-1/__fragments/__1670425278236_1670425278236_8e60255a3abe4173b21458369995c20c_16\n", |
679 |
| - "timestamp range: (1670425278236, 1670425278236)\n", |
| 693 | + "fragment uri: file:///Users/george/PycharmProjects/TileDB-ML/examples/data/pytorch-mnist-1/__fragments/__1675169635431_1675169635431_e064ef7a982e45a1be7bb678d1949b97_16\n", |
| 694 | + "timestamp range: (1675169635431, 1675169635431)\n", |
680 | 695 | "number of unconsolidated metadata: 2\n",
|
681 | 696 | "version: 16\n"
|
682 | 697 | ]
|
|
692 | 707 | "\n",
|
693 | 708 | "# and update\n",
|
694 | 709 | "tiledb_model_1 = PyTorchTileDBModel(uri=uri, model=network, optimizer=optimizer)\n",
|
695 |
| - "tiledb_model_1.save(update=True, \n", |
696 |
| - " meta={'epochs': epochs,\n", |
| 710 | + "tiledb_model_1.save(meta={'epochs': epochs,\n", |
697 | 711 | " 'train_loss': train_losses})\n",
|
698 | 712 | "\n",
|
699 | 713 | "# Check array directory\n",
|
|
845 | 859 | "uri2 = os.path.join(data_home, 'pytorch-mnist-2')\n",
|
846 | 860 | "tiledb_model_2 = PyTorchTileDBModel(uri=uri2, model=network, optimizer=optimizer)\n",
|
847 | 861 | "\n",
|
848 |
| - "tiledb_model_2.save(update=False, \n", |
849 |
| - " meta={'epochs': epochs,\n", |
| 862 | + "tiledb_model_2.save(meta={'epochs': epochs,\n", |
850 | 863 | " 'train_loss': train_losses})"
|
851 | 864 | ]
|
852 | 865 | },
|
|
0 commit comments