#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from .model import KerasModel
from .estimator import TFEstimator
from .tf_optimizer import TFOptimizer
from .tf_dataset import TFDataset
from .zoo_optimizer import ZooOptimizer
from .tf_predictor import TFPredictor
from .tfnet import TFNet

@@ -584,16 +584,1072 @@
 nse.%0A#%0A%0A
+%0Adef check_tf_version():%0A    import logging%0A    try:%0A        import tensorflow as tf%0A    except Exception as e:%0A        raise RuntimeError(%22Importing TensorFlow failed, please install tensorflow 1.15.0.%22, e)%0A%0A    v_str = tf.__version__%0A    major, minor, patch = v_str.split(%22.%22)%0A    if v_str != %221.15.0%22:%0A        if int(major) == 1:%0A            logging.warning(%22%5Cn######################### WARNING ##########################%5Cn%22%0A                            %22%5CnAnalytics Zoo TFPark has only been tested on TensorFlow 1.15.0,%22%0A                            %22 but your current TensorFlow installation is %7B%7D.%22.format(v_str) +%0A                            %22%5CnYou may encounter some version incompatibility issues. %22%0A                            %22%5Cn##############################################################%22)%0A        else:%0A            message = %22Currently Analytics Zoo TFPark only supports TensorFlow 1.15.0, %22 + %5C%0A                      %22but your current TensorFlow installation is %7B%7D%22.format(v_str)%0A            raise RuntimeError(message)%0A%0Acheck_tf_version()%0A%0A
 from .mo

Add tensorflow version check (#2459)