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

[future]not specification requires target #179

Closed vaaaaanquish closed 3 years ago

vaaaaanquish commented 3 years ago
class foo(gokart.TaskOnKart):
    target = gokart.TaskInstancePrameter()

    def run(self):
        self.load_data_frame(required_columns={'foo'})    # AttributeError: 'dict' object has no attribute 'empty'

When the length of the dict is 1, what to load of require task.

Hi-king commented 3 years ago

I think dict output cannot be used with load_data_frame. With load_data_frame keys of dict will be lost.

Hi-king commented 3 years ago

OK, I've realized point is that you need shorthand of self.load_data_frame("target") with self.load_data_frame()

vaaaaanquish commented 3 years ago

merged #180