Commit d0060ec4 authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

Remove compat.v2 import.

PiperOrigin-RevId: 354439331
parent 4a8191d6
...@@ -14,17 +14,13 @@ ...@@ -14,17 +14,13 @@
# ============================================================================== # ==============================================================================
"""Binary to generate training/evaluation dataset for NCF model.""" """Binary to generate training/evaluation dataset for NCF model."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json import json
# pylint: disable=g-bad-import-order # pylint: disable=g-bad-import-order
# Import libraries # Import libraries
from absl import app from absl import app
from absl import flags from absl import flags
import tensorflow.compat.v2 as tf import tensorflow as tf
# pylint: enable=g-bad-import-order # pylint: enable=g-bad-import-order
from official.recommendation import movielens from official.recommendation import movielens
......
...@@ -14,15 +14,10 @@ ...@@ -14,15 +14,10 @@
# ============================================================================== # ==============================================================================
"""NCF model input pipeline.""" """NCF model input pipeline."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools import functools
# pylint: disable=g-bad-import-order # pylint: disable=g-bad-import-order
import tensorflow as tf
import tensorflow.compat.v2 as tf
# pylint: enable=g-bad-import-order # pylint: enable=g-bad-import-order
from official.recommendation import constants as rconst from official.recommendation import constants as rconst
......
...@@ -18,10 +18,6 @@ The NeuMF model assembles both MF and MLP models under the NCF framework. Check ...@@ -18,10 +18,6 @@ The NeuMF model assembles both MF and MLP models under the NCF framework. Check
`neumf_model.py` for more details about the models. `neumf_model.py` for more details about the models.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json import json
import os import os
...@@ -30,7 +26,7 @@ import os ...@@ -30,7 +26,7 @@ import os
from absl import app from absl import app
from absl import flags from absl import flags
from absl import logging from absl import logging
import tensorflow.compat.v2 as tf import tensorflow as tf
# pylint: enable=g-bad-import-order # pylint: enable=g-bad-import-order
from official.common import distribute_utils from official.common import distribute_utils
......
...@@ -14,14 +14,9 @@ ...@@ -14,14 +14,9 @@
# ============================================================================== # ==============================================================================
"""Some gradient util functions to help users writing custom training loop.""" """Some gradient util functions to help users writing custom training loop."""
from __future__ import absolute_import
from __future__ import division
# from __future__ import google_type_annotations
from __future__ import print_function
from absl import logging from absl import logging
import tensorflow.compat.v2 as tf import tensorflow as tf
def _filter_grads(grads_and_vars): def _filter_grads(grads_and_vars):
......
...@@ -17,7 +17,7 @@ r"""Vision models export utility function for serving/inference.""" ...@@ -17,7 +17,7 @@ r"""Vision models export utility function for serving/inference."""
import os import os
import tensorflow.compat.v2 as tf import tensorflow as tf
from official.core import train_utils from official.core import train_utils
from official.vision.beta import configs from official.vision.beta import configs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment