|
1 | 1 | {
|
2 | 2 | "cells": [
|
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "##### Copyright 2022 The TensorFlow IO Authors." |
| 8 | + ] |
| 9 | + }, |
| 10 | + { |
| 11 | + "cell_type": "code", |
| 12 | + "execution_count": null, |
| 13 | + "metadata": {}, |
| 14 | + "outputs": [], |
| 15 | + "source": [ |
| 16 | + "#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n", |
| 17 | + "# you may not use this file except in compliance with the License.\n", |
| 18 | + "# You may obtain a copy of the License at\n", |
| 19 | + "#\n", |
| 20 | + "# https://www.apache.org/licenses/LICENSE-2.0\n", |
| 21 | + "#\n", |
| 22 | + "# Unless required by applicable law or agreed to in writing, software\n", |
| 23 | + "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", |
| 24 | + "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", |
| 25 | + "# See the License for the specific language governing permissions and\n", |
| 26 | + "# limitations under the License." |
| 27 | + ] |
| 28 | + }, |
3 | 29 | {
|
4 | 30 | "cell_type": "markdown",
|
5 | 31 | "id": "1f9e30da",
|
|
10 | 36 | "# DAOS Filesystem with Tensorflow (Using MNIST)"
|
11 | 37 | ]
|
12 | 38 | },
|
| 39 | + { |
| 40 | + "cell_type": "markdown", |
| 41 | + "metadata": {}, |
| 42 | + "source": [ |
| 43 | + "<table class=\"tfo-notebook-buttons\" align=\"left\">\n", |
| 44 | + " <td>\n", |
| 45 | + " <a target=\"_blank\" href=\"https://www.tensorflow.org/io/tutorials/daos\"><img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" />View on TensorFlow.org</a>\n", |
| 46 | + " </td>\n", |
| 47 | + " <td>\n", |
| 48 | + " <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/io/blob/master/docs/tutorials/daos.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n", |
| 49 | + " </td>\n", |
| 50 | + " <td>\n", |
| 51 | + " <a target=\"_blank\" href=\"https://github.com/tensorflow/io/blob/master/docs/tutorials/daos.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on GitHub</a>\n", |
| 52 | + " </td>\n", |
| 53 | + " <td>\n", |
| 54 | + " <a href=\"https://storage.googleapis.com/tensorflow_docs/io/docs/tutorials/daos.ipynb\"><img src=\"https://www.tensorflow.org/images/download_logo_32px.png\" />Download notebook</a>\n", |
| 55 | + " </td>\n", |
| 56 | + "</table>" |
| 57 | + ] |
| 58 | + }, |
13 | 59 | {
|
14 | 60 | "cell_type": "markdown",
|
15 | 61 | "id": "22b37505",
|
|
21 | 67 | "\n",
|
22 | 68 | "This tutorial shows how to use read and write files on [DAOS Filesystem](https://docs.daos.io/) with TensorFlow, through TensorFlow IO's DAOS file system integration.\n",
|
23 | 69 | "\n",
|
24 |
| - "A machine running DAOS natively or through a [docker emulator](https://github.com/daos-stack/daos/tree/master/utils/docker) is needed to run this tutorial and/or use the Tensorflow IO DAOS integration. The DAOS Pool and Container used for this tutorial will be created and deleted within this tutorial, where we will be training and testing a simple Neural Network on the MNIST Dataset loaded from the DAOS File System Plugin.\n", |
| 70 | + "A machine running DAOS natively or through a [docker emulator](https://github.com/daos-stack/daos/tree/master/utils/docker) is needed to run this tutorial and/or use the Tensorflow IO DAOS integration. The DAOS Pool and Container used for this tutorial will be created and deleted within this tutorial, where you will be training and testing a simple Neural Network on the MNIST Dataset loaded from the DAOS File System Plugin.\n", |
25 | 71 | "\n",
|
26 | 72 | "The pool and container id or label are part of the filename uri:\n",
|
27 | 73 | "```\n",
|
|
52 | 98 | },
|
53 | 99 | {
|
54 | 100 | "cell_type": "code",
|
55 |
| - "execution_count": null, |
| 101 | + "execution_count": 1, |
56 | 102 | "id": "5e35916b",
|
57 | 103 | "metadata": {
|
58 | 104 | "id": "5de1951509cb"
|
59 | 105 | },
|
60 |
| - "outputs": [], |
| 106 | + "outputs": [ |
| 107 | + { |
| 108 | + "name": "stdout", |
| 109 | + "output_type": "stream", |
| 110 | + "text": [ |
| 111 | + "Defaulting to user installation because normal site-packages is not writeable\n", |
| 112 | + "Requirement already satisfied: tensorflow-io in /home/omar/.local/lib/python3.8/site-packages (0.20.0)\n", |
| 113 | + "Requirement already satisfied: tensorflow<2.7.0,>=2.6.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow-io) (2.6.0)\n", |
| 114 | + "Requirement already satisfied: tensorflow-io-gcs-filesystem==0.20.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow-io) (0.20.0)\n", |
| 115 | + "Requirement already satisfied: gast==0.4.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (0.4.0)\n", |
| 116 | + "Requirement already satisfied: grpcio<2.0,>=1.37.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.39.0)\n", |
| 117 | + "Requirement already satisfied: protobuf>=3.9.2 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (3.17.3)\n", |
| 118 | + "Requirement already satisfied: tensorboard~=2.6 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (2.6.0)\n", |
| 119 | + "Requirement already satisfied: tensorflow-estimator~=2.6 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (2.6.0)\n", |
| 120 | + "Requirement already satisfied: typing-extensions~=3.7.4 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (3.7.4.3)\n", |
| 121 | + "Requirement already satisfied: termcolor~=1.1.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.1.0)\n", |
| 122 | + "Requirement already satisfied: wrapt~=1.12.1 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.12.1)\n", |
| 123 | + "Requirement already satisfied: google-pasta~=0.2 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (0.2.0)\n", |
| 124 | + "Requirement already satisfied: keras~=2.6 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (2.6.0)\n", |
| 125 | + "Requirement already satisfied: six~=1.15.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.15.0)\n", |
| 126 | + "Requirement already satisfied: numpy~=1.19.2 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.19.5)\n", |
| 127 | + "Requirement already satisfied: opt-einsum~=3.3.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (3.3.0)\n", |
| 128 | + "Requirement already satisfied: wheel~=0.35 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (0.37.0)\n", |
| 129 | + "Requirement already satisfied: astunparse~=1.6.3 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.6.3)\n", |
| 130 | + "Requirement already satisfied: absl-py~=0.10 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (0.13.0)\n", |
| 131 | + "Requirement already satisfied: keras-preprocessing~=1.1.2 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.1.2)\n", |
| 132 | + "Requirement already satisfied: h5py~=3.1.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (3.1.0)\n", |
| 133 | + "Requirement already satisfied: clang~=5.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (5.0)\n", |
| 134 | + "Requirement already satisfied: flatbuffers~=1.12.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.12)\n", |
| 135 | + "Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /home/omar/.local/lib/python3.8/site-packages (from tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (0.4.6)\n", |
| 136 | + "Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.8.0)\n", |
| 137 | + "Requirement already satisfied: markdown>=2.6.8 in /home/omar/.local/lib/python3.8/site-packages (from tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (3.3.4)\n", |
| 138 | + "Requirement already satisfied: google-auth<2,>=1.6.3 in /home/omar/.local/lib/python3.8/site-packages (from tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.35.0)\n", |
| 139 | + "Requirement already satisfied: setuptools>=41.0.0 in /usr/lib/python3/dist-packages (from tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (45.2.0)\n", |
| 140 | + "Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /home/omar/.local/lib/python3.8/site-packages (from tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (0.6.1)\n", |
| 141 | + "Requirement already satisfied: requests<3,>=2.21.0 in /usr/lib/python3/dist-packages (from tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (2.22.0)\n", |
| 142 | + "Requirement already satisfied: werkzeug>=0.11.15 in /home/omar/.local/lib/python3.8/site-packages (from tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (2.0.1)\n", |
| 143 | + "Requirement already satisfied: pyasn1-modules>=0.2.1 in /home/omar/.local/lib/python3.8/site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (0.2.8)\n", |
| 144 | + "Requirement already satisfied: rsa<5,>=3.1.4 in /home/omar/.local/lib/python3.8/site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (4.7.2)\n", |
| 145 | + "Requirement already satisfied: cachetools<5.0,>=2.0.0 in /home/omar/.local/lib/python3.8/site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (4.2.2)\n", |
| 146 | + "Requirement already satisfied: requests-oauthlib>=0.7.0 in /home/omar/.local/lib/python3.8/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (1.3.0)\n", |
| 147 | + "Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/omar/.local/lib/python3.8/site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (0.4.8)\n", |
| 148 | + "Requirement already satisfied: oauthlib>=3.0.0 in /usr/lib/python3/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.6->tensorflow<2.7.0,>=2.6.0->tensorflow-io) (3.1.0)\n", |
| 149 | + "\u001b[33mWARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.\n", |
| 150 | + "You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n" |
| 151 | + ] |
| 152 | + } |
| 153 | + ], |
61 | 154 | "source": [
|
62 | 155 | "try:\n",
|
63 | 156 | " %tensorflow_version 2.x \n",
|
|
79 | 172 | },
|
80 | 173 | {
|
81 | 174 | "cell_type": "code",
|
82 |
| - "execution_count": null, |
| 175 | + "execution_count": 1, |
83 | 176 | "id": "79528fed",
|
84 | 177 | "metadata": {
|
85 | 178 | "id": "fb83b02da201"
|
86 | 179 | },
|
87 |
| - "outputs": [], |
| 180 | + "outputs": [ |
| 181 | + { |
| 182 | + "name": "stdout", |
| 183 | + "output_type": "stream", |
| 184 | + "text": [ |
| 185 | + "/usr/bin/sh: 1: dmg: not found\n", |
| 186 | + "/usr/bin/sh: 1: daos: not found\n" |
| 187 | + ] |
| 188 | + } |
| 189 | + ], |
88 | 190 | "source": [
|
89 | 191 | "!dmg -i pool create -s 500M TEST_POOL\n",
|
90 | 192 | "!daos cont create --pool=TEST_POOL --type=POSIX TEST_CONT"
|
|
128 | 230 | },
|
129 | 231 | "outputs": [],
|
130 | 232 | "source": [
|
131 |
| - "dfs_url = \"dfs://TEST_POOL/TEST_CONT/\" # This the path we'll be using to load and access the dataset\n", |
| 233 | + "dfs_url = \"dfs://TEST_POOL/TEST_CONT/\" # This the path you'll be using to load and access the dataset\n", |
132 | 234 | "pwd = !pwd\n",
|
133 | 235 | "posix_url = pwd[0] + \"/tests/test_dfs/\""
|
134 | 236 | ]
|
|
162 | 264 | "id": "b40e9a30808c"
|
163 | 265 | },
|
164 | 266 | "source": [
|
165 |
| - "Copying the Data from the POSIX Filesystem to the DAOS Filesystem under the pool and container we just created" |
| 267 | + "Copying the Data from the POSIX Filesystem to the DAOS Filesystem under the pool and container you just created" |
166 | 268 | ]
|
167 | 269 | },
|
168 | 270 | {
|
|
270 | 372 | "id": "4129e8e2c1b4"
|
271 | 373 | },
|
272 | 374 | "source": [
|
273 |
| - "Compiling the model we just built" |
| 375 | + "Compiling the model you just built" |
274 | 376 | ]
|
275 | 377 | },
|
276 | 378 | {
|
|
467 | 569 | "kernelspec": {
|
468 | 570 | "display_name": "Python 3",
|
469 | 571 | "name": "python3"
|
| 572 | + }, |
| 573 | + "language_info": { |
| 574 | + "codemirror_mode": { |
| 575 | + "name": "ipython", |
| 576 | + "version": 3 |
| 577 | + }, |
| 578 | + "file_extension": ".py", |
| 579 | + "mimetype": "text/x-python", |
| 580 | + "name": "python", |
| 581 | + "nbconvert_exporter": "python", |
| 582 | + "pygments_lexer": "ipython3", |
| 583 | + "version": "3.8.10" |
470 | 584 | }
|
471 | 585 | },
|
472 | 586 | "nbformat": 4,
|
|
0 commit comments