mirror of
https://github.com/wassname/ray.git
synced 2026-07-01 00:35:01 +08:00
Fix webui api (#4686)
* fix webui * Apply suggestions from code review lint Co-Authored-By: suquark <suquark@gmail.com> * add dependencies for this unittest * move dependencies to the script file
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import pytest
|
||||
import ray
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.version_info < (3, 5, 3), reason="requires python3.5.3 or higher")
|
||||
def test_get_webui():
|
||||
addresses = ray.init(include_webui=True)
|
||||
webui_url = addresses["webui_url"]
|
||||
assert ray.worker.get_webui_url() == webui_url
|
||||
|
||||
ray.shutdown()
|
||||
@@ -1102,7 +1102,7 @@ def get_webui_url():
|
||||
"""
|
||||
if _global_node is None:
|
||||
raise Exception("Ray has not been initialized/connected.")
|
||||
return _global_node.get_webui_url
|
||||
return _global_node.webui_url
|
||||
|
||||
|
||||
global_worker = Worker()
|
||||
|
||||
Reference in New Issue
Block a user