DeepOBS icon indicating copy to clipboard operation
DeepOBS copied to clipboard

Upgrade to tf2

Open FelixBenning opened this issue 3 years ago • 0 comments

An attempt to upgrade deepOBS tensorflow to 2.0

  • [x] run tf_upgrade_v2 script on deepobs (cf. https://www.tensorflow.org/guide/upgrade), commit 5550bea

  • [x] try to fix errors in reports.txt with replacements from tfa and apparent aliases from tf (e.g. tf.keras.layers.Flatten()(x) for tf.contrib.layers.flatten(x)) (commits dec400b ed0b72a cc5e9d8)

  • [x] inspect warnings

  • [x] run tf_upgrade_v2 script on tests - no issues (commit 3082d1f)

    output (0 issues that require attention)
    INFO line 33:4: Renamed 'tf.reset_default_graph' to 'tf.compat.v1.reset_default_graph'
    INFO line 48:9: Renamed 'tf.Session' to 'tf.compat.v1.Session'
    INFO line 25:4: Renamed 'tf.reset_default_graph' to 'tf.compat.v1.reset_default_graph'
    INFO line 40:9: Renamed 'tf.Session' to 'tf.compat.v1.Session'
    INFO line 69:8: Renamed 'tf.reset_default_graph' to 'tf.compat.v1.reset_default_graph'
    INFO line 96:21: Renamed 'tf.ConfigProto' to 'tf.compat.v1.ConfigProto'
    INFO line 98:21: Renamed 'tf.ConfigProto' to 'tf.compat.v1.ConfigProto'
    INFO line 100:18: Added keywords to args of function 'tf.reduce_mean'
    INFO line 101:13: Renamed 'tf.Session' to 'tf.compat.v1.Session'
    INFO line 102:21: Renamed 'tf.global_variables_initializer' to 'tf.compat.v1.global_variables_initializer'
    INFO line 153:63: Renamed 'tf.trainable_variables' to 'tf.compat.v1.trainable_variables'
    TensorFlow 2.0 Upgrade Script
    -----------------------------
    Converted 9 files
    Detected 0 issues that require attention
    --------------------------------------------------------------------------------
    
    
    Make sure to read the detailed log 'report_tests.txt'
    
    logfile
    ensorFlow 2.0 Upgrade Script
    ----------------------------
    onverted 9 files
    etected 0 issues that require attention
    -------------------------------------------------------------------------------
    ===============================================================================
    etailed log follows:
    
    ===============================================================================
    ===============================================================================
    nput tree: 'tests'
    ===============================================================================
    -------------------------------------------------------------------------------
    rocessing file 'tests\\check_image_datasets.py'
    outputting to 'tests\\check_image_datasets.py'
    -------------------------------------------------------------------------------
    
    
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    rocessing file 'tests\\check_image_datasets_old.py'
    outputting to 'tests\\check_image_datasets_old.py'
    -------------------------------------------------------------------------------
    
    3:4: INFO: Renamed 'tf.reset_default_graph' to 'tf.compat.v1.reset_default_graph'
    8:9: INFO: Renamed 'tf.Session' to 'tf.compat.v1.Session'
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    rocessing file 'tests\\check_text_datasets.py'
    outputting to 'tests\\check_text_datasets.py'
    -------------------------------------------------------------------------------
    
    5:4: INFO: Renamed 'tf.reset_default_graph' to 'tf.compat.v1.reset_default_graph'
    0:9: INFO: Renamed 'tf.Session' to 'tf.compat.v1.Session'
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    rocessing file 'tests\\test_testproblems.py'
    outputting to 'tests\\test_testproblems.py'
    -------------------------------------------------------------------------------
    
    9:8: INFO: Renamed 'tf.reset_default_graph' to 'tf.compat.v1.reset_default_graph'
    6:21: INFO: Renamed 'tf.ConfigProto' to 'tf.compat.v1.ConfigProto'
    8:21: INFO: Renamed 'tf.ConfigProto' to 'tf.compat.v1.ConfigProto'
    00:18: INFO: Added keywords to args of function 'tf.reduce_mean'
    01:13: INFO: Renamed 'tf.Session' to 'tf.compat.v1.Session'
    02:21: INFO: Renamed 'tf.global_variables_initializer' to 'tf.compat.v1.global_variables_initializer'
    53:63: INFO: Renamed 'tf.trainable_variables' to 'tf.compat.v1.trainable_variables'
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    rocessing file 'tests\\__init__.py'
    outputting to 'tests\\__init__.py'
    -------------------------------------------------------------------------------
    
    
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    rocessing file 'tests\\pytorch\\testproblems\\test_quadratic_deep.py'
    outputting to 'tests\\pytorch\\testproblems\\test_quadratic_deep.py'
    -------------------------------------------------------------------------------
    
    
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    rocessing file 'tests\\utils\\utils_number_of_parameters.py'
    outputting to 'tests\\utils\\utils_number_of_parameters.py'
    -------------------------------------------------------------------------------
    
    
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    rocessing file 'tests\\utils\\utils_tests.py'
    outputting to 'tests\\utils\\utils_tests.py'
    -------------------------------------------------------------------------------
    
    
    -------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------
    rocessing file 'tests\\utils\\__init__.py'
    outputting to 'tests\\utils\\__init__.py'
    -------------------------------------------------------------------------------
    
    
    -------------------------------------------------------------------------------
    
    
  • [ ] run unit tests

FelixBenning avatar Jun 14 '21 11:06 FelixBenning