Skip to content

Commit af54e56

Browse files
NicolasHugdatumbox
andauthored
[FBcode->GH] Fix GRACE_HOPPER file internal discovery (#6719)
Co-authored-by: Vasilis Vryniotis <[email protected]>
1 parent 6e203b4 commit af54e56

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_models.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ def _get_image(input_shape, real_image, device):
4444
To do so, a keyword argument `real_image` was added to the abovelisted models in `_model_params`
4545
"""
4646
if real_image:
47-
GRACE_HOPPER = get_relative_path(
48-
os.path.dirname(os.path.realpath(__file__)), "test", "assets", "encode_jpeg", "grace_hopper_517x606.jpg"
47+
# TODO: Maybe unify file discovery logic with test_image.py
48+
GRACE_HOPPER = os.path.join(
49+
os.path.dirname(os.path.abspath(__file__)), "assets", "encode_jpeg", "grace_hopper_517x606.jpg"
4950
)
51+
5052
img = Image.open(GRACE_HOPPER)
5153

5254
original_width, original_height = img.size

0 commit comments

Comments
 (0)