Add fix
@@ -2167,7 +2167,24 @@ def _add_task_flags_to_agent_opt(agent, opt: Opt, flags):
for f in fl:
if '=' in f:
one_flag = f.split('=')
- opt[one_flag[0].replace('-', '_')] = one_flag[1].replace(';', ':')
+ key = one_flag[0].replace('-', '_')
+ raw_value = one_flag[1].replace(';', ':')
+
+ # Convert to bool/int/float if necessary
+ if raw_value.lower() == 'true':
+ value = True
+ elif raw_value.lower() == 'false':
+ value = False
+ else:
+ try:
+ value = int(raw_value)
+ except ValueError:
+ try:
+ value = float(raw_value)
+ except ValueError:
+ value = raw_value
+
+ opt[key] = value
else:
task.append(f)
opt['task'] = ':'.join(task)
