Skip to content

Commit

Permalink
train and test scripts update
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrecka committed Jan 13, 2022
1 parent b4c6e30 commit 3ce289c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion myGym/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_model(env, model=None, implemented_combos=None, arg_dict=None, model_lo
mean_steps_num = steps_sum // arg_dict["eval_episodes"]

print("#---------Evaluation-Summary---------#")
print("{} of {} episodes were successful".format(success_episodes_num, arg_dict["eval_episodes"]))
print("{} of {} episodes ({} %) were successful".format(success_episodes_num, arg_dict["eval_episodes"], success_episodes_num / arg_dict["eval_episodes"]*100))
print("Mean distance error is {:.2f}%".format(mean_distance_error * 100))
print("Mean number of steps {}".format(mean_steps_num))
print("#------------------------------------#")
Expand Down
6 changes: 4 additions & 2 deletions myGym/train_checker.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh
#This is minimal unit test to check, whether the current version of myGym is able to train.
# It will do simle train and evaluate in 2 minutes. If success rate is above 30 percdents, it works.
rm -r ./trained_models/check
python train.py --config ./configs/train_check.json --steps 20000
python test.py -cfg ./trained_models/check/reach_table_kuka_joints_gt_ppo2/train.json
python train.py --config ./configs/train_reach.json --algo ppo2 --max_episode_steps 256 --algo_steps 256 --steps 20000 --eval_episodes 10 --logdir ./trained_models/check
python test.py -cfg ./trained_models/check/reach_table_kuka_joints_ppo2/train.json
rm -r ./trained_models/check

0 comments on commit 3ce289c

Please sign in to comment.