diff --git a/video_prediction_tools/utils/runscript_generator/config_postprocess.py b/video_prediction_tools/utils/runscript_generator/config_postprocess.py index 5edf00302e50942714d33275f8a5cccdbd4f7ab2..9e33f9611823504bcfd3c91c07314986de7a298d 100755 --- a/video_prediction_tools/utils/runscript_generator/config_postprocess.py +++ b/video_prediction_tools/utils/runscript_generator/config_postprocess.py @@ -60,7 +60,7 @@ class Config_Postprocess(Config_runscript_base): # get the 'checkpoint-directory', i.e. the directory where the trained model parameters are stored # Note that the remaining information (model, results-directory etc.) can be retrieved form it!!! - # First chosse the basic experiment directory + # First choose the basic experiment directory dir_base = Config_Postprocess.handle_source_dir(self, "models") expbase_req_str = "Choose an experiment from the list above:" expbase_err = NotADirectoryError("Could not find passed directory.") @@ -101,7 +101,7 @@ class Config_Postprocess(Config_runscript_base): self.runscript_target = self.rscrpt_tmpl_prefix + self.dataset + "_" + exp_dir + ".sh" # Set results_dir - self.results_dir = os.path.join(base_dir, "results", exp_dir_base,self.model, exp_dir) + self.results_dir = os.path.join(base_dir, "results", exp_dir_base, self.model, exp_dir) return # Decide if quick evaluation should be performed @@ -150,9 +150,11 @@ class Config_Postprocess(Config_runscript_base): :param silent: flag if print-statement are executed :return: status with True confirming success """ + status = False if not os.path.isdir(dir_in): if not silent: print("{0} is not a directory".format(dir_in)) - status = False + elif dir_in == "": + if not silent: print("{0}: Please enter a directory/checkpoint.") else: status = True @@ -184,7 +186,7 @@ class Config_Postprocess(Config_runscript_base): print("The base directory does not exist as well!") return status - if not model_in: # user just printed 'Enter' + if not model_in: # user just pressed 'Enter' _ = Config_Postprocess.get_subdir_list(os.path.dirname(model_path)) return status