4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 10:34:29 +08:00

Respect custom timestamps passed to ns-train (#778)

When using `ns-train` as part of a pipeline, it's convenient for the output directory to be deterministic. This should be achievable by passing the `--timestamp` argument to `ns-train`, but that argument is currently being overwritten. This PR fixes the logic to respect a custom user-provided `--timestamp` value.
This commit is contained in:
Kyle Corbitt 2022-10-15 03:55:01 +02:00 committed by GitHub
parent d71c05f256
commit 006008b72f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,7 +231,8 @@ class Config(PrintableConfig):
def set_timestamp(self) -> None:
"""Dynamically set the experiment timestamp"""
self.timestamp = datetime.now().strftime("%Y-%m-%d_%H%M%S")
if self.timestamp == "{timestamp}":
self.timestamp = datetime.now().strftime("%Y-%m-%d_%H%M%S")
def set_experiment_name(self) -> None:
"""Dynamically set the experiment name"""