mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 23:38:42 +08:00
Prettified Code!
This commit is contained in:
1 parent
5469f2e6b8
commit
d3ba8f34ed
1 file changed
+5
-10
@@ -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,8 +70,7 @@ 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);
|
||||||
@@ -79,13 +78,9 @@ export function LogPanel() {
|
|||||||
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