4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 18:44:21 +08:00

Set data path to launch viewer for DreamFusion (#1776)

* Set data path to launch viewer for DreamFusion

* Apply formatter

* Fallback to 'base_dir' if data manager has no path

* Make if statement non-inline

* Reformat

---------

Co-authored-by: Matthew Tancik <mattt4001@gmail.com>
This commit is contained in:
SeungWoo Yoo 2023-04-20 13:47:34 +09:00 committed by GitHub
parent a449219f91
commit cc494adb27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,8 +61,15 @@ class RunViewer:
def _start_viewer(self, config: TrainerConfig, pipeline: Pipeline):
base_dir = config.get_base_dir()
viewer_log_path = base_dir / config.viewer.relative_log_filename
datapath = pipeline.datamanager.get_datapath()
if datapath is None:
datapath = base_dir
viewer_state, banner_messages = viewer_utils.setup_viewer(
config.viewer, log_filename=viewer_log_path, datapath=pipeline.datamanager.get_datapath()
config.viewer,
log_filename=viewer_log_path,
datapath=datapath,
)
# We don't need logging, but writer.GLOBAL_BUFFER needs to be populated