You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to run an async workflow in fix_get_action_develop branch and had an error with parameter initialization.
In order to study the error of parameter initialization, I printed the parameter information in EXARL/exarl/utils/candleDriver.py and EXARL/exarl/utils/globals.py files respectively.
"""EXARL/exarl/utils/candleDriver.py"""definitialize_parameters(params=None):
...
print('initialize_parameters :: if params is None? ', params==None)
ExaGlobals(params, candle.keras_default_config())
"""EXARL/exarl/utils/globals.py"""deflookup_params(key):
print(f'ExaGlobals Looking for {key} : run_params is None ? {ExaGlobals.__run_params==None}',)
ifExaGlobals.__run_paramsisNone:
raiseExaGlobals.GlobalsNotInitialized(key)
ifkeynotinExaGlobals.__run_params:
raiseExaGlobals.GlobalDoesNotExist(ExaGlobals.__run_params, key)
returnExaGlobals.__run_params[key]
For the 'agent' parameter shown below, the initialization in candleDriver.py is always normal. But in globals.py , sometimes the parameter is successfully found, and sometimes it is None.
initialize_parameters :: if params is None? False
ExaGlobals Looking for log_level : run_params is None ? False
ExaGlobals Looking for agent : run_params is None ? False
ExaGlobals Looking for env : run_params is None ? False
ExaGlobals Looking for workflow : run_params is None ? False
ExaGlobals Looking for learner_procs : run_params is None ? False
ExaGlobals Looking for process_per_env : run_params is None ? False
ExaGlobals Looking for n_episodes : run_params is None ? False
ExaGlobals Looking for n_steps : run_params is None ? False
ExaGlobals Looking for action_type : run_params is None ? False
ExaGlobals Looking for output_dir : run_params is None ? False
ExaGlobals Looking for mpi4py_rc : run_params is None ? False
Turning mpi4py.rc.threads and mpi4py.rc.recv_mprobe to false!
ExaGlobals Looking for env : run_params is None ? False
ExaGlobals Looking for agent : run_params is None ? False
ExaGlobals Looking for env : run_params is None ? True
ExaGlobals Looking for agent : run_params is None ? False
ExaGlobals Looking for env : run_params is None ? False
ExaGlobals Looking for workflow : run_params is None ? False
ExaGlobals Looking for learner_procs : run_params is None ? False
ExaGlobals Looking for process_per_env : run_params is None ? False
ExaGlobals Looking for n_episodes : run_params is None ? False
ExaGlobals Looking for n_steps : run_params is None ? False
ExaGlobals Looking for action_type : run_params is None ? False
ExaGlobals Looking for output_dir : run_params is None ? False
ExaGlobals Looking for mpi4py_rc : run_params is None ? False
Turning mpi4py.rc.threads and mpi4py.rc.recv_mprobe to false!
ExaGlobals Looking for agent : run_params is None ? True
ExaGlobals Looking for env : run_params is None ? False
ExaGlobals Looking for agent : run_params is None ? False
ExaGlobals Looking for agent : run_params is None ? True
[Errno 2] No such file or directory: '/EXARL/results/EXP000/RUN012'
Could not load candle parameters.
Traceback (most recent call last):
File "start.py", line 21, in<module>
exa_learner = erl.ExaLearner(comm)
File "/EXARL/exarl/base/learner_base.py", line 27, in __init__
agent_id = ExaGlobals.lookup_params('agent')
File "/EXARL/exarl/utils/globals.py", line 112, in lookup_params
raise ExaGlobals.GlobalsNotInitialized(key)
exarl.utils.globals.GlobalsNotInitialized: ExaRL globals have not been set. Trying agent
How can I fix this mistake?
The text was updated successfully, but these errors were encountered:
I think I've found the reason for the error. Sometimes it try to delete folder that don't exist in candlelib. I don't know what causes this, but it does come up all the time. When I remove shutil.rmtree(outdir), it works fine.
Traceback (most recent call last):
File "start.py", line 5, in<module>
import exarl.utils.analyze_reward as ar
File "/EXARL/exarl/__init__.py", line 3, in<module>candleDriver.initialize_parameters()
File "/EXARL/exarl/utils/candleDriver.py", line 92, in initialize_parameters
params = candle.finalize_parameters(driver)
File "/EXARL/exarl/candlelib/default_utils.py", line 365, in finalize_parameters
gParameters = args_overwrite_config(args, fileParameters)
File "/EXARL/exarl/candlelib/default_utils.py", line 621, in args_overwrite_config
params['output_dir'] = directory_from_parameters(params, params['output_dir'])
File "/EXARL/exarl/candlelib/default_utils.py", line 730, in directory_from_parameters
shutil.rmtree(outdir)
File "/public/software/apps/DeepLearning/TensorFlow/tf2.7.0-dtk21.10-build/lib/python3.6/shutil.py", line 490, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/public/software/apps/DeepLearning/TensorFlow/tf2.7.0-dtk21.10-build/lib/python3.6/shutil.py", line 488, in rmtree
os.rmdir(path)
FileNotFoundError: [Errno 2] No such file or directory: '/EXARL/results/EXP000/RUN009'
I was trying to run an async workflow in
fix_get_action_develop
branch and had an error with parameter initialization.In order to study the error of parameter initialization, I printed the parameter information in
EXARL/exarl/utils/candleDriver.py
andEXARL/exarl/utils/globals.py
files respectively.For the 'agent' parameter shown below, the initialization in
candleDriver.py
is always normal. But inglobals.py
, sometimes the parameter is successfully found, and sometimes it is None.How can I fix this mistake?
The text was updated successfully, but these errors were encountered: