-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
Have the merge errors for a new release been resolved or still giving issues? |
@@ -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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
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.