Skip to content

Commit

Permalink
Update run_simulation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yjwong1999 committed Jun 14, 2023
1 parent 053846b commit 5372ed5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions run_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@
parser.add_argument('--store-path', type = str, required = True, help="pretrained model weight path")

args = parser.parse_args()
DRL_ALGO = args.drl
STORE_PATH = args.store_path

# validate the weight path
if not os.path.isdir(STORE_PATH):
raise NotImplementedError("The provided weight path does not exist!")
# get DRL_ALGO
if 'ddpg' in STORE_PATH:
DRL_ALGO = 'ddpg'
else:
DRL_ALGO = 'td3'

REWARD_DESIGN = args.reward
SEEDS = args.seeds
EPISODE_NUM = args.ep_num
STORE_PATH = args.store_path


project_name = f'trained_uav/{DRL_ALGO}_{REWARD_DESIGN}' if TRAINED_UAV else f'scratch/{DRL_ALGO}_{REWARD_DESIGN}'

# process the argument
assert DRL_ALGO in ['ddpg', 'td3'], "drl must be ['ddpg', 'td3']"
Expand Down

0 comments on commit 5372ed5

Please sign in to comment.