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

vscgpm: hooked instance of VsCGpm is incompatible with Engine(multiprocess=True) #215

Open
fsaad opened this issue Jun 26, 2017 · 1 comment

Comments

@fsaad
Copy link
Collaborator

fsaad commented Jun 26, 2017

engine.compose_cgpm([vscgpm], multiprocess=True) fails with

E           RuntimeError: Subprocess failed: Traceback (most recent call last):
E             File "/scratch/fsaad/cgpm/cgpm/utils/parallel_map.py", line 55, in process_input
E               outq_wr.send((i, ok, fx))
E           PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
@fsaad
Copy link
Collaborator Author

fsaad commented Jun 26, 2017

Further investigation reveals that the Venturecxx ripl is not picklable. The issue is that parallel_map will attempt to pickle objects when communicating between master-slave processes.

This issue does not arise with sklearn-based cgpms such RandomForest and LinearRegression since those predictor objects from sklearn are pickleable.

One possibility is to explicitly convert the hooked cgpm to its JSON metadata format and have the worker press deserialize the cgpm, except the performance hit of explicit deserialization and repopulating the trace could be significant. Consider profiling this approach.

Alternative is to patch the venture.ripl.ripl.Ripl class to be pickleable.

@fsaad fsaad changed the title Hooked instance of vscgpm is incompatible with Engine(multiprocess=True) vscgpm: hooked instance of VsCGpm is incompatible with Engine(multiprocess=True) Jan 15, 2018
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