add ability to load config.yml from a folder not the same as the original training one

This commit is contained in:
Justin Kerr committed 2024-10-16 12:31:49 -07:00
1 parent adc743c3a0
commit b046e3b975
1 file changed
+2 -1
+2 -1
View File
@@ -99,7 +99,8 @@ def eval_setup(
# load checkpoints from wherever they were saved
# TODO: expose the ability to choose an arbitrary checkpoint
config.load_dir = config.get_checkpoint_dir()
# By using the parent of config_path, we can call this from any folder even if it wasn't originally trained from there
config.load_dir = config_path.parent / config.relative_model_dir
# setup pipeline (which includes the DataManager)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")