Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FBcode->GH] Fix GRACE_HOPPER file internal discovery #6719

Merged
merged 3 commits into from
Oct 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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