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

Maximize pandas version to <2.0 as append is removed #343

Merged
merged 3 commits into from
May 11, 2023

Conversation

Kicksta
Copy link
Contributor

@Kicksta Kicksta commented May 4, 2023

AttributeError: 'DataFrame' object has no attribute 'append' is thrown. Pandas 2.0 has removed 'append' as of April 2023. Short term solution is to require pandas version to be below 2.0.

@Kicksta
Copy link
Contributor Author

Kicksta commented May 10, 2023

Have the merge errors for a new release been resolved or still giving issues?

@miriam-groeneveld miriam-groeneveld merged commit 0af0c1e into main May 11, 2023
@miriam-groeneveld miriam-groeneveld deleted the max_pandas_version branch May 11, 2023 06:30
@@ -137,7 +137,7 @@ class ImageIOLoader(ImageLoader):
@staticmethod
def load_image(fname):
with open(fname, "rb") as f:
with get_reader(f, mode="i", as_gray=True) as r:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was as_gray removed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member

@jmsmkn jmsmkn May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wasn't the migration advice to use mode="L" included too? That's probably not what we want either (https://pillow.readthedocs.io/en/stable/handbook/concepts.html#modes). We need to maintain the old behaviour of returning flattened 32-bit images. Is that what mode="i" does?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a call to function get_reader from image_io see: https://imageio.readthedocs.io/en/stable/reference/userapi.html#imageio.v2.get_reader
where mode is:
mode : {'i', 'I', 'v', 'V', '?'}
Used to give the reader a hint on what the user expects (default "?"):
"i" for an image, "I" for multiple images, "v" for a volume,
"V" for multiple volumes, "?" for don't care.

We don't/can't set the Pillow mode, And ImageIOLoader is only used in tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImageIOLoader is part of the public API (https://comic.github.io/evalutils/modules.html#evalutils.io.ImageIOLoader), challenge admins are able to use it in their own evaluation methods. We have to keep the return type the same!

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.

3 participants