From dc71ddcaf3765e7ef42f866c44908121f2480363 Mon Sep 17 00:00:00 2001 From: Jacopo Panerati Date: Fri, 8 Dec 2023 13:23:20 +0400 Subject: [PATCH] Fixed model choice in the replayed example in learn.py --- gym_pybullet_drones/examples/learn.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gym_pybullet_drones/examples/learn.py b/gym_pybullet_drones/examples/learn.py index 567bbaca9..6116d91dc 100644 --- a/gym_pybullet_drones/examples/learn.py +++ b/gym_pybullet_drones/examples/learn.py @@ -90,7 +90,7 @@ def run(multiagent=DEFAULT_MA, output_folder=DEFAULT_OUTPUT_FOLDER, gui=DEFAULT_ log_interval=100) #### Save the model ######################################## - model.save(filename+'/success_model.zip') + model.save(filename+'/final_model.zip') print(filename) #### Print training progression ############################ @@ -104,9 +104,10 @@ def run(multiagent=DEFAULT_MA, output_folder=DEFAULT_OUTPUT_FOLDER, gui=DEFAULT_ ############################################################ ############################################################ - if os.path.isfile(filename+'/success_model.zip'): - path = filename+'/success_model.zip' - elif os.path.isfile(filename+'/best_model.zip'): + if local: + input("Press Enter to continue...") + + if os.path.isfile(filename+'/best_model.zip'): path = filename+'/best_model.zip' else: print("[ERROR]: no model under the specified path", filename)