{
  "id": 144409,
  "title": "File system scheme '[local]' not implemented (file: '') ? Getting this error when trying to iterate on dataset",
  "url": "/competitions/flower-classification-with-tpus/discussion/144409",
  "author_name": "",
  "post_date": "2020-04-18T21:40:37.374582100Z",
  "votes": 3,
  "comment_count": 9,
  "views": 0,
  "content": "<p>Error seemingly comes out the blue</p>\n\n<p>I'm trying to iterate on  a .take() operation on a dataset I created and am getting this error:</p>\n\n<p><code>File system scheme '[local]' not implemented (file: '')</code></p>\n\n<p>I can do <code>data.take(3)</code> let's say and it returns 3 tensors, but when I do something like:</p>\n\n<p><code>for image, label in dataset.take(3):</code></p>\n\n<p>I get that error</p>",
  "messages": [
    {
      "id": "812639",
      "postDate": "04/18/2020 21:40:37",
      "content": "<p>Error seemingly comes out the blue</p>\n\n<p>I'm trying to iterate on  a .take() operation on a dataset I created and am getting this error:</p>\n\n<p><code>File system scheme '[local]' not implemented (file: '')</code></p>\n\n<p>I can do <code>data.take(3)</code> let's say and it returns 3 tensors, but when I do something like:</p>\n\n<p><code>for image, label in dataset.take(3):</code></p>\n\n<p>I get that error</p>",
      "rawMarkdown": "Error seemingly comes out the blue\n\nI'm trying to iterate on  a .take() operation on a dataset I created and am getting this error:\n\n`File system scheme '[local]' not implemented (file: '')`\n\nI can do `data.take(3)` let's say and it returns 3 tensors, but when I do something like:\n\n`for image, label in dataset.take(3):`\n\nI get that error",
      "votes": null
    },
    {
      "id": "814685",
      "postDate": "04/20/2020 21:33:00",
      "content": "<p>The dataset has to be loaded from GCS if you want to use it on TPU.\nUse KaggleDatasets().get_gcs_path() to get a GCS location for the dataset. See <a href=\"https://www.kaggle.com/docs/tpu\">kaggle.com/docs/tpu</a> documentation.</p>",
      "rawMarkdown": "The dataset has to be loaded from GCS if you want to use it on TPU.\nUse KaggleDatasets().get_gcs_path() to get a GCS location for the dataset. See [kaggle.com/docs/tpu](https://www.kaggle.com/docs/tpu) documentation.",
      "votes": null
    },
    {
      "id": "815936",
      "postDate": "04/22/2020 00:40:30",
      "content": "<p>that is actually how im loading the dataset in, I believe this error came from loading a saved model (which I did by commit saving, downloading the output, then uploading it back into the kernel). </p>\n\n<p>Ill update this if I can reproduce it when I return to training with a saved model.  </p>",
      "rawMarkdown": "that is actually how im loading the dataset in, I believe this error came from loading a saved model (which I did by commit saving, downloading the output, then uploading it back into the kernel). \n\nIll update this if I can reproduce it when I return to training with a saved model.",
      "votes": null
    },
    {
      "id": "817177",
      "postDate": "04/22/2020 23:06:02",
      "content": "<p>Yes, there is a problem currently with saving/loading in SavedModel format from the TPU to localhost.\nIt works in HD5 format though. The <a href=\"https://www.kaggle.com/mgornergoogle/five-flowers-with-keras-and-xception-on-tpu\">TPU getting started notebook</a> has an example.</p>",
      "rawMarkdown": "Yes, there is a problem currently with saving/loading in SavedModel format from the TPU to localhost.\nIt works in HD5 format though. The [TPU getting started notebook](https://www.kaggle.com/mgornergoogle/five-flowers-with-keras-and-xception-on-tpu) has an example.",
      "votes": null
    },
    {
      "id": "899263",
      "postDate": "06/24/2020 05:55:22",
      "content": "<p><a href=\"/mgornergoogle\">@mgornergoogle</a>  While doing KaggleDatasets().get_gcs_path() got below error:\nBackendError: Unexpected response from the service. Response: {'errors': ['Private datasets cannot be copied'], 'error': {'code': 7}, 'wasSuccessful': False}.\nIS there any way to upload in GCS in kaggle?</p>",
      "rawMarkdown": "mgornergoogle  While doing KaggleDatasets().get_gcs_path() got below error:\nBackendError: Unexpected response from the service. Response: {'errors': ['Private datasets cannot be copied'], 'error': {'code': 7}, 'wasSuccessful': False}.\nIS there any way to upload in GCS in kaggle?",
      "votes": null
    },
    {
      "id": "901665",
      "postDate": "06/25/2020 16:17:48",
      "content": "<p>Hi <a href=\"/a5bhowmik\">@a5bhowmik</a>! I'm looking into this for you, and was hoping you could clarify something for me. When you're getting this error, are you trying to use TPUs with a private dataset?</p>",
      "rawMarkdown": "Hi @a5bhowmik! I'm looking into this for you, and was hoping you could clarify something for me. When you're getting this error, are you trying to use TPUs with a private dataset?",
      "votes": null
    },
    {
      "id": "904388",
      "postDate": "06/27/2020 15:30:02",
      "content": "<p>Yes <a href=\"/jessemostipak\">@jessemostipak</a> . I am trying to use private tfrecords using TPU.</p>",
      "rawMarkdown": "Yes @jessemostipak . I am trying to use private tfrecords using TPU.",
      "votes": null
    },
    {
      "id": "907320",
      "postDate": "06/29/2020 21:12:35",
      "content": "<p>ah, that likely explains it - at this point in time TPUs are not set up to work with private datasets.</p>",
      "rawMarkdown": "ah, that likely explains it - at this point in time TPUs are not set up to work with private datasets.",
      "votes": null
    },
    {
      "id": "911677",
      "postDate": "07/01/2020 23:37:40",
      "content": "<p><a href=\"/a5bhowmik\">@a5bhowmik</a> good news - we've added the ability to work with private datasets and TPUs. you can check out <a href=\"https://www.kaggle.com/product-feedback/163416\">this post</a> for more information.</p>",
      "rawMarkdown": "a5bhowmik good news - we've added the ability to work with private datasets and TPUs. you can check out [this post](https://www.kaggle.com/product-feedback/163416) for more information.",
      "votes": null
    },
    {
      "id": "970322",
      "postDate": "08/14/2020 11:05:10",
      "content": "<p>Hi, Martin.<br>\nCould you help me. I stack with the same - tf. model cannot save to localhost:<br>\nif I use <code>save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')\nm.save('./model', options=save_locally) # saving in Tensorflow's \"saved model\" format</code> - I get error:</p>\n<blockquote>\n  <p>TypeError                                 Traceback (most recent call last)<br>\n   in <br>\n        9 # )<br>\n       10 <br>\n  ---&gt; 11 save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')<br>\n       12 m.save('./model', options=save_locally) # saving in Tensorflow's \"saved model\" format</p>\n</blockquote>\n<p>TypeError: <strong>init</strong>() got an unexpected keyword argument 'experimental_io_device'</p>\n<p>if I do<br>\n<code>served_function = m.call\ntf.saved_model.save(\n    m, \n    export_dir=\"./model\", \n    signatures={'serving_default': served_function}\n)</code> <br>\nthen - `/opt/conda/lib/python3.7/site-packages/tensorflow/python/eager/context.py in sync_executors(self)<br>\n    656     \"\"\"<br>\n    657     if self._context_handle:<br>\n--&gt; 658       pywrap_tfe.TFE_ContextSyncExecutors(self._context_handle)<br>\n    659     else:<br>\n    660       raise ValueError(\"Context is not initialized.\")</p>\n<p>UnimplementedError: File system scheme '[local]' not implemented (file: './model/variables/variables_temp_968a8eeeea6f43fabe08a7cfcfce1da9/part-00000-of-00001')`</p>\n<p>The last code worked yesterday</p>",
      "rawMarkdown": "Hi, Martin.\nCould you help me. I stack with the same - tf. model cannot save to localhost:\nif I use `save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')\nm.save('./model', options=save_locally) # saving in Tensorflow's \"saved model\" format ` - I get error:\n> TypeError                                 Traceback (most recent call last)\n<ipython-input-36-2cdd6dd37d34> in <module>\n      9 # )\n     10 \n---> 11 save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')\n     12 m.save('./model', options=save_locally) # saving in Tensorflow's \"saved model\" format\n\nTypeError: __init__() got an unexpected keyword argument 'experimental_io_device'\n\nif I do\n`served_function = m.call\ntf.saved_model.save(\n    m, \n    export_dir=\"./model\", \n    signatures={'serving_default': served_function}\n)` \nthen - `/opt/conda/lib/python3.7/site-packages/tensorflow/python/eager/context.py in sync_executors(self)\n    656     \"\"\"\n    657     if self._context_handle:\n--> 658       pywrap_tfe.TFE_ContextSyncExecutors(self._context_handle)\n    659     else:\n    660       raise ValueError(\"Context is not initialized.\")\n\nUnimplementedError: File system scheme '[local]' not implemented (file: './model/variables/variables_temp_968a8eeeea6f43fabe08a7cfcfce1da9/part-00000-of-00001')`\n\nThe last code worked yesterday",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 814685,
      "author_name": "mgorner",
      "author_url": "",
      "post_date": "04/20/2020 21:33:00",
      "content": "<p>The dataset has to be loaded from GCS if you want to use it on TPU.\nUse KaggleDatasets().get_gcs_path() to get a GCS location for the dataset. See <a href=\"https://www.kaggle.com/docs/tpu\">kaggle.com/docs/tpu</a> documentation.</p>",
      "votes": null,
      "replies": [
        {
          "id": 815936,
          "author_name": "rashanarshad",
          "author_url": "",
          "post_date": "04/22/2020 00:40:30",
          "content": "<p>that is actually how im loading the dataset in, I believe this error came from loading a saved model (which I did by commit saving, downloading the output, then uploading it back into the kernel). </p>\n\n<p>Ill update this if I can reproduce it when I return to training with a saved model.  </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 817177,
          "author_name": "mgorner",
          "author_url": "",
          "post_date": "04/22/2020 23:06:02",
          "content": "<p>Yes, there is a problem currently with saving/loading in SavedModel format from the TPU to localhost.\nIt works in HD5 format though. The <a href=\"https://www.kaggle.com/mgornergoogle/five-flowers-with-keras-and-xception-on-tpu\">TPU getting started notebook</a> has an example.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 970322,
          "author_name": "vmetenev",
          "author_url": "",
          "post_date": "08/14/2020 11:05:10",
          "content": "<p>Hi, Martin.<br>\nCould you help me. I stack with the same - tf. model cannot save to localhost:<br>\nif I use <code>save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')\nm.save('./model', options=save_locally) # saving in Tensorflow's \"saved model\" format</code> - I get error:</p>\n<blockquote>\n  <p>TypeError                                 Traceback (most recent call last)<br>\n   in <br>\n        9 # )<br>\n       10 <br>\n  ---&gt; 11 save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')<br>\n       12 m.save('./model', options=save_locally) # saving in Tensorflow's \"saved model\" format</p>\n</blockquote>\n<p>TypeError: <strong>init</strong>() got an unexpected keyword argument 'experimental_io_device'</p>\n<p>if I do<br>\n<code>served_function = m.call\ntf.saved_model.save(\n    m, \n    export_dir=\"./model\", \n    signatures={'serving_default': served_function}\n)</code> <br>\nthen - `/opt/conda/lib/python3.7/site-packages/tensorflow/python/eager/context.py in sync_executors(self)<br>\n    656     \"\"\"<br>\n    657     if self._context_handle:<br>\n--&gt; 658       pywrap_tfe.TFE_ContextSyncExecutors(self._context_handle)<br>\n    659     else:<br>\n    660       raise ValueError(\"Context is not initialized.\")</p>\n<p>UnimplementedError: File system scheme '[local]' not implemented (file: './model/variables/variables_temp_968a8eeeea6f43fabe08a7cfcfce1da9/part-00000-of-00001')`</p>\n<p>The last code worked yesterday</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 899263,
      "author_name": "a5bhowmik",
      "author_url": "",
      "post_date": "06/24/2020 05:55:22",
      "content": "<p><a href=\"/mgornergoogle\">@mgornergoogle</a>  While doing KaggleDatasets().get_gcs_path() got below error:\nBackendError: Unexpected response from the service. Response: {'errors': ['Private datasets cannot be copied'], 'error': {'code': 7}, 'wasSuccessful': False}.\nIS there any way to upload in GCS in kaggle?</p>",
      "votes": null,
      "replies": [
        {
          "id": 901665,
          "author_name": "jessemostipak",
          "author_url": "",
          "post_date": "06/25/2020 16:17:48",
          "content": "<p>Hi <a href=\"/a5bhowmik\">@a5bhowmik</a>! I'm looking into this for you, and was hoping you could clarify something for me. When you're getting this error, are you trying to use TPUs with a private dataset?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 904388,
          "author_name": "a5bhowmik",
          "author_url": "",
          "post_date": "06/27/2020 15:30:02",
          "content": "<p>Yes <a href=\"/jessemostipak\">@jessemostipak</a> . I am trying to use private tfrecords using TPU.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 907320,
          "author_name": "jessemostipak",
          "author_url": "",
          "post_date": "06/29/2020 21:12:35",
          "content": "<p>ah, that likely explains it - at this point in time TPUs are not set up to work with private datasets.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 911677,
          "author_name": "jessemostipak",
          "author_url": "",
          "post_date": "07/01/2020 23:37:40",
          "content": "<p><a href=\"/a5bhowmik\">@a5bhowmik</a> good news - we've added the ability to work with private datasets and TPUs. you can check out <a href=\"https://www.kaggle.com/product-feedback/163416\">this post</a> for more information.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "812639": "Error seemingly comes out the blue\n\nI'm trying to iterate on  a .take() operation on a dataset I created and am getting this error:\n\n`File system scheme '[local]' not implemented (file: '')`\n\nI can do `data.take(3)` let's say and it returns 3 tensors, but when I do something like:\n\n`for image, label in dataset.take(3):`\n\nI get that error",
    "814685": "The dataset has to be loaded from GCS if you want to use it on TPU.\nUse KaggleDatasets().get_gcs_path() to get a GCS location for the dataset. See [kaggle.com/docs/tpu](https://www.kaggle.com/docs/tpu) documentation.",
    "815936": "that is actually how im loading the dataset in, I believe this error came from loading a saved model (which I did by commit saving, downloading the output, then uploading it back into the kernel). \n\nIll update this if I can reproduce it when I return to training with a saved model.",
    "817177": "Yes, there is a problem currently with saving/loading in SavedModel format from the TPU to localhost.\nIt works in HD5 format though. The [TPU getting started notebook](https://www.kaggle.com/mgornergoogle/five-flowers-with-keras-and-xception-on-tpu) has an example.",
    "899263": "mgornergoogle  While doing KaggleDatasets().get_gcs_path() got below error:\nBackendError: Unexpected response from the service. Response: {'errors': ['Private datasets cannot be copied'], 'error': {'code': 7}, 'wasSuccessful': False}.\nIS there any way to upload in GCS in kaggle?",
    "901665": "Hi @a5bhowmik! I'm looking into this for you, and was hoping you could clarify something for me. When you're getting this error, are you trying to use TPUs with a private dataset?",
    "904388": "Yes @jessemostipak . I am trying to use private tfrecords using TPU.",
    "907320": "ah, that likely explains it - at this point in time TPUs are not set up to work with private datasets.",
    "911677": "a5bhowmik good news - we've added the ability to work with private datasets and TPUs. you can check out [this post](https://www.kaggle.com/product-feedback/163416) for more information.",
    "970322": "Hi, Martin.\nCould you help me. I stack with the same - tf. model cannot save to localhost:\nif I use `save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')\nm.save('./model', options=save_locally) # saving in Tensorflow's \"saved model\" format ` - I get error:\n> TypeError                                 Traceback (most recent call last)\n<ipython-input-36-2cdd6dd37d34> in <module>\n      9 # )\n     10 \n---> 11 save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')\n     12 m.save('./model', options=save_locally) # saving in Tensorflow's \"saved model\" format\n\nTypeError: __init__() got an unexpected keyword argument 'experimental_io_device'\n\nif I do\n`served_function = m.call\ntf.saved_model.save(\n    m, \n    export_dir=\"./model\", \n    signatures={'serving_default': served_function}\n)` \nthen - `/opt/conda/lib/python3.7/site-packages/tensorflow/python/eager/context.py in sync_executors(self)\n    656     \"\"\"\n    657     if self._context_handle:\n--> 658       pywrap_tfe.TFE_ContextSyncExecutors(self._context_handle)\n    659     else:\n    660       raise ValueError(\"Context is not initialized.\")\n\nUnimplementedError: File system scheme '[local]' not implemented (file: './model/variables/variables_temp_968a8eeeea6f43fabe08a7cfcfce1da9/part-00000-of-00001')`\n\nThe last code worked yesterday"
  },
  "source": "meta"
}