{
  "id": 148653,
  "title": "TPU Cannot use tf.py_function?? Or am I not writing the right code?",
  "url": "/competitions/alaska2-image-steganalysis/discussion/148653",
  "author_name": "",
  "post_date": "2020-05-05T05:31:53.213277200Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>TPU cannot use tf.py_function or tf.compat.v1.py_function</p>\n\n<p>GPU and CPU can be used. The error code is as follows:</p>\n\n<p>InvalidArgumentError: {{function_node __inference_distributed_function_375930}} Compilation failure: Detected unsupported operations when trying to compile graph cluster_distributed_function_14482497321879810660[] on XLA_TPU_JIT: EagerPyFunc (No registered 'EagerPyFunc' OpKernel for XLA_TPU_JIT devices compatible with node {{node metrics/auroc/EagerPyFunc}}\n    .  Registered:  \n){{node metrics/auroc/EagerPyFunc}}\n    TPU compilation failed\n     [[tpu_compile_succeeded_assert/_11161016022438046503/_5]]</p>",
  "messages": [
    {
      "id": "833861",
      "postDate": "05/05/2020 05:31:53",
      "content": "<p>TPU cannot use tf.py_function or tf.compat.v1.py_function</p>\n\n<p>GPU and CPU can be used. The error code is as follows:</p>\n\n<p>InvalidArgumentError: {{function_node __inference_distributed_function_375930}} Compilation failure: Detected unsupported operations when trying to compile graph cluster_distributed_function_14482497321879810660[] on XLA_TPU_JIT: EagerPyFunc (No registered 'EagerPyFunc' OpKernel for XLA_TPU_JIT devices compatible with node {{node metrics/auroc/EagerPyFunc}}\n    .  Registered:  \n){{node metrics/auroc/EagerPyFunc}}\n    TPU compilation failed\n     [[tpu_compile_succeeded_assert/_11161016022438046503/_5]]</p>",
      "rawMarkdown": "TPU cannot use tf.py_function or tf.compat.v1.py_function\n\nGPU and CPU can be used. The error code is as follows:\n\nInvalidArgumentError: {{function_node __inference_distributed_function_375930}} Compilation failure: Detected unsupported operations when trying to compile graph cluster_distributed_function_14482497321879810660[] on XLA_TPU_JIT: EagerPyFunc (No registered 'EagerPyFunc' OpKernel for XLA_TPU_JIT devices compatible with node {{node metrics/auroc/EagerPyFunc}}\n\t.  Registered:",
      "votes": null
    },
    {
      "id": "834040",
      "postDate": "05/05/2020 08:46:28",
      "content": "<p>Have you checked out <a href=\"https://github.com/tensorflow/tensorflow/issues/30818\">this issue</a>?</p>",
      "rawMarkdown": "Have you checked out [this issue](https://github.com/tensorflow/tensorflow/issues/30818)?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 834040,
      "author_name": "ipythonx",
      "author_url": "",
      "post_date": "05/05/2020 08:46:28",
      "content": "<p>Have you checked out <a href=\"https://github.com/tensorflow/tensorflow/issues/30818\">this issue</a>?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "833861": "TPU cannot use tf.py_function or tf.compat.v1.py_function\n\nGPU and CPU can be used. The error code is as follows:\n\nInvalidArgumentError: {{function_node __inference_distributed_function_375930}} Compilation failure: Detected unsupported operations when trying to compile graph cluster_distributed_function_14482497321879810660[] on XLA_TPU_JIT: EagerPyFunc (No registered 'EagerPyFunc' OpKernel for XLA_TPU_JIT devices compatible with node {{node metrics/auroc/EagerPyFunc}}\n\t.  Registered:",
    "834040": "Have you checked out [this issue](https://github.com/tensorflow/tensorflow/issues/30818)?"
  },
  "source": "meta"
}