You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
🚀 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:
etc.
Do not return anything:
etc.
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.The text was updated successfully, but these errors were encountered: