Ray.init throwing ValueError when a path to a `working_dir` is passed into `runtime_env`

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

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

The following bit of code throws a ValueError when trying to parse the working_dir arg. The original code was also working before, with the same version of ray (1.11.0) but has now started to throw the error.

python version: 3.8.10

import ray
import sys
import requests

sys.stdout.fileno = lambda: False

runtime_env = { "working_dir": "/dbfs/ml/dir_that_exists", "pip": ["requests", "pendulum==2.1.2"] }

ray.init(runtime_env=runtime_env, local_mode=True)

@ray.remote()
def f():
    open("my_datafile.txt").read()
    return requests.get("https://www.ray.io")

error1: ValueError: ‘’ is not a valid Protocol

error2: ValueError: /dbfs/ml/dir_that_exists is not a valid URI. Passing directories or modules to be dynamically uploaded is only supported at the job level (i.e., passed to ray.init)

Does anyone have any ideas on what could be causing the change in behavior?

Hi @mjdall, sorry you’re running into this. Can you explain more what you mean by “The original code was also working before, with the same version of ray (1.11.0) but has now started to throw the error.”? I don’t know what could have changed that caused it to break.

Does the error persist on the latest release candidate ray==1.12.0rc1 (ray · PyPI) or on the nightly wheels?