From 92ca783f16b7151531e22889b1ee0650a74d72b9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 20 Jun 2018 14:44:49 +0200 Subject: rename render folder when done --- .gitignore | 1 + live.py | 3 +++ options/dataset_options.py | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 4fe60b0..5af91f1 100755 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ sequences/ a_b/ checkpoints/ results/ +renders/ build/ dist/ torch.egg-info/ diff --git a/live.py b/live.py index e9051d8..0d6cbab 100644 --- a/live.py +++ b/live.py @@ -137,6 +137,9 @@ def process_live_input(opt, data_opt, rpc_client): data_opt.processing = False rpc_client.send_status('processing', False) + if data_opt.tag != data_opt.final_tag && len(data_opt.final_tag): + tag = data_opt.final_tag.lower().replace(' ', '_').replace('__', '_') + os.rename(opt.render_dir, opt.results_dir + "/" + tag + "/") if __name__ == '__main__': listener = Listener(opt, data_opt, data_opt_parser, process_live_input) diff --git a/options/dataset_options.py b/options/dataset_options.py index 3c032e5..57df872 100644 --- a/options/dataset_options.py +++ b/options/dataset_options.py @@ -59,6 +59,13 @@ class DatasetOptions(BaseOptions): help='another way to tag this whole thing' ) + self.parser.add_argument( + '--final-tag', + type=str, + default="", + help='optionally rename the dataset when we are done' + ) + self.parser.add_argument( '--scp', action='store_true', -- cgit v1.2.3-70-g09d2