How to build dashboard correctly?

How severe does this issue affect your experience of using Ray?

  • High: It blocks me to complete my task.

I build ray from source code follow Building Ray from Source — Ray 2.8.0. After compiling, I can train my model with ray, but I cannot use dashboard.
I have run npm run build, and the output shows it was compiled successfully:

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  521.68 kB  build/static/js/main.c1ceb39c.js
  1.27 kB    build/static/css/main.388a904b.css
  965 B      build/static/js/591.7dd528b7.chunk.js
  321 B      build/static/js/495.7a398a42.chunk.js

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

But when I check the dashboard.log, I got logs like these:

|2023-06-25 20:26:47,817|INFO head.py:138 -- Dashboard head grpc address: 0.0.0.0:41139|
|---|---|
|2023-06-25 20:26:47,822|WARNING head.py:258 -- `prometheus_client` not found, so metrics will not be exported.|
|2023-06-25 20:26:47,824|INFO utils.py:112 -- Get all modules by type: DashboardHeadModule|
|2023-06-25 20:26:47,894|INFO utils.py:123 -- Module ray.dashboard.modules.actor.actor_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,924|INFO utils.py:123 -- Module ray.dashboard.modules.event.event_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,925|INFO utils.py:123 -- Module ray.dashboard.modules.healthz.healthz_agent cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,926|INFO utils.py:123 -- Module ray.dashboard.modules.healthz.healthz_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,927|INFO utils.py:123 -- Module ray.dashboard.modules.job.cli cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'pydantic'|
|2023-06-25 20:26:47,928|INFO utils.py:123 -- Module ray.dashboard.modules.job.job_agent cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,928|INFO utils.py:123 -- Module ray.dashboard.modules.job.job_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,930|INFO utils.py:123 -- Module ray.dashboard.modules.job.job_manager cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'pydantic'|
|2023-06-25 20:26:47,930|INFO utils.py:123 -- Module ray.dashboard.modules.job.pydantic_models cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'pydantic'|
|2023-06-25 20:26:47,932|INFO utils.py:123 -- Module ray.dashboard.modules.log.log_agent cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,932|INFO utils.py:123 -- Module ray.dashboard.modules.log.log_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,952|INFO utils.py:123 -- Module ray.dashboard.modules.log.log_manager cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'pydantic'|
|2023-06-25 20:26:47,956|INFO utils.py:123 -- Module ray.dashboard.modules.metrics.metrics_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,957|INFO utils.py:123 -- Module ray.dashboard.modules.node.node_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,958|INFO utils.py:123 -- Module ray.dashboard.modules.reporter.reporter_agent cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,959|INFO utils.py:123 -- Module ray.dashboard.modules.reporter.reporter_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,962|INFO utils.py:123 -- Module ray.dashboard.modules.serve.serve_agent cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,963|INFO utils.py:123 -- Module ray.dashboard.modules.serve.serve_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,963|INFO utils.py:123 -- Module ray.dashboard.modules.snapshot.snapshot_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'pydantic'|
|2023-06-25 20:26:47,964|INFO utils.py:123 -- Module ray.dashboard.modules.state.state_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,965|INFO utils.py:123 -- Module ray.dashboard.modules.test.test_agent cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,966|INFO utils.py:123 -- Module ray.dashboard.modules.test.test_head cannot be loaded because we cannot import all dependencies. Install this module using `pip install 'ray[default]'` for the full dashboard functionality. Error: No module named 'opencensus'|
|2023-06-25 20:26:47,967|INFO utils.py:145 -- Available modules: [<class 'ray.dashboard.modules.usage_stats.usage_stats_head.UsageStatsHead'>]|
|2023-06-25 20:26:47,967|INFO head.py:211 -- Modules to load: {'UsageStatsHead'}|
|2023-06-25 20:26:47,968|INFO head.py:214 -- Loading DashboardHeadModule: <class 'ray.dashboard.modules.usage_stats.usage_stats_head.UsageStatsHead'>|
|2023-06-25 20:26:47,968|INFO head.py:227 -- Loaded 1 modules. [<ray.dashboard.modules.usage_stats.usage_stats_head.UsageStatsHead object at 0x7f317e06aa60>]|
|2023-06-25 20:26:47,968|INFO head.py:309 -- http server disabled.|
|2023-06-25 20:26:47,969|INFO usage_stats_head.py:168 -- Usage reporting is disabled.|

Do you have any ideas what steps I may miss? By the way, I got Successfully installed ray-2.5.0 after building ray, but during the building it had warnings like:

INFO: From Executing genrule //:python/ray/_raylet.pyx_cython_translation:
warning: python/ray/_raylet.pyx:2233:55: local variable ‘num_added’ referenced before assignment
warning: python/ray/_raylet.pyx:2235:15: local variable ‘num_added’ referenced before assignment
warning: python/ray/_raylet.pyx:2246:52: local variable ‘num_deleted’ referenced before assignment
warning: python/ray/_raylet.pyx:2248:15: local variable ‘num_deleted’ referenced before assignment
warning: python/ray/_raylet.pyx:2277:37: local variable ‘exists’ referenced before assignment
warning: python/ray/_raylet.pyx:2278:15: local variable ‘exists’ referenced before assignment
INFO: From Action external/com_github_grpc_grpc/src/proto/grpc/testing/xds/v3/csds.grpc.pb.h:
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist.
INFO: From Action external/com_github_grpc_grpc/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h:
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist.
INFO: From Action external/com_github_grpc_grpc/src/proto/grpc/testing/xds/v3/base.grpc.pb.h:
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist.
INFO: From Action external/com_github_grpc_grpc/src/proto/grpc/channelz/channelz.grpc.pb.h:
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist.
INFO: From Action external/com_github_grpc_grpc/src/proto/grpc/testing/xds/v3/config_dump.grpc.pb.h:
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist.
INFO: From Action external/com_github_grpc_grpc/src/proto/grpc/health/v1/health.grpc.pb.h:
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist.
INFO: From Action external/com_github_grpc_grpc/src/proto/grpc/testing/xds/v3/percent.grpc.pb.h:
bazel-out/k8-opt/bin/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist

I am not sure whether these will be the reason of the miss of dashboard, could you please give me some advice? Thanks in advance.

cc: @sangcho for thoughts

you should run pip install ray[default]!

1 Like

it is because the dashboard requires opencensus module, but it is not downloaded (and it will be included in ray[default])