Skip to content

Commit 70e20e4

Browse files
committed
improve logging
1 parent 9a7d18f commit 70e20e4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/model/management.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ def load_model_from_directory(directory: str,
175175
custom_objects=custom_objects,
176176
compile=compile)
177177
except (TypeError, ValueError) as err:
178-
logging.error("Error loading model. Attempting to convert the "
179-
"model to the new format.")
178+
logging.error(err)
179+
logging.error("Error loading model. Attempting to convert the model to the new format.")
180180

181181
# Convert the old model to the new format
182182
model = _convert_old_model_to_new(model_file, custom_objects,

src/setup/environment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ def setup_environment(config: Config) -> tf.distribute.Strategy:
113113
# Initialize the strategy
114114
strategy = initialize_strategy(config["use_float32"], active_gpus)
115115

116+
# print tensorflow and keras versions
117+
logging.info("TensorFlow version:", tf.__version__)
118+
logging.info("Keras version:", tf.keras.__version__)
119+
116120
return strategy
117121

118122

0 commit comments

Comments
 (0)