mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 21:39:06 +08:00
Prettified Code!
This commit is contained in:
1 parent
5469f2e6b8
commit
d3ba8f34ed
1 file changed
+11
-16
@@ -8,8 +8,8 @@ const msgpack = require('msgpack-lite');
|
|||||||
export function LogPanel() {
|
export function LogPanel() {
|
||||||
const websocket = useContext(WebSocketContext).socket;
|
const websocket = useContext(WebSocketContext).socket;
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const gpu_oom_error_msg = "GPU out of memory";
|
const gpu_oom_error_msg = 'GPU out of memory';
|
||||||
const resolved_msg = "resolved";
|
const resolved_msg = 'resolved';
|
||||||
let local_error = resolved_msg;
|
let local_error = resolved_msg;
|
||||||
// connection status indicators
|
// connection status indicators
|
||||||
|
|
||||||
@@ -70,22 +70,17 @@ export function LogPanel() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const check_error = useSelector(
|
const check_error = useSelector((state) => {
|
||||||
(state) => {
|
local_error = state.renderingState.log_errors;
|
||||||
local_error = state.renderingState.log_errors;
|
if (local_error.includes(gpu_oom_error_msg)) {
|
||||||
if(local_error.includes(gpu_oom_error_msg)){
|
console.log(local_error);
|
||||||
console.log(local_error);
|
set_log_message();
|
||||||
set_log_message();
|
set_small_resolution();
|
||||||
set_small_resolution();
|
set_max_train_util();
|
||||||
set_max_train_util();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
|
|
||||||
useEffect(() => {}, [
|
useEffect(() => {}, [check_error, local_error]);
|
||||||
check_error,
|
|
||||||
local_error,
|
|
||||||
]);
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user