mirror of
https://github.com/wassname/ray.git
synced 2026-07-28 11:25:04 +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:
@@ -34,7 +34,7 @@ elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "linux" ]]; then
|
||||
bash miniconda.sh -b -p $HOME/miniconda
|
||||
export PATH="$HOME/miniconda/bin:$PATH"
|
||||
pip install -q scipy tensorflow cython==0.29.0 gym opencv-python-headless pyyaml pandas==0.23.4 requests \
|
||||
feather-format lxml openpyxl xlrd py-spy setproctitle pytest-timeout flaky networkx tabulate psutil
|
||||
feather-format lxml openpyxl xlrd py-spy setproctitle pytest-timeout flaky networkx tabulate psutil aiohttp
|
||||
elif [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "macosx" ]]; then
|
||||
# Install miniconda.
|
||||
wget https://repo.continuum.io/miniconda/Miniconda2-4.5.4-MacOSX-x86_64.sh -O miniconda.sh -nv
|
||||
@@ -48,7 +48,7 @@ elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "macosx" ]]; then
|
||||
bash miniconda.sh -b -p $HOME/miniconda
|
||||
export PATH="$HOME/miniconda/bin:$PATH"
|
||||
pip install -q cython==0.29.0 tensorflow gym opencv-python-headless pyyaml pandas==0.23.4 requests \
|
||||
feather-format lxml openpyxl xlrd py-spy setproctitle pytest-timeout flaky networkx tabulate psutil
|
||||
feather-format lxml openpyxl xlrd py-spy setproctitle pytest-timeout flaky networkx tabulate psutil aiohttp
|
||||
elif [[ "$LINT" == "1" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential curl unzip
|
||||
|
||||
@@ -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