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
318 stars 57 forks source link

add TaskOnKart dump type #368

Closed kitagry closed 2 months ago

kitagry commented 7 months ago

Add type to TaskOnKart. we can set type.

class MyTask(gokart.TaskOnKart[str]):
    def run(self):
        self.dump(1)  # mypy error: expected str but got int
        self.dump('1')  # mypy ok