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

Google Colab - error in dist_manager.py _refresh_resource(cls) #163

Closed
nathan-wood opened this issue Dec 17, 2019 · 6 comments
Closed

Google Colab - error in dist_manager.py _refresh_resource(cls) #163

nathan-wood opened this issue Dec 17, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@nathan-wood
Copy link

Google Colab notebook for reference:
https://drive.google.com/open?id=1DAVTtAD7zGbJzrkvRKRjWvIhKzCawNkH

Code:
detector = task.fit(dataset)

Error:

ValueError Traceback (most recent call last)
in ()
----> 1 detector = task.fit(dataset)

5 frames
/usr/local/lib/python3.6/dist-packages/autogluon/scheduler/resource/dist_manager.py in _refresh_resource(cls)
48 @classmethod
49 def _refresh_resource(cls):
---> 50 cls.MAX_CPU_COUNT = max([x.get_all_resources()[0] for x in cls.NODE_RESOURCE_MANAGER.values()])
51 cls.MAX_GPU_COUNT = max([x.get_all_resources()[1] for x in cls.NODE_RESOURCE_MANAGER.values()])
52

ValueError: max() arg is an empty sequence

@zhanghang1989
Copy link
Contributor

Thanks for the feedback! Looks like the remote on Collab is not initialized correctly. I will take a look.

@zhanghang1989 zhanghang1989 added the bug Something isn't working label Dec 19, 2019
@zhanghang1989
Copy link
Contributor

related issue: #162

@zhanghang1989
Copy link
Contributor

Looks like dask distributed issue: dask/distributed#3330
Link to related Colab notebook https://colab.research.google.com/drive/1kzQNNaJwTAAVWjLopuRAySX-QSps5tLZ

@fjibj
Copy link

fjibj commented Jan 12, 2020

thanks a lot.
i meet the same error and solve it by using:
pip uninstall -y distributed
pip install distributed
pip install -U ipykernel
and RESTART RUNTIME

@Innixma
Copy link
Contributor

Innixma commented Mar 18, 2020

Using AutoGluon 0.0.6, I am able to get it working in Colab through:

pip uninstall -y mkl
pip install --upgrade mxnet
pip install autogluon
pip install -U ipykernel

RESTART RUNTIME

from autogluon import TabularPrediction as task
train_data = task.Dataset(file_path='https://autogluon.s3.amazonaws.com/datasets/Inc/train.csv')
test_data = task.Dataset(file_path='https://autogluon.s3.amazonaws.com/datasets/Inc/test.csv')
predictor = task.fit(train_data=train_data, label='class')
performance = predictor.evaluate(test_data)

One thing I noticed was that NN takes ~3x longer to train than on my mac laptop. Intel MKL is installed on Colab and should be uninstalled to speed-up AutoGluon. Uninstalling MKL gives at least 2x speedup.

Link to Colab Notebook: https://colab.research.google.com/drive/1ULOytrRHcw4GLl0qWgGnxUpr9zVQVYlr

I think this issue has to be fixed on Google Colab's end to avoid the pip install -U ipykernel requirement. They need to upgrade their default ipykernel version. Until then, this should be the simplest way to get things working on Colab.

Marking this issue as resolved.

@nunocesarsa
Copy link

Just adding a comment for future reference to whoever stumbles on the same error. The suggestion by @Innixma worked perfectly but I also had to update "dask" because stringify was not getting called.

So after:

pip install -U ipykernel

You can also update -U dask:

!pip install -U dask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants