mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-23 16:15:36 +08:00
Make rich console global (#1916)
This commit is contained in:
1 parent
02f449b661
commit
4242a3c982
49 files changed
+44
-150
No files matched your search
@@ -24,12 +24,10 @@ from typing import Literal, Optional, Tuple
|
||||
|
||||
import torch
|
||||
import yaml
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.engine.trainer import TrainerConfig
|
||||
from nerfstudio.pipelines.base_pipeline import Pipeline
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
def eval_load_checkpoint(config: TrainerConfig, pipeline: Pipeline) -> Tuple[Path, int]:
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
def check_ffmpeg_installed():
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
|
||||
from math import floor, log
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
def print_tcnn_speed_warning(method_name: str):
|
||||
|
||||
@@ -26,7 +26,6 @@ from contextlib import ContextDecorator, contextmanager
|
||||
from pathlib import Path
|
||||
from typing import Callable, Dict, List, Optional, Tuple, Union
|
||||
|
||||
from rich.console import Console
|
||||
from torch.profiler import ProfilerActivity, profile, record_function
|
||||
|
||||
from nerfstudio.configs import base_config as cfg
|
||||
@@ -36,8 +35,7 @@ from nerfstudio.utils.decorators import (
|
||||
check_profiler_enabled,
|
||||
decorate_all,
|
||||
)
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
PROFILER = []
|
||||
PYTORCH_PROFILER = None
|
||||
|
||||
@@ -17,9 +17,7 @@ import subprocess
|
||||
import sys
|
||||
from typing import Optional
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
def run_command(cmd: str, verbose=False) -> Optional[str]:
|
||||
|
||||
@@ -26,15 +26,14 @@ from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
import torch
|
||||
import wandb
|
||||
from rich.console import Console
|
||||
from torch.utils.tensorboard import SummaryWriter
|
||||
from torchtyping import TensorType
|
||||
|
||||
from nerfstudio.configs import base_config as cfg
|
||||
from nerfstudio.utils.decorators import check_main_thread, decorate_all
|
||||
from nerfstudio.utils.printing import human_format
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
to8b = lambda x: (255 * torch.clamp(x, min=0, max=1)).to(torch.uint8)
|
||||
EVENT_WRITERS = []
|
||||
EVENT_STORAGE = []
|
||||
|
||||
Reference in new issue
Block a user