Skip to content

Commit

Permalink
fix tf compat
Browse files Browse the repository at this point in the history
  • Loading branch information
tiankongdeguiji committed Dec 7, 2023
1 parent 3f50c66 commit 219e21e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion easy_rec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@

logging.basicConfig(
level=logging.INFO, format='[%(asctime)s][%(levelname)s] %(message)s')

if tf.__version__ >= '2.0':
tf = tf.compat.v1

tf.logging.set_verbosity(tf.logging.INFO)

# Avoid import tensorflow which conflicts with the version used in EasyRecProcessor
if 'PROCESSOR_TEST' not in os.environ:
if platform.system() == 'Linux':
ops_dir = os.path.join(curr_dir, 'python/ops')
import tensorflow as tf
if 'PAI' in tf.__version__:
ops_dir = os.path.join(ops_dir, '1.12_pai')
elif tf.__version__.startswith('1.12'):
Expand Down
2 changes: 1 addition & 1 deletion easy_rec/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- encoding:utf-8 -*-
# Copyright (c) Alibaba, Inc. and its affiliates.
__version__ = '0.7.6'
__version__ = '0.7.7'

0 comments on commit 219e21e

Please sign in to comment.