composer
composer copied to clipboard
Inconsistency in Return Value of Functional Algorithms
🚀 Feature request
Some algorithms return the model
at the end of the apply_algorithm() function, others return None. It is not obvious to the user if there is a reason behind this, and why the return types are not consistent.
E.g. Returns model:
Do not return anything:
Motivation
In some cases a user could type model = apply_algorithm(model)
and it will succeed as expected, and in other cases it will silently cause model to equal None. Without looking at the source code, the user will not know why.
Solution
Add return model
to the end of every algorithm that currently returns None.
Yes, agreed that we need a consistent rule here! cc: @dblalock to opine on whether these in-place operations should actually return the model
, or just always return None
.
Closed as done