In tutorial 3, the steps in question are as follows:
ensemble_step = Step(name='ensembler', input_steps=[gather_step], ...)
guesses_step = Step(name='guesses_maker', input_steps=[ensemble_step], ...)
evaluation_step = Step(name='evaluator', input_steps=[ensemble_step, guesses_step], ...)
When trying to create evaluation_step
, it raises the error: ValueError: Step with name "ensembler", already exist. Assign unique Step name.
Here is an example that reproduces this issue:
from steppy.base import Step, make_transformer
experiment_dir = "./example1"
data = {'dataset1':
{'a': [1, 2, 3, 4, 5],
'b': [1, -2, 3, -4, 5]}
}
multiply_step = Step(
name='multiply',
transformer=make_transformer(
lambda a, b: {"output": [i*j for i, j in zip(a,b)]}),
input_data=['dataset1'],
experiment_directory=experiment_dir,
is_fittable=False
)
half_step = Step(
name='half',
transformer=make_transformer(
lambda output: {"half": [i/2 for i in output]}),
input_steps=[multiply_step],
experiment_directory=experiment_dir,
is_fittable=False
)
add_step = Step(
name='add',
transformer=make_transformer(
lambda half, output: {"end": [i + j for i, j in zip(half,output)]}),
input_steps=[half_step, multiply_step],
is_fittable=False
)
Defining the add_step
will raise ValueError: Step with name "multiply", already exist. Assign unique Step name.