Skip to content

Commit

Permalink
Avoid relative paths in tf notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
rishic3 committed Oct 23, 2024
1 parent 0fe696e commit 110c6f7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"id": "01162f42-0637-4dfe-8d7d-b577e4ffd017",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-10-03 17:38:52.548855: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
"2024-10-03 17:38:52.555529: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
"2024-10-03 17:38:52.563119: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
"2024-10-03 17:38:52.565499: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
"2024-10-03 17:38:52.571252: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
"2024-10-23 15:06:03.148933: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
"2024-10-23 15:06:03.156486: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
"2024-10-23 15:06:03.164237: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
"2024-10-23 15:06:03.166475: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
"2024-10-23 15:06:03.172837: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
"To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
"2024-10-03 17:38:52.894224: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n"
"2024-10-23 15:06:03.498973: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n"
]
}
],
Expand All @@ -51,7 +51,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"id": "9fa3e1b7-58cd-45f9-9fee-85f25a31c3c6",
"metadata": {},
"outputs": [
Expand All @@ -78,22 +78,22 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 10,
"id": "9326b072-a53c-40c4-a6cb-bd4d3d644d03",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"dataset_url = 'http://storage.googleapis.com/download.tensorflow.org/data/petfinder-mini.zip'\n",
"csv_file = 'datasets/petfinder-mini/petfinder-mini.csv'\n",
"\n",
"tf.keras.utils.get_file('petfinder_mini.zip', dataset_url,\n",
" extract=True, cache_dir='.')\n",
"dataframe = pd.read_csv(csv_file)"
"data_dir = tf.keras.utils.get_file('petfinder_mini.zip', dataset_url, extract=True)\n",
"data_dir = os.path.join(os.path.dirname(data_dir), 'petfinder-mini/petfinder-mini.csv')\n",
"dataframe = pd.read_csv(data_dir)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 11,
"id": "e98480ef-d13d-44c0-a227-e9a22f9bf2b0",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -253,7 +253,7 @@
"4 This handsome yet cute boy is up for adoption.... 3 2 "
]
},
"execution_count": 5,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"id": "76f0f5df-502f-444e-b2ee-1122e1dea870",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-10-03 17:43:56.140645: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
"2024-10-03 17:43:56.147227: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
"2024-10-03 17:43:56.154601: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
"2024-10-03 17:43:56.156763: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
"2024-10-03 17:43:56.162424: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
"2024-10-23 15:03:51.507387: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
"2024-10-23 15:03:51.515051: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
"2024-10-23 15:03:51.522806: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
"2024-10-23 15:03:51.525092: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
"2024-10-23 15:03:51.531528: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
"To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
"2024-10-03 17:43:56.485452: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n"
"2024-10-23 15:03:51.862292: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n"
]
}
],
Expand All @@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"id": "a364ad5f-b269-45b5-ab8b-d8f34fb642b7",
"metadata": {},
"outputs": [
Expand All @@ -72,7 +72,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"id": "57b1d71f",
"metadata": {},
"outputs": [],
Expand All @@ -89,32 +89,38 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"id": "d229c1b6-3967-46b5-9ea8-68f4b42dd211",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Downloading data from https://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz\n",
"\u001b[1m84125825/84125825\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m4s\u001b[0m 0us/step\n"
"Downloading data from https://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m84125825/84125825\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m1s\u001b[0m 0us/step\n"
]
}
],
"source": [
"url = \"https://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz\"\n",
"\n",
"dataset = tf.keras.utils.get_file(\n",
" \"aclImdb_v1\", url, untar=True, cache_dir=\".\", cache_subdir=\"\"\n",
" \"aclImdb_v1\", url, untar=True,\n",
")\n",
"\n",
"dataset_dir = os.path.join(os.path.dirname(dataset), \"aclImdb\")"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"id": "1f8038ae-8bc1-46bf-ae4c-6da08886c473",
"metadata": {},
"outputs": [
Expand All @@ -124,7 +130,7 @@
"['README', 'imdb.vocab', 'test', 'train', 'imdbEr.txt']"
]
},
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -135,7 +141,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"id": "12faaa3f-3441-4361-b9eb-4317e8c2c2f7",
"metadata": {},
"outputs": [
Expand All @@ -152,7 +158,7 @@
" 'unsup']"
]
},
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand Down

0 comments on commit 110c6f7

Please sign in to comment.