Skip to content

MAINT: add distributed as a dependency#466

Merged
TomAugspurger merged 9 commits into
dask:masterfrom
stsievert:import-incremental
Feb 21, 2019
Merged

MAINT: add distributed as a dependency#466
TomAugspurger merged 9 commits into
dask:masterfrom
stsievert:import-incremental

Conversation

@stsievert

Copy link
Copy Markdown
Member

Fixes #464

@stsievert stsievert changed the title MAINT: loud warning if ImportError with IncrementalSearchCV WIP: MAINT: loud warning if ImportError with IncrementalSearchCV Feb 19, 2019
@stsievert

Copy link
Copy Markdown
Member Author

This is a work in progress while I figure out the testing.

@TomAugspurger

Copy link
Copy Markdown
Member

These are generally hard to test in CI, due to module caching.

I'd recommend a simple change at the top of the file with a

try:
    import distributed
except ImportError:
    raise ImportError(nice message here)

and just a manual test locally in an environment without distributed.

@jrbourbeau

Copy link
Copy Markdown
Member

Do we want to add distributed as a dependency? Ref discussion going on in #463

@TomAugspurger

TomAugspurger commented Feb 19, 2019 via email

Copy link
Copy Markdown
Member

@jrbourbeau

Copy link
Copy Markdown
Member

Sounds good

@TomAugspurger

Copy link
Copy Markdown
Member

Ahh sorry @stsievert I may have led you astray... I see now why you started with your dummy class, since we need to provide something to model_selection/__init__.py to import, so that it would raise when the class is instantiated.

So, given the headaches of working around that, lets just add a dependency on distributed. Did you want to work on that change here?

@stsievert

stsievert commented Feb 20, 2019

Copy link
Copy Markdown
Member Author

So, given the headaches of working around that, lets just add a dependency on distributed. Did you want to work on that change here?

This solution is a lot easier.

I made that change here, which is a one-line change to setup.py. Is that all that's required?

Ahh sorry @stsievert I may have led you astray... I see now why you started with your dummy class

No worries – I didn't waste too much time on this. This solution is a lot cleaner, and resolves the conflict between requiring an optional dependency.

@TomAugspurger

Copy link
Copy Markdown
Member

Yeah, the change to setup.py should be all we need now.

I'll take a look at the failing CI in a bit.

@stsievert stsievert changed the title WIP: MAINT: loud warning if ImportError with IncrementalSearchCV MAINT: add distributed as a dependency Feb 20, 2019
@stsievert

Copy link
Copy Markdown
Member Author

Should a minimum version of distributed be required?

@TomAugspurger

Copy link
Copy Markdown
Member

I was just looking to see what a good version would be. It seems like distributed 1.25.0 coincides with Dask 1.0, so let's go with that.

@stsievert

Copy link
Copy Markdown
Member Author

Sounds good. I've added distributed>=1.25.0. I'll leave leave #461 to make Dask 1.0 required

@TomAugspurger

Copy link
Copy Markdown
Member

CI should be fixed now, if you could merge master and push.

@stsievert

Copy link
Copy Markdown
Member Author

Master merged and CI passing.

@TomAugspurger TomAugspurger merged commit 0b7bc8a into dask:master Feb 21, 2019
@TomAugspurger

Copy link
Copy Markdown
Member

Thanks.

@stsievert stsievert deleted the import-incremental branch February 27, 2019 02:25
@stsievert stsievert mentioned this pull request Mar 18, 2019
7 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.

3 participants