Skip to content

Commit

Permalink
[FBcode->GH] Fix GRACE_HOPPER file internal discovery (#6719)
Browse files Browse the repository at this point in the history
Co-authored-by: Vasilis Vryniotis <[email protected]>
  • Loading branch information
NicolasHug and datumbox authored Oct 10, 2022
1 parent 6e203b4 commit af54e56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ def _get_image(input_shape, real_image, device):
To do so, a keyword argument `real_image` was added to the abovelisted models in `_model_params`
"""
if real_image:
GRACE_HOPPER = get_relative_path(
os.path.dirname(os.path.realpath(__file__)), "test", "assets", "encode_jpeg", "grace_hopper_517x606.jpg"
# TODO: Maybe unify file discovery logic with test_image.py
GRACE_HOPPER = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "assets", "encode_jpeg", "grace_hopper_517x606.jpg"
)

img = Image.open(GRACE_HOPPER)

original_width, original_height = img.size
Expand Down

0 comments on commit af54e56

Please sign in to comment.