Skip to content

Commit

Permalink
Fixed model choice in the replayed example in learn.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JacopoPan committed Dec 8, 2023
1 parent 9a9ca8a commit dc71ddc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gym_pybullet_drones/examples/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ############################
Expand All @@ -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)
Expand Down

0 comments on commit dc71ddc

Please sign in to comment.