Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
perceptualrobots committed Aug 25, 2023
1 parent e58d58a commit 08ae73c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions nbs/04_hierarchy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1087,16 +1087,18 @@
"\n",
"\n",
" @classmethod\n",
" def run_from_file(cls, filename, seed=None, render=False, history=False, move=None, plots=None, hpct_verbose= False, runs=None, outdir=None, early_termination = None):\n",
" def run_from_file(cls, filename, env_props=None, seed=None, render=False, history=False, move=None, plots=None, hpct_verbose= False, runs=None, outdir=None, early_termination = None):\n",
" \n",
" prp = PCTRunProperties()\n",
" prp.load_db(filename)\n",
"\n",
" error_collector_type = prp.db['error_collector_type'].strip()\n",
" error_response_type = prp.db['error_response_type']\n",
" error_limit = eval(prp.db['error_limit'])\n",
" environment_properties = eval(prp.db['environment_properties'])\n",
" \n",
" if env_props is None:\n",
" environment_properties = eval(prp.db['environment_properties'])\n",
" else:\n",
" environment_properties = env_props \n",
" error_properties = prp.get_error_properties()\n",
" \n",
" if runs==None:\n",
Expand Down
8 changes: 5 additions & 3 deletions pct/hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,16 +1009,18 @@ def run_from_config(cls, config, min, render=False, error_collector_type=None,


@classmethod
def run_from_file(cls, filename, seed=None, render=False, history=False, move=None, plots=None, hpct_verbose= False, runs=None, outdir=None, early_termination = None):
def run_from_file(cls, filename, env_props=None, seed=None, render=False, history=False, move=None, plots=None, hpct_verbose= False, runs=None, outdir=None, early_termination = None):

prp = PCTRunProperties()
prp.load_db(filename)

error_collector_type = prp.db['error_collector_type'].strip()
error_response_type = prp.db['error_response_type']
error_limit = eval(prp.db['error_limit'])
environment_properties = eval(prp.db['environment_properties'])

if env_props is None:
environment_properties = eval(prp.db['environment_properties'])
else:
environment_properties = env_props
error_properties = prp.get_error_properties()

if runs==None:
Expand Down

0 comments on commit 08ae73c

Please sign in to comment.