Support Keras via TensorFlow
Since TF includes Keras, there's no need to install it as a separate package.
@@ -5,9 +5,13 @@ import numpy as np
import wandb
import sys
from importlib import import_module
-import keras
from itertools import chain
+try:
+ import keras
import keras.backend as K
+except ImportError:
+ import tensorflow.keras as keras
+ import tensorflow.keras.backend as K
class WandbCallback(keras.callbacks.Callback):
