prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add nightly tests for windows/macos
  Currently we only test our nightlies on linux:
  https://github.com/tensorflow/addons/blob/master/.travis.yml#L17
  
  It should be relatively simple to enable tests for macos/windows, with the one caveat that `tf-nightly` is not published for windows. 
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `tensorflow_addons/losses/__init__.py`
  Content:
  ```
  1 # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 # ==============================================================================
  15 """Additional losses that conform to Keras API."""
  16 
  17 from __future__ import absolute_import
  18 from __future__ import division
  19 from __future__ import print_function
  20 
  21 from tensorflow_addons.losses.contrastive import contrastive_loss, ContrastiveLoss
  22 from tensorflow_addons.losses.focal_loss import sigmoid_focal_crossentropy, SigmoidFocalCrossEntropy
  23 from tensorflow_addons.losses.giou_loss import giou_loss, GIoULoss
  24 from tensorflow_addons.losses.lifted import lifted_struct_loss, LiftedStructLoss
  25 from tensorflow_addons.losses.npairs import npairs_loss, NpairsLoss, npairs_multilabel_loss, NpairsMultilabelLoss
  26 from tensorflow_addons.losses.sparsemax_loss import sparsemax_loss, SparsemaxLoss
  27 from tensorflow_addons.losses.triplet import triplet_semihard_loss, TripletSemiHardLoss
  28
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/tensorflow_addons/losses/__init__.py b/tensorflow_addons/losses/__init__.py
  --- a/tensorflow_addons/losses/__init__.py
  +++ b/tensorflow_addons/losses/__init__.py
  @@ -22,6 +22,11 @@
   from tensorflow_addons.losses.focal_loss import sigmoid_focal_crossentropy, SigmoidFocalCrossEntropy
   from tensorflow_addons.losses.giou_loss import giou_loss, GIoULoss
   from tensorflow_addons.losses.lifted import lifted_struct_loss, LiftedStructLoss
  -from tensorflow_addons.losses.npairs import npairs_loss, NpairsLoss, npairs_multilabel_loss, NpairsMultilabelLoss
   from tensorflow_addons.losses.sparsemax_loss import sparsemax_loss, SparsemaxLoss
   from tensorflow_addons.losses.triplet import triplet_semihard_loss, TripletSemiHardLoss
  +
  +# Temporarily disable for windows
  +# Remove after: https://github.com/tensorflow/addons/issues/838
  +import os
  +if os.name != 'nt':
  +    from tensorflow_addons.losses.npairs import npairs_loss, NpairsLoss, npairs_multilabel_loss, NpairsMultilabelLoss
  
verification_info: {"golden_diff": "diff --git a/tensorflow_addons/losses/__init__.py b/tensorflow_addons/losses/__init__.py\n--- a/tensorflow_addons/losses/__init__.py\n+++ b/tensorflow_addons/losses/__init__.py\n@@ -22,6 +22,11 @@\n from tensorflow_addons.losses.focal_loss import sigmoid_focal_crossentropy, SigmoidFocalCrossEntropy\n from tensorflow_addons.losses.giou_loss import giou_loss, GIoULoss\n from tensorflow_addons.losses.lifted import lifted_struct_loss, LiftedStructLoss\n-from tensorflow_addons.losses.npairs import npairs_loss, NpairsLoss, npairs_multilabel_loss, NpairsMultilabelLoss\n from tensorflow_addons.losses.sparsemax_loss import sparsemax_loss, SparsemaxLoss\n from tensorflow_addons.losses.triplet import triplet_semihard_loss, TripletSemiHardLoss\n+\n+# Temporarily disable for windows\n+# Remove after: https://github.com/tensorflow/addons/issues/838\n+import os\n+if os.name != 'nt':\n+    from tensorflow_addons.losses.npairs import npairs_loss, NpairsLoss, npairs_multilabel_loss, NpairsMultilabelLoss\n", "issue": "Add nightly tests for windows/macos\nCurrently we only test our nightlies on linux:\r\nhttps://github.com/tensorflow/addons/blob/master/.travis.yml#L17\r\n\r\nIt should be relatively simple to enable tests for macos/windows, with the one caveat that `tf-nightly` is not published for windows. \n", "before_files": [{"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Additional losses that conform to Keras API.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom tensorflow_addons.losses.contrastive import contrastive_loss, ContrastiveLoss\nfrom tensorflow_addons.losses.focal_loss import sigmoid_focal_crossentropy, SigmoidFocalCrossEntropy\nfrom tensorflow_addons.losses.giou_loss import giou_loss, GIoULoss\nfrom tensorflow_addons.losses.lifted import lifted_struct_loss, LiftedStructLoss\nfrom tensorflow_addons.losses.npairs import npairs_loss, NpairsLoss, npairs_multilabel_loss, NpairsMultilabelLoss\nfrom tensorflow_addons.losses.sparsemax_loss import sparsemax_loss, SparsemaxLoss\nfrom tensorflow_addons.losses.triplet import triplet_semihard_loss, TripletSemiHardLoss\n", "path": "tensorflow_addons/losses/__init__.py"}], "after_files": [{"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Additional losses that conform to Keras API.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom tensorflow_addons.losses.contrastive import contrastive_loss, ContrastiveLoss\nfrom tensorflow_addons.losses.focal_loss import sigmoid_focal_crossentropy, SigmoidFocalCrossEntropy\nfrom tensorflow_addons.losses.giou_loss import giou_loss, GIoULoss\nfrom tensorflow_addons.losses.lifted import lifted_struct_loss, LiftedStructLoss\nfrom tensorflow_addons.losses.sparsemax_loss import sparsemax_loss, SparsemaxLoss\nfrom tensorflow_addons.losses.triplet import triplet_semihard_loss, TripletSemiHardLoss\n\n# Temporarily disable for windows\n# Remove after: https://github.com/tensorflow/addons/issues/838\nimport os\nif os.name != 'nt':\n    from tensorflow_addons.losses.npairs import npairs_loss, NpairsLoss, npairs_multilabel_loss, NpairsMultilabelLoss\n", "path": "tensorflow_addons/losses/__init__.py"}]}