Commit d13f5789 authored by Benjamin Murauer's avatar Benjamin Murauer
Browse files

fixed bug in optional parameter name concatenation

parent 4454f494
......@@ -213,13 +213,13 @@ def _read_parameters(dictionary, prefix='', use_prefix=True):
if k == 'selected_model':
k = prefix + k if use_prefix else k
result[k] = str(v[0])
result.update(_read_parameters(v[1], v[0] + '__'))
result.update(_read_parameters(v[1], str(v[0]) + '__'))
# PipelineHelper is somewhere else
elif '__selected_model' in k:
# the [:-16] cuts off the string '__selected_model'
key_name = prefix + k[:-16] if use_prefix else k[:-16]
result[key_name] = str(v[0])
result.update(_read_parameters(v[1], v[0] + '__'))
result.update(_read_parameters(v[1], str(v[0]) + '__'))
# "Regular" GridSearch element
else:
key_name = prefix + k if use_prefix else k
......
Markdown is supported
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