{
  "id": 156234,
  "title": "accessing data on gcs from tpu machines for tf2",
  "url": "/competitions/deepfake-detection-challenge/discussion/156234",
  "author_name": "armen",
  "post_date": "2020-06-05T03:10:53.798000",
  "votes": 0,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I'm trying to load model weights for a tf2 model from google cloud storage. The storage is not public.</p>\n\n<p>I can connect to my gcs on the non-tpu machines (with a credentials file), and I can upload/download files, but when I'm trying to load model weights stored on gcs from a tpu machine I receive error code 401, anonymous user does not have credentials. </p>\n\n<p>I have seen a topic discussing this for tf1.x but since then it looks like configure_gcs() has moved to tfio and changed signature. It now needs a \"machine name\" which I'm guessing should be the tpu machine name. (it's an optional parameter, but leaving it un-specified, still gives the 401 error, which I'm guessing is because it's giving access to the local machine calling it, rather than the tpu machine holding the tf model). Anyone has experience doing this?</p>",
  "messages": [
    {
      "id": 874474,
      "postDate": "2020-06-05T03:10:53.797Z",
      "content": "<p>I'm trying to load model weights for a tf2 model from google cloud storage. The storage is not public.</p>\n\n<p>I can connect to my gcs on the non-tpu machines (with a credentials file), and I can upload/download files, but when I'm trying to load model weights stored on gcs from a tpu machine I receive error code 401, anonymous user does not have credentials. </p>\n\n<p>I have seen a topic discussing this for tf1.x but since then it looks like configure_gcs() has moved to tfio and changed signature. It now needs a \"machine name\" which I'm guessing should be the tpu machine name. (it's an optional parameter, but leaving it un-specified, still gives the 401 error, which I'm guessing is because it's giving access to the local machine calling it, rather than the tpu machine holding the tf model). Anyone has experience doing this?</p>",
      "rawMarkdown": "I'm trying to load model weights for a tf2 model from google cloud storage. The storage is not public.\n\nI can connect to my gcs on the non-tpu machines (with a credentials file), and I can upload/download files, but when I'm trying to load model weights stored on gcs from a tpu machine I receive error code 401, anonymous user does not have credentials. \n\nI have seen a topic discussing this for tf1.x but since then it looks like configure_gcs() has moved to tfio and changed signature. It now needs a \"machine name\" which I'm guessing should be the tpu machine name. (it's an optional parameter, but leaving it un-specified, still gives the 401 error, which I'm guessing is because it's giving access to the local machine calling it, rather than the tpu machine holding the tf model). Anyone has experience doing this?"
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "874474": "I'm trying to load model weights for a tf2 model from google cloud storage. The storage is not public.\n\nI can connect to my gcs on the non-tpu machines (with a credentials file), and I can upload/download files, but when I'm trying to load model weights stored on gcs from a tpu machine I receive error code 401, anonymous user does not have credentials. \n\nI have seen a topic discussing this for tf1.x but since then it looks like configure_gcs() has moved to tfio and changed signature. It now needs a \"machine name\" which I'm guessing should be the tpu machine name. (it's an optional parameter, but leaving it un-specified, still gives the 401 error, which I'm guessing is because it's giving access to the local machine calling it, rather than the tpu machine holding the tf model). Anyone has experience doing this?"
  }
}