Incompatible with Google Colaboratory
See original GitHub issueBug Description
As stated here, Autokeras kills the Google Colaboratory kernel, in CPU or GPU mode.
Reproducing Steps
Run the following notebook, which is a simple copy-paste of the AutoKeras tutorial, with a slight modification: in the AutoKeras API, the package autokeras.image_classifier seems to have been renamed to autokeras.image_supervised, and the documentation is not yet up to date.
Expected Behavior
It should run, since Colaboratory runs Python 3.6
Additional context
Colaboratory seems incompatible with the Python multiprocessing API.
I modified the code of search.py/Searcher in order to remove it, and it worked.
More clearly, I replaced this:
multiprocessing.set_start_method('spawn', force=True)
pool = multiprocessing.Pool(1)
train_results = pool.map_async(train, [(graph, train_data, test_data, self.trainer_args, os.path.join(self.path, str(model_id) + '.png'), self.metric, self.loss, self.verbose)])
By this:
train_results = train((graph, train_data, test_data, self.trainer_args, os.path.join(self.path, str(model_id) + '.png'), self.metric, self.loss, self.verbose))
Maybe AutoKeras could have an option in order to desactivate the use of that API ?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:17 (5 by maintainers)
Top GitHub Comments
This would be really neat to have working. As Google Colab gives free GPUs, this would let a lot more people try out Autokeras…
Sorry, I am confused about the final resolution. Is it changing the Google Colab Notes to single process or was there a change in the source code. Also, can you please post steps to disable multi-processing?