autokeras: Incompatible with Google Colaboratory

Bug 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 ?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 17 (5 by maintainers)

Commits related to this issue

Most upvoted 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…