m3dev / gokart

Gokart solves reproducibility, task dependencies, constraints of good code, and ease of use for Machine Learning Pipeline.
https://gokart.readthedocs.io/en/latest/
MIT License
305 stars 57 forks source link

Feature/add inherits config params #151

Closed mski-iksm closed 3 years ago

mski-iksm commented 3 years ago

Added feature to set task parameter by inheritance. (This was originally implemented by @e-mon . Thanks!)

You may now set parameter in following decorator.

class MasterConfig(luigi.Config):
    param: str = luigi.Parameter()
    param2: str = luigi.Parameter()

@inherits_config_params(MasterConfig)
class SomeTask(gokart.TaskOnKart):
    param: str = luigi.Parameter()

This is useful when setting same parameter to multiple tasks.

Please review. @Hi-king @e-mon @hirosassa @vaaaaanquish

Hi-king commented 3 years ago

@mski-iksm cool feature! LGTM!

Hi-king commented 3 years ago

@e-mon @hirosassa any comments?

hirosassa commented 3 years ago

Good feature! LGTM

Hi-king commented 3 years ago

@mski-iksm I'll merge this! Thx :)