mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 11:24:00 +08:00
add print to beginning of train (#114)
* added print unrolled config to beginning of train
This commit is contained in:
1 parent
fbcf3cb831
commit
84d01ddd25
1 file changed
+10
@@ -3,6 +3,7 @@ run_train_nerf.py
|
||||
"""
|
||||
import datetime
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
import socket
|
||||
from datetime import timedelta
|
||||
@@ -15,6 +16,7 @@ import torch
|
||||
import torch.distributed as dist
|
||||
import torch.multiprocessing as mp
|
||||
from omegaconf import DictConfig
|
||||
import yaml
|
||||
|
||||
from radiance.nerf.trainer import Trainer
|
||||
from radiance.utils import comms, profiler
|
||||
@@ -201,6 +203,14 @@ def launch(
|
||||
@hydra.main(config_path="../configs", config_name="vanilla_nerf.yaml")
|
||||
def main(config: DictConfig):
|
||||
"""Main function."""
|
||||
unrolled_path = os.path.join(os.getcwd(), ".hydra/config.yaml")
|
||||
if os.path.exists(unrolled_path):
|
||||
with open(unrolled_path, "r", encoding="utf8") as f:
|
||||
unrolled_config = yaml.safe_load(f)
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.info("Printing current config setup")
|
||||
print(yaml.dump(unrolled_config, sort_keys=False, default_flow_style=False))
|
||||
|
||||
launch(
|
||||
_train,
|
||||
config.machine_config.num_gpus,
|
||||
|
||||
Reference in new issue
Block a user