Skip to content

Upgrade scikit-image to v0.19.1#2005

Merged
rth merged 10 commits intopyodide:mainfrom
oeway:upgrade-scikit-image
Jan 6, 2022
Merged

Upgrade scikit-image to v0.19.1#2005
rth merged 10 commits intopyodide:mainfrom
oeway:upgrade-scikit-image

Conversation

@oeway
Copy link
Copy Markdown
Contributor

@oeway oeway commented Nov 28, 2021

Description

This PR upgrade the scikit-image package to v0.18.3.

Checklists

@rth
Copy link
Copy Markdown
Member

rth commented Nov 29, 2021

The blocker on updating scikit-image (and scikit-learn) was the outdated version of scipy we have #1464

What we could try, for instance, is to install scipy 0.17.1 locally with this version of scikit-image, see what test fails (pytest --pyargs skimage) and add backports for those if possible.

@rth rth mentioned this pull request Jan 3, 2022
@rth
Copy link
Copy Markdown
Member

rth commented Jan 3, 2022

I synced with main which should now have Scipy 1.7.3 thanks to Hood. Let's see if it builds now.

@rth
Copy link
Copy Markdown
Member

rth commented Jan 4, 2022

skimage/_shared/geometry.c:645:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~
1 warning and 1 error generated

looks like some patches (or possibly env variables) to avoid building with OpenMP are still needed.

"PYODIDE_ROOT",
"PYTHONINCLUDE",
"NUMPY_LIB",
"PYODIDE_PACKAGE_ABI",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It turns out the failure was because the fix I contributed upstream to scikit-image checked for the PYODIDE_PACKAGE_ABI variable, however, we deprecated it in favor of the PYODIDE. Re-adding that variable should fix the build.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's nice that #2053 made it more explicit which environment variables we are passing down, but it does lead to some pain working out what is going on.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed, I like that it's explicit now.

@rth rth changed the title Upgrade scikit-image to v0.18.3 Upgrade scikit-image to v0.19.1 Jan 4, 2022
@rth rth marked this pull request as ready for review January 4, 2022 23:33

### packages

- {{ Update }} Upgrade `scikit-image` to 0.19.1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- {{ Update }} Upgrade `scikit-image` to 0.19.1
- {{ Enhancement }} Upgrade `scikit-image` to 0.19.1

It looks like we are using enhancement badge for package update

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe it would make more sense to change them all to Update?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree. And I think we better rename Update tag to Upgrade or Version Up?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree we should indeed improve the changelog, I think it's simpler to just have a list, rather than an entry per package. Of course, major or long-awaited ones such as scipy still deserve their own changelog. For the rest I would rather spend time on some UI to list packages #977

@hoodmane
Copy link
Copy Markdown
Member

hoodmane commented Jan 5, 2022

Build failed with:

skimage/feature/brief_pythran.cpp:1:10: fatal error: 'pythonic/core.hpp' file not found
#include <pythonic/core.hpp>

@rth
Copy link
Copy Markdown
Member

rth commented Jan 5, 2022

Build should be OK now.

An issue is that since 2019 scikit-image has a hard dependency on tifffile which itself depends on imagecodecs which has around 25 codecs dependencies. Currently patching to avoid tifffile import, which means that TIFF format won't work.

Another issue is that Chrome tests for scikit-image timeout though I cannot reproduce this locally.

@rth
Copy link
Copy Markdown
Member

rth commented Jan 6, 2022

As far as I can tell it times out because scikit-image is quite large (23MB) and takes a while to load in CI. Locally it doesn't happen because of more CPU resources. This is in part due to it bundling image examples for skimage/data/ for around 7.6MB which will also be incompressible. So for now I'm going to skip Chrome as it was done before. A medium-term solution should be to add some mechanism to unvendor data files as a separate package (as we are doing for tests), possibly with some regex in meta.yaml.

@rth rth merged commit 4602ccf into pyodide:main Jan 6, 2022
@oeway
Copy link
Copy Markdown
Contributor Author

oeway commented Jan 7, 2022

@rth Great! thanks for taking care of this!

@ryanking13 ryanking13 mentioned this pull request Jun 23, 2022
2 tasks
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.

4 participants