mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-12 02:45:34 +08:00
updated event writing logic/moved save and print to after config set (#502)
* (1) if wandb/tb enabled always eval; (2) move printing of config to after all variables set * (3) save config after everything is set * dont change config; just disable eval with decorator
This commit is contained in:
1 parent
7cf97348ee
commit
0c43e7c4b2
4 files changed
+83
-47
No files matched your search
+3
-12
@@ -16,7 +16,6 @@ import torch
|
||||
import torch.distributed as dist
|
||||
import torch.multiprocessing as mp
|
||||
import yaml
|
||||
from rich.console import Console
|
||||
|
||||
from nerfactory.configs import base as cfg
|
||||
from nerfactory.configs.base_configs import AnnotatedBaseConfigUnion
|
||||
@@ -189,17 +188,9 @@ def main(config: cfg.Config) -> None:
|
||||
logging.info(f"Loading pre-set config from: {config.trainer.load_config}")
|
||||
config = yaml.load(config.trainer.load_config.read_text(), Loader=yaml.Loader)
|
||||
|
||||
console = Console(width=120)
|
||||
console.rule("Config")
|
||||
console.print(config)
|
||||
console.rule("")
|
||||
|
||||
base_dir = config.get_base_dir()
|
||||
assert base_dir is not None
|
||||
base_dir.mkdir(parents=True, exist_ok=True)
|
||||
config_yaml_path = base_dir / "config.yml"
|
||||
logging.info(f"Saving config to: {config_yaml_path}")
|
||||
config_yaml_path.write_text(yaml.dump(config), "utf8")
|
||||
# print and save config
|
||||
config.print_to_terminal()
|
||||
config.save_config()
|
||||
|
||||
launch(
|
||||
train_loop,
|
||||
|
||||
Reference in new issue
Block a user