Skip to content

Commit

Permalink
Fix flaky ray nightly image test (#2493) (#2511)
Browse files Browse the repository at this point in the history
Co-authored-by: Arnav Garg <[email protected]>
  • Loading branch information
tgaddair and arnavgarg1 authored Sep 16, 2022
1 parent 2b66e19 commit 502aa1a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion ludwig/features/image_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _read_image_if_bytes_obj_and_resize(
if isinstance(img_entry, bytes):
img = read_image_from_bytes_obj(img_entry, num_channels)
elif isinstance(img_entry, np.ndarray):
img = torch.from_numpy(img_entry).permute(2, 0, 1)
img = torch.from_numpy(np.array(img_entry, copy=True)).permute(2, 0, 1)
else:
img = img_entry

Expand Down
3 changes: 0 additions & 3 deletions tests/integration_tests/test_ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ def test_ray_audio(tmpdir, dataset_type, ray_cluster_2cpu):
@pytest.mark.parametrize("dataset_type", ["csv", "parquet", "pandas+numpy_images"])
@pytest.mark.distributed
def test_ray_image(tmpdir, dataset_type, ray_cluster_2cpu):
if _ray_nightly and dataset_type == "pandas+numpy_images":
pytest.skip("https://github.com/ludwig-ai/ludwig/issues/2452")

image_dest_folder = os.path.join(tmpdir, "generated_images")
input_features = [
image_feature(
Expand Down

0 comments on commit 502aa1a

Please sign in to comment.