From b7540d46cd93e9093b31afb98c055b07de8b60cb Mon Sep 17 00:00:00 2001 From: Alan Guo Date: Wed, 3 Aug 2022 19:38:52 -0700 Subject: [PATCH] Make it so pydantic is required before we launch dashboard api server (#27345) (#27456) * Make it so pydantic is required before we launch dashboard api server Signed-off-by: Alan Guo --- dashboard/optional_deps.py | 6 ++++++ python/setup.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/dashboard/optional_deps.py b/dashboard/optional_deps.py index de0e7cb05..cd792190d 100644 --- a/dashboard/optional_deps.py +++ b/dashboard/optional_deps.py @@ -1,3 +1,8 @@ +# These imports determine whether or not a user has the required dependencies +# to launch the optional dashboard API server. +# If any of these imports fail, the dashboard API server will not be launched. +# Please add important dashboard-api dependencies to this list. + # These checks have to come first because aiohttp looks # for opencensus, too, and raises a different error otherwise. import opencensus # noqa: F401 @@ -10,3 +15,4 @@ import aiohttp_cors # noqa: F401 from aiohttp import hdrs # noqa: F401 from aiohttp.typedefs import PathLike # noqa: F401 from aiohttp.web import RouteDef # noqa: F401 +import pydantic # noqa: F401 diff --git a/python/setup.py b/python/setup.py index d08ad9c7f..5df11e4d6 100644 --- a/python/setup.py +++ b/python/setup.py @@ -211,6 +211,8 @@ if setup_spec.type == SetupType.RAY: "fsspec", ], "default": [ + # If adding dependencies necessary to launch the dashboard api server, + # please add it to dashboard/optional_deps.py as well. "aiohttp >= 3.7", "aiohttp_cors", "colorful",