Skip to content

Support chaining operation in OOP API #1688

@ngupta23

Description

@ngupta23

Is your feature request related to a problem? Please describe.
Chaining of methods is generally easier to read compared to nested functions.

# Nested functions
best_dt = ensemble_model(tune_model(create_model('dt'), choose_better=True), choose_better=True)

Describe the solution you'd like

Chaining of methods in OOP API. Example here

best_model = (
    experiment
    .create_model('lr')
    .tune_model(choose_better=True)
    .ensemble_model(choose_better=True)
)

Additional context

  • We could provide an argument in setup called enable_chaining = True that will switch from returning the models to returning the experiment object which will enable the chaining.
  • Also, internally, we will have to store the results from all steps so that they can be referenced in the next step.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions