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

[ENH] support for custom joblib backends in parallelization #5537

Merged
merged 6 commits into from Nov 15, 2023

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Nov 6, 2023

Adds support for custom joblib backends in the sktime unified parallelization interface. Fixes #5535.

It seems that using custom backends was previously possible via parameter passing, albeit not properly tested as a possibility.

This PR adds back the possibility via a "joblib" parallelization mechanism.

I would be thankful if you could suggest how to best test this, @SmirnGregHM - preferably without adding soft dependencies.

@fkiraly fkiraly added enhancement Adding new functionality module:base-framework BaseObject, registry, base framework labels Nov 6, 2023
@fkiraly fkiraly changed the title [ENH] support for custom joblib backends [ENH] support for custom joblib backends in parallelization Nov 6, 2023
@fkiraly
Copy link
Collaborator Author

fkiraly commented Nov 12, 2023

@SmirnGregHM, have you had opportunity to test whether this works for your use case? And/or whether you have suggestions on changing this? I'd rather not merge and find out it does not work for you...

For instance, do you think that backend="joblib" should also work?

@SmirnGregHM
Copy link

SmirnGregHM commented Nov 13, 2023

@fkiraly sorry for the delay

I have just checked your solution and it works for me. Interface looks a little cumbersome to me though. I'd say, any joblib backend should be available with the same interface. It will also be consistent with joblib.Parallel interface. But I also see the benefits of having more options than just joblib and benefits of keeping the old interface of passing 'loky' or 'multiprocessing' to backend.

What would you think about renaming 'joblib_custom' to 'joblib'? Then one can do any of:

backend='threading', ... 

backend='joblib', backend_params={'backend': 'threading'}, ...

backend='joblib', backend_params={'backend': 'spark'}, ...

It works already, just with 'joblib_custom'

@fkiraly
Copy link
Collaborator Author

fkiraly commented Nov 13, 2023

I see - that seems like an improvement!
This would also allow us, if we decide so, to remove direct specification of joblib backends.

@fkiraly
Copy link
Collaborator Author

fkiraly commented Nov 13, 2023

done

@fkiraly fkiraly merged commit 5177259 into main Nov 15, 2023
39 checks passed
@fkiraly fkiraly deleted the joblib-custom branch November 15, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding new functionality module:base-framework BaseObject, registry, base framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENH] Add support for custom joblib backends
2 participants