Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in Return Value of Functional Algorithms #1441

Closed
nik-mosaic opened this issue Aug 24, 2022 · 2 comments
Closed

Inconsistency in Return Value of Functional Algorithms #1441

nik-mosaic opened this issue Aug 24, 2022 · 2 comments
Assignees
Labels
enhancement New (engineering) enhancements, such as features or API changes.

Comments

@nik-mosaic
Copy link
Contributor

nik-mosaic commented Aug 24, 2022

🚀 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.

@nik-mosaic nik-mosaic added the enhancement New (engineering) enhancements, such as features or API changes. label Aug 24, 2022
@hanlint
Copy link
Contributor

hanlint commented Aug 25, 2022

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.

@mvpatel2000
Copy link
Contributor

Closed as done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New (engineering) enhancements, such as features or API changes.
Projects
None yet
Development

No branches or pull requests

4 participants