Skip to content
Snippets Groups Projects
Commit ff7490e4 authored by Eloy Retamino's avatar Eloy Retamino Committed by Axel von Arnim
Browse files

Fusion effectuée properly-parsing-timeout (pull request #19)

[NRPJP-96] fixed timeout type was not being properly parsed in distributed experiments

* [NRRPLT-0000] fixed timeout type was not being properly parsed in distributed experiments
* Merged development into properly-parsing-timeout

Approuvé par : Ugo Albanese
Approuvé par : Michael Zechmair
parent 56f3f5b7
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,8 @@ def launch_cle(argv): # pragma: no cover
help='the simulation id to use', required=True)
parser.add_argument('--timeout', dest='timeout',
help='the simulation default time allocated', required=True)
parser.add_argument('--timeout_type', dest='timeout_type',
help='the time type for timeout', required=True)
parser.add_argument('--rng-seed', dest='rng_seed',
help='the global experiment RNG seed', required=True)
parser.add_argument('-v', '--verbose', action='store_true',
......@@ -91,8 +93,11 @@ def launch_cle(argv): # pragma: no cover
set_up_logger(None, args.verbose)
# parse the timeout string command line argument into a valid datetime
import dateutil.parser as datetime_parser
timeout_parsed = datetime_parser.parse(args.timeout.replace('_', ' '))
if args.timeout_type == "real":
import dateutil.parser as datetime_parser
timeout_parsed = datetime_parser.parse(args.timeout.replace('_', ' '))
else:
timeout_parsed = int(args.timeout)
# check the reservation argument, if empty default to None
if args.reservation == '':
......@@ -103,7 +108,7 @@ def launch_cle(argv): # pragma: no cover
gzserver_host=args.gzserver_host,
reservation=args.reservation,
timeout=timeout_parsed,
timeout_type="real",
timeout_type=args.timeout_type,
playback_path=None,
context_id=None,
token=args.token,
......
......@@ -102,6 +102,7 @@ class NestLauncher(object):
'--reservation={}'.format(reservation_str),
'--sim-id={}'.format(self._sim_config._sim_id),
'--timeout={}'.format(timeout_str),
'--timeout_type={}'.format(self._sim_config.timeout_type),
'--rng-seed={}'.format(rng_str),
'--token={}'.format(self._sim_config._token),
'--experiment_id={}'.format(self._sim_config.experiment_id),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment