mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-02 13:59:10 +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:
1 parent
a449219f91
commit
cc494adb27
1 file changed
+8
-1
@@ -61,8 +61,15 @@ class RunViewer:
|
|||||||
def _start_viewer(self, config: TrainerConfig, pipeline: Pipeline):
|
def _start_viewer(self, config: TrainerConfig, pipeline: Pipeline):
|
||||||
base_dir = config.get_base_dir()
|
base_dir = config.get_base_dir()
|
||||||
viewer_log_path = base_dir / config.viewer.relative_log_filename
|
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(
|
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
|
# We don't need logging, but writer.GLOBAL_BUFFER needs to be populated
|
||||||
|
|||||||
Reference in new issue
Block a user