Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit ebb54cc

Browse files
Vooblincopybara-github
authored andcommitted
Merge of PR #1698
PiperOrigin-RevId: 268729413
1 parent bade297 commit ebb54cc

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

tensor2tensor/utils/checkpoint_compatibility_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141

4242

4343
def get_data_dir():
44-
pkg = os.path.abspath(__file__)
45-
pkg, _ = os.path.split(pkg)
44+
pkg, _ = os.path.split(__file__)
4645
pkg, _ = os.path.split(pkg)
4746
return os.path.join(pkg, "test_data")
4847

tensor2tensor/utils/hparams_lib_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class HparamsLibTest(tf.test.TestCase):
3030

3131
def testCreateHparamsFromJson(self):
3232
# Get json_path
33-
pkg = os.path.abspath(__file__)
34-
pkg, _ = os.path.split(pkg)
33+
pkg, _ = os.path.split(__file__)
3534
pkg, _ = os.path.split(pkg)
3635
json_path = os.path.join(
3736
pkg, "test_data", "transformer_test_ckpt", "hparams.json")

tensor2tensor/utils/trainer_lib_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ def body(args, mb=model.body):
147147

148148
def testCreateHparams(self):
149149
# Get json_path
150-
pkg = os.path.abspath(__file__)
151-
pkg, _ = os.path.split(pkg)
150+
pkg, _ = os.path.split(__file__)
152151
pkg, _ = os.path.split(pkg)
153152
json_path = os.path.join(
154153
pkg, "test_data", "transformer_test_ckpt", "hparams.json")

0 commit comments

Comments
 (0)