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

Pin version of Pillow to 8.2.0 to circumvent non-compatibility with numpy #8278

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

baijumeswani
Copy link
Contributor

Description: Latest Pillow release 8.3.0 introduced a regression which causes build failures in our CI pipeline:

Traceback (most recent call last):
  File "orttraining_test_ortmodule_poc.py", line 211, in <module>
    main()
  File "orttraining_test_ortmodule_poc.py", line 188, in main
    total_training_time += train(args, model, device, optimizer, my_loss, train_loader, epoch)
  File "orttraining_test_ortmodule_poc.py", line 36, in train
    for iteration, (data, target) in enumerate(train_loader):
  File "/opt/python/cp38-cp38/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/opt/python/cp38-cp38/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 561, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/opt/python/cp38-cp38/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/python/cp38-cp38/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/python/cp38-cp38/lib/python3.8/site-packages/torchvision/datasets/mnist.py", line 134, in __getitem__
    img = self.transform(img)
  File "/opt/python/cp38-cp38/lib/python3.8/site-packages/torchvision/transforms/transforms.py", line 60, in __call__
    img = t(img)
  File "/opt/python/cp38-cp38/lib/python3.8/site-packages/torchvision/transforms/transforms.py", line 97, in __call__
    return F.to_tensor(pic)
  File "/opt/python/cp38-cp38/lib/python3.8/site-packages/torchvision/transforms/functional.py", line 129, in to_tensor
    np.array(pic, mode_to_nptype.get(pic.mode, np.uint8), copy=True)
TypeError: __array__() takes 1 positional argument but 2 were given

Pin version of Pillow to 8.2.0 for now until the issue python-pillow/Pillow#5571 is resolved.

@baijumeswani baijumeswani requested a review from a team as a code owner July 2, 2021 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants