Ray.init() error after updating to 1.12

How severe does this issue affect your experience of using Ray?

  • High: It blocks me to complete my task.

ray.init() has some error in google colab after updating to 1.12. the error is:
ValueError Traceback (most recent call last)
in ()
1 import ray
----> 2 ray.init()

6 frames
/usr/local/lib/python3.7/dist-packages/ray/_private/utils.py in get_system_memory()
434 elif os.path.exists(memory_limit_filename_v2):
435 with open(memory_limit_filename_v2, “r”) as f:
→ 436 docker_limit = int(f.read())
437
438 # Use psutil if it is available.

ValueError: invalid literal for int() with base 10: ‘max\n’
codes to reproduce:
!pip install ray[tune] -q
!pip install ray[default] -q
!pip install lz4 -q
!pip install psutil -q
!pip install gputil -q
import ray
ray.init()
I didn’t even code anything yet what’s wrong?

+1 after ray==1.12 upgrade

Though I start ray.init(..., num_gpus=0) on a machine without any GPUs below error is logged. It doesn’t fail for me though.

2022-04-16 00:37:49,056	ERROR resource_spec.py:194 -- Could not parse gpu information.
Traceback (most recent call last):
  File "/home/jobuser/.local/lib/python3.7/site-packages/ray/_private/resource_spec.py", line 188, in resolve
    gpu_types = _get_gpu_types_gputil()
  File "/home/jobuser/.local/lib/python3.7/site-packages/ray/_private/resource_spec.py", line 301, in _get_gpu_types_gputil
    gpu_list = GPUtil.getGPUs()
  File "/home/jobuser/.local/lib/python3.7/site-packages/GPUtil/GPUtil.py", line 102, in getGPUs
    deviceIds = int(vals[i])
ValueError: invalid literal for int() with base 10: "NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running."

Hi @hossein836 thanks for making this issue! This is a known issue with ray 1.12. Please see [Core] Ray 1.12.0 fails on Google Colab · Issue #23951 · ray-project/ray · GitHub for more informations, and possible workarounds. Thanks!

1 Like