Skip to content

Fix tifffile and __array_function__ failures in our CI - #3992

Merged
sciunto merged 5 commits into
scikit-image:masterfrom
jni:ci-failures
Jul 9, 2019
Merged

sciunto merged 5 commits into
scikit-image:masterfrom
jni:ci-failures

Conversation

@jni

@jni jni commented Jul 6, 2019

Copy link
Copy Markdown
Member

Description

Fixes #3985 #3991

  • Use new key keyword argument in Tifffile to replace pages
  • Use np.amin and np.amax instead of min and max to ensure compatibility between NumPy 1.17 (with default __array_function__ protocol) and various versions of dask.

Checklist

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.
  • Consider backporting the PR with @meeseeksdev backport to v0.14.x

@hmaarrfk

hmaarrfk commented Jul 6, 2019

Copy link
Copy Markdown
Member

Seems like amin is the correct function in either case.

@jni

jni commented Jul 7, 2019

Copy link
Copy Markdown
Member Author

@cgohlke

Does return tifffile.imread(fname, **kwargs) not work?

I'm not sure, as I didn't write that plugin. Could it be that the plugin predates that function? Anyway I'll give it a try, thanks!

with testing.raises(ValueError):
pad(arr, 4, mode='mean', reflect_type='odd')

@testing.skipif(LooseVersion(np.__version__) >= LooseVersion('1.17'),

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.

You could just remove this test entirely

@jni

jni commented Jul 7, 2019

Copy link
Copy Markdown
Member Author

Why on earth is Travis failing now??? Same crap as before, but now with numpy.amin, which should work!

@jni

jni commented Jul 7, 2019

Copy link
Copy Markdown
Member Author

@jni

jni commented Jul 7, 2019

Copy link
Copy Markdown
Member Author

Hmmm I misinterpreted what the problem was with dask. np.amin was itself not implemented in dask. Here's the fix:

https://github.com/dask/dask/pull/5043/files

Merged in dask master. I guess I'll go back to using the min/max methods for now.

@jni

jni commented Jul 7, 2019

Copy link
Copy Markdown
Member Author

... But I don't understand why it fixed appveyor and my local env... =\

@jni

jni commented Jul 7, 2019

Copy link
Copy Markdown
Member Author

@hmaarrfk regarding removal of the test... Sure but there's a bigger operation hiding there. We should remove our own "wrapper" of pad and crop. I'll just leave all that mess for another day.

@hmaarrfk

hmaarrfk commented Jul 7, 2019

Copy link
Copy Markdown
Member

Maybe. But whatever works for you. I'm not one to hold up approval for that kind of thing anyway. Looks good.

@sciunto
sciunto merged commit d1ab45f into scikit-image:master Jul 9, 2019
@sciunto

sciunto commented Jul 9, 2019

Copy link
Copy Markdown
Member

@hmaarrfk regarding removal of the test... Sure but there's a bigger operation hiding there. We should remove our own "wrapper" of pad and crop. I'll just leave all that mess for another day.

Do you want to open a ticket?

@sciunto sciunto added the 🔧 type: Maintenance Refactoring and maintenance of internals label Jul 9, 2019
@sciunto

sciunto commented Jul 9, 2019

Copy link
Copy Markdown
Member

@jni Do you want to backport?

@jni

jni commented Jul 9, 2019

Copy link
Copy Markdown
Member Author

No, and certainly not until after the last remaining tests are fixed. I think we'll need to coerce to array in that case.

Backports are "by popular demand". I don't think we have many people pining for 0.14.4. The biggest customer is CellProfiler and they are busy upgrading to Python 3. @0x00b1 have I got that right?

@sciunto

sciunto commented Jul 9, 2019

Copy link
Copy Markdown
Member

Sounds good. We will have to engage the discussion (or I missed it) to define a due date at which we will stop maintaining the LTS

@jni

jni commented Jul 9, 2019

Copy link
Copy Markdown
Member Author

That date is the Py2.7 end-of-life, Jan 1 2020.

@jni
jni deleted the ci-failures branch July 9, 2019 22:01
@sciunto

sciunto commented Jul 10, 2019

Copy link
Copy Markdown
Member

So, we take the same date?

@hmaarrfk

Copy link
Copy Markdown
Member

i don't know, i kinda feel like we should backport while we remember to. If 0.14.4 never gets released, so be it, but we will forget that this was a critical fix at some point.

@stefanv

stefanv commented Jul 10, 2019

Copy link
Copy Markdown
Member

Backports are "by popular demand". I don't think we have many people pining for 0.14.4. The biggest customer is CellProfiler and they are busy upgrading to Python 3. @0x00b1 have I got that right?

| version | python_version | download_month | download_count |
| ------- | -------------- | -------------- | -------------- |
| 0.15.0  | 3.6            | 2019-06        |        878,403 |
| 0.14.2  | 3.6            | 2019-06        |        636,369 |
| 0.14.2  | 3.6            | 2019-07        |        400,205 |
| 0.15.0  | 3.6            | 2019-07        |        336,881 |
| 0.14.2  | 2.7            | 2019-06        |        285,706 |
| 0.15.0  | 3.5            | 2019-06        |        147,212 |
| 0.14.3  | 2.7            | 2019-06        |        121,125 |
| 0.14.2  | 2.7            | 2019-07        |         83,464 |
| 0.14.3  | 2.7            | 2019-07        |         73,112 |
| 0.15.0  | 3.5            | 2019-07        |         63,670 |
| Total   |                |                |      3,026,147 |

@jni

jni commented Jul 10, 2019

Copy link
Copy Markdown
Member Author

@stefanv those numbers don't immediately paint a clear story to me, but anyway, my view of popular demand is that someone stuck on 2.7 requires a specific fix (and expresses this on issues or the mailing list), not number of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 type: Maintenance Refactoring and maintenance of internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failures with NumPy 1.17.0rc1

4 participants