Based on the discussion with @noobOriented and @SoluMilken , the serialization mechanism of steps may be modified.
The _step and _step_info are strongly coupled. We can set op_name and op_kwargs as init variables of _Step, then drop _step_info. However, I think this may break the "Single responsibility" principle since the creation of op now became part of step initialization. _Step should only care about the state handling of ops.
The serialization of each step should be handled by step itself, so this line can be written as:
Based on the discussion with @noobOriented and @SoluMilken , the serialization mechanism of steps may be modified.
The
_step
and_step_info
are strongly coupled. We can setop_name
andop_kwargs
as init variables of_Step
, then drop_step_info
. However, I think this may break the "Single responsibility" principle since the creation of op now became part of step initialization._Step
should only care about the state handling of ops.The serialization of each step should be handled by step itself, so this line can be written as: