superduper
superduper copied to clipboard
Remove all __post_init__ from Component/Model subclasses.
trafficstars
When implementing a new class, we use post_init to handle initialization logic. However, we must not call parent class methods.
def __post_init__(self, db, artifacts):
super().__post_init__(db, artifacts)
This is unnecessary for overriding a new class.
We can remove the initialization of post_init in the ext module and use the init function instead.
Ultimately, we only need to implement three methods:
• init (optional)
• predict_one
• predict
Additionally, we can use init for lazy loading, performing initialization only during actual function calls.