Skip to content

Commit ed3817d

Browse files
authored
Undo tf.compat import (aws#286)
* Undo import of tf compat v1 * remove tf.compat import
1 parent ae8823d commit ed3817d

File tree

15 files changed

+15
-15
lines changed

15 files changed

+15
-15
lines changed

bin/sagemaker-containers/tensorflow/tf-train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22
import numpy as np
33
import sys
4-
import tensorflow.compat.v1 as tf
4+
import tensorflow as tf
55
import time
66
import uuid
77
from tornasole.tensorflow import TornasoleHook, TornasoleOptimizer, SaveConfig

examples/tensorflow/scripts/mnist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22
import numpy as np
33
import random
4-
import tensorflow.compat.v1 as tf
4+
import tensorflow as tf
55
import tornasole.tensorflow as ts
66

77
parser = argparse.ArgumentParser()

examples/tensorflow/scripts/simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import argparse
22
import numpy as np
3-
import tensorflow.compat.v1 as tf
3+
import tensorflow as tf
44
import tornasole.tensorflow as ts
55
import random
66

examples/tensorflow/scripts/train_imagenet_resnet_hvd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from builtins import range
3232
except ImportError:
3333
pass
34-
import tensorflow.compat.v1 as tf
34+
import tensorflow as tf
3535
import numpy as np
3636
from tensorflow.contrib.image.python.ops import distort_image_ops
3737
from tensorflow.python.ops import data_flow_ops

tests/tensorflow/hooks/test_estimator_modes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
import pytest
13-
import tensorflow.compat.v1 as tf
13+
import tensorflow as tf
1414
import numpy as np
1515
import shutil
1616
import os

tests/tensorflow/hooks/test_training_end.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .utils import *
22
from tornasole.tensorflow import reset_collections
3-
import tensorflow.compat.v1 as tf
3+
import tensorflow as tf
44
from tornasole.core.access_layer.utils import has_training_ended
55
import shutil
66
import os

tests/tensorflow/hooks/test_weights_gradients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .utils import *
22
from tornasole.tensorflow import reset_collections
3-
import tensorflow.compat.v1 as tf
3+
import tensorflow as tf
44
from tornasole.core.config_constants import TORNASOLE_DEFAULT_COLLECTIONS_FILE_NAME
55
from tornasole.core.json_config import TORNASOLE_CONFIG_FILE_PATH_ENV_STR
66
import tornasole.tensorflow as ts

tests/tensorflow/hooks/test_write.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tensorflow.compat.v1 as tf
1+
import tensorflow as tf
22
import numpy as np
33
from tornasole.tensorflow.hook import TornasoleHook
44
from tensorflow.python.tools import inspect_checkpoint as chkp

tests/tensorflow/hooks/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tensorflow.compat.v1 as tf
1+
import tensorflow as tf
22
import numpy as np
33
from datetime import datetime
44
import os

tests/tensorflow/test_tf_collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from tornasole.tensorflow import Collection, CollectionManager
2-
import tensorflow.compat.v1 as tf
2+
import tensorflow as tf
33

44

55
def test_manager_export_load():

tornasole/tensorflow/collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from tensorflow.python.distribute import values
2-
import tensorflow.compat.v1 as tf
2+
import tensorflow as tf
33
from tornasole.core.collection import Collection as BaseCollection, CollectionKeys
44
from tornasole.core.collection_manager import CollectionManager as BaseCollectionManager
55

tornasole/tensorflow/hook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tensorflow.compat.v1 as tf
1+
import tensorflow as tf
22
from .utils import *
33
from .reductions import get_tensorflow_reduction
44
from .collection import get_collection_manager

tornasole/tensorflow/optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tensorflow.compat.v1 as tf
1+
import tensorflow as tf
22
from .collection import *
33

44

tornasole/tensorflow/reductions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tensorflow.compat.v1 as tf
1+
import tensorflow as tf
22
from tornasole.core.reduction_config import ALLOWED_REDUCTIONS, ALLOWED_NORMS
33

44

tornasole/tensorflow/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tensorflow.compat.v1 as tf
1+
import tensorflow as tf
22

33

44
def node_name(n):

0 commit comments

Comments
 (0)