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

Fix flaky ray nightly image test #2493

Merged
merged 4 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ torch>=1.10.0
torchaudio
torchtext
torchvision>=0.10.1
transformers>=4.10.1
transformers>=4.10.1,<4.22
spacy>=2.3
PyYAML>=3.12
absl-py
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