question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatible with Google Colaboratory

See original GitHub issue

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 ?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
calz1commented, Sep 5, 2018

This would be really neat to have working. As Google Colab gives free GPUs, this would let a lot more people try out Autokeras…

0reactions
kalyanramucommented, Jan 9, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatible with Google Colab (Python 3.7) #17 - GitHub
I'm annoyed with Google for building Colab which is a great product but then completely abandoning it. My usual policy is not to...
Read more >
How to fix google-colab tensorflow ValueError? - Stack Overflow
Input 0 of layer "dense_4" is incompatible with the layer: expected min_ndim=2, found ndim=1. Full shape received: (None,) Call arguments ...
Read more >
Google Colab Update: PyMC3 is being replaced by PyMC v4 ...
Are you a PyMC3 user and a Google Colab user? This is the thread for you. PyMC3 is being replaced by PyMC v4...
Read more >
Google Colab Recap (Feb. 2022) - Medium
What is Colaboratory? Colaboratory, or “Colab” for short, is a product from Google Research. Colab allows anybody to write and execute arbitrary python...
Read more >
Google Colab Error
Hello, I'm running into trouble in Google Colab trying to create training games. I obtain the following error ... E: Unsupported file ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found