adding trained test policies, as well as fixing evaluate script and commands

This commit is contained in:
Arec Jamgochian
2022-02-27 23:51:12 -08:00
parent e37911eeff
commit 1ee3805aba
42 changed files with 14 additions and 16 deletions

View File

@@ -9,13 +9,13 @@ def main(method:str='expert', folder:str=None, locations=[(0,0)], skip_running=F
env, env_kwargs ='NRasterizedRouteIncrementingAgent', {} env, env_kwargs ='NRasterizedRouteIncrementingAgent', {}
elif method in ['bc','gail']: elif method in ['bc','gail']:
env='NormalizedContinuousEvalEnv' env='NormalizedContinuousEvalEnv'
env_kwargs={stop_on_collision:True, max_episode_steps:1000} env_kwargs={'stop_on_collision':True, 'max_episode_steps':1000}
elif method in ['hail']: elif method in ['hail']:
env = 'NormalizedOptionsEvalEnv' env = 'NormalizedOptionsEvalEnv'
env_kwargs={stop_on_collision:True, max_episode_steps:1000} env_kwargs={'stop_on_collision':True, 'max_episode_steps':1000}
elif method in ['shail']: elif method in ['shail']:
env = 'NormalizedSafeOptionsEvalEnv' env = 'NormalizedSafeOptionsEvalEnv'
env_kwargs={stop_on_collision:True, max_episode_steps:1000} env_kwargs={'stop_on_collision':True, 'max_episode_steps':1000}
else: else:
raise NotImplementedError raise NotImplementedError
@@ -39,8 +39,6 @@ def main(method:str='expert', folder:str=None, locations=[(0,0)], skip_running=F
locstr = 'loc_'+'_'.join([f'r{ro}t{tr}' for (ro,tr) in locations]) locstr = 'loc_'+'_'.join([f'r{ro}t{tr}' for (ro,tr) in locations])
outfolder = os.path.join('out',method,locstr) outfolder = os.path.join('out',method,locstr)
import pdb
pdb.set_trace()
# load metrics from save_path # load metrics from save_path
average_metrics = load_and_average(outfolder) average_metrics = load_and_average(outfolder)
if method in ['expert', 'idm']: if method in ['expert', 'idm']:

View File

@@ -1,14 +1,14 @@
# can add --skip_running if you've run before # can add --skip_running if you've run before
python -m eval_experiments python -m eval_experiments
python -m eval_experiments --locations='[(0,4)]' python -m eval_experiments --locations='[(0,4)]'
python -m eval_experiments --method idm python -m eval_experiments --method idm
python -m eval_experiments --method idm --locations='[(0,4)]' python -m eval_experiments --method idm --locations='[(0,4)]'
python -m eval_experiments --method bc --folder='test_policies/bc/expA' python -m eval_experiments --method bc --folder='test_policies/bc/expA'
python -m eval_experiments --method bc --folder='test_policies/bc/expB' --locations='[(0,4)]' python -m eval_experiments --method bc --folder='test_policies/bc/expB' --locations='[(0,4)]'
python -m eval_experiments --method gail --folder='test_policies/gail/expA' python -m eval_experiments --method gail --folder='test_policies/gail/expA'
python -m eval_experiments --method gail --folder='test_policies/gail/expB'--locations='[(0,4)]' python -m eval_experiments --method gail --folder='test_policies/gail/expB' --locations='[(0,4)]'
python -m eval_experiments --method hail python -m eval_experiments --method hail --folder='test_policies/hail/expA'
python -m eval_experiments --method hail --locations='[(0,4)]' python -m eval_experiments --method hail --folder='test_policies/hail/expB' --locations='[(0,4)]'
python -m eval_experiments --method shail python -m eval_experiments --method shail --folder='test_policies/shail/expA'
python -m eval_experiments --method shail --locations='[(0,4)]' python -m eval_experiments --method shail --folder='test_policies/shail/expB' --locations='[(0,4)]'

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.