Skip to content

Extending Auto-sklearn can be incompatible with parallel execution #1290

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

Closed
mfeurer opened this issue Nov 5, 2021 · 1 comment
Closed

Extending Auto-sklearn can be incompatible with parallel execution #1290

mfeurer opened this issue Nov 5, 2021 · 1 comment

Comments

@mfeurer
Copy link
Contributor

mfeurer commented Nov 5, 2021

When running Auto-sklearn extended with a classifier/regressor etc with n_jobs>1 it can happen that the classifier/regressor Auto-sklearn was extended with is not available in the subprocess. Therefore, all function evaluations will crash.

This can be circumvented by calling add_classifier etc in the subprocesses executing the machine learning runs. Sometimes, this is done automatically when for example the call to add_classifier is done on the script's highest level and is not guarded by __name__ == "__main__". However, it would not work in a notebook for example.

Potential solution:

  1. Move the _addons attribute every component type has to a global addons registry.
  2. Pass all registered addons to the workers
  3. When doing a function evaluations, check whether addons need to be registered on the worker and do so
mfeurer added a commit that referenced this issue Nov 9, 2021
This PR passes custom components to workers so that custom components
are available when using n_jobs != 1
@mfeurer
Copy link
Contributor Author

mfeurer commented Nov 9, 2021

This is fixed in #1290. I'm keeping it open because we need to document that this still will not work in a notebook because the component will not be importable in a worker.

@mfeurer mfeurer reopened this Nov 9, 2021
@mfeurer mfeurer closed this as completed in ea39160 Nov 9, 2021
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

No branches or pull requests

1 participant