How severe does this issue affect your experience of using Ray?
- None: Just asking a question out of curiosity
- Low: It annoys or frustrates me for a moment.
- Medium: It contributes to significant difficulty to complete my task, but I can work around it.
- High: It blocks me to complete my task.
Hi
It’s my first experience with Ray, and the following example code crashed the jupyter notebook:
from ray import train, tune
def objective(config): # ①
score = config[“a”] ** 2 + config[“b”]
return {“score”: score}
search_space = { # ②
“a”: tune.grid_search([0.001, 0.01, 0.1, 1.0]),
“b”: tune.choice([1, 2, 3]),
}
tuner = tune.Tuner(objective, param_space=search_space) # ③
results = tuner.fit()
print(results.get_best_result(metric=“score”, mode=“min”).config)
2023-09-26 12:19:06,985 ERROR services.py:1169 – Failed to start the dashboard , return code 1
2023-09-26 12:19:06,987 ERROR services.py:1194 – Error should be written to ‘dashboard.log’ or ‘dashboard.err’. We are printing the last 20 lines for you. See ‘Configuring Logging — Ray 3.0.0.dev0’ to find where the log file is.
2023-09-26 12:19:07,005 ERROR services.py:1238 –
The last 20 lines of C:\Users\somas\AppData\Local\Temp\ray\session_2023-09-26_12-19-04_973268_35060\logs\dashboard.log (it contains the error message from the dashboard):
File “C:\Users\somas\anaconda3\envs\nixtla\lib\site-packages\ray\dashboard\head.py”, line 204, in load_modules
head_cls_list = dashboard_utils.get_all_modules(DashboardHeadModule)
File “C:\Users\somas\anaconda3\envs\nixtla\lib\site-packages\ray\dashboard\utils.py”, line 121, in get_all_modules
importlib.import_module(name)
File "C:\Users\somas\anaconda3\envs\nixtla\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in load_unlocked
File “”, line 850, in exec_module
File “”, line 228, in call_with_frames_removed
File “C:\Users\somas\anaconda3\envs\nixtla\lib\site-packages\ray\dashboard\modules\job\cli.py”, line 14, in
from ray.job_submission import JobStatus, JobSubmissionClient
File "C:\Users\somas\anaconda3\envs\nixtla\lib\site-packages\ray\job_submission_init.py", line 2, in
from ray.dashboard.modules.job.pydantic_models import DriverInfo, JobDetails, JobType
File “C:\Users\somas\anaconda3\envs\nixtla\lib\site-packages\ray\dashboard\modules\job\pydantic_models.py”, line 4, in
from pydantic import BaseModel, Field
ImportError: cannot import name ‘Field’ from ‘pydantic’ (C:\Users\somas\anaconda3\envs\nixtla\lib\site-packages\pydantic_init.py)
2023-09-26 12:19:07,299 INFO worker.py:1553 – Started a local Ray instance.
The notebook shows the kernel to be busy, but it won’t respond to any input, and the only way forward is to kill the session. I checked out the docs.ray.io page as suggested by the error msg, and it turned a 404.
Environment:
Conda on Win11
Python 3.9.18
Ray 2.3 (core, default, tune)
jupyter notebook: 6.5.4
VPN disabled
If I run the same piece of code as a .py file, I get the same error, plus the following line.
[2023-09-26 13:03:39,252 E 39748 30984] core_worker.cc:191: Failed to register worker 01000000ffffffffffffffffffffffffffffffffffffffffffffffff to Raylet. IOError: [RayletClient] Unable to register worker with raylet. Unknown error.
I haven’t seen any case/solution similar to this one after searching through the archive. I am at a loss on where to look next. Any suggestion is much appreciated!