mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
Disable dashboard tune module if pandas version is incorrect (#14381)
This commit is contained in:
parent
2da58bb021
commit
3616424f10
1 changed files with 8 additions and 2 deletions
|
@ -9,13 +9,19 @@ import ray.new_dashboard.modules.tune.tune_consts \
|
|||
import ray.new_dashboard.utils as dashboard_utils
|
||||
from ray.new_dashboard.utils import async_loop_forever, rest_response
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
from ray.tune import Analysis
|
||||
from tensorboard import program
|
||||
except ImportError:
|
||||
# The `pip install ray` will not install pandas,
|
||||
# so `from ray.tune import Analysis` may raises
|
||||
# `AttributeError: module 'pandas' has no attribute 'core'`
|
||||
# if the pandas version is incorrect.
|
||||
except (ImportError, AttributeError) as ex:
|
||||
logger.warning("tune module is not available: %s", ex)
|
||||
Analysis = None
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
routes = dashboard_utils.ClassMethodRouteTable
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue