mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[Dashboard] Fix NPE when there is no GPU on the node (#21650)
There is an NPE bug that causes browser crash when no GPU on the node. We can add a condition to fix it.
This commit is contained in:
parent
12b087acb8
commit
422d20e945
1 changed files with 3 additions and 1 deletions
|
@ -208,7 +208,9 @@ const NodeInfo: React.FC<{}> = () => {
|
|||
|
||||
// Show GPU features only if there is at least one GPU in cluster.
|
||||
const showGPUs =
|
||||
nodes.map((n) => n.gpus).filter((gpus) => gpus.length !== 0).length !== 0;
|
||||
nodes
|
||||
.map((n) => n.gpus)
|
||||
.filter((gpus) => gpus !== undefined && gpus.length !== 0).length !== 0;
|
||||
|
||||
// Don't show disk on Kubernetes. K8s node disk usage should be monitored
|
||||
// elsewhere.
|
||||
|
|
Loading…
Add table
Reference in a new issue