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

Fix `TaskOnKart.fix_random_seed_value` cannnot handle None #287

Closed Hi-king closed 2 years ago

Hi-king commented 2 years ago

resolve https://github.com/m3dev/gokart/issues/286

Problem

Cannot set None for luigi.IntParameter. But TaskOnKart.fix_random_seed_value does this.

So following code fails

        task = gokart.TaskOnKart()
        luigi.task_register.load_task(None, task.get_task_family(), task.to_str_params())

Solution

Hi-king commented 2 years ago

OptionalIntParameter introduced by https://github.com/spotify/luigi/pull/3079 can solve this, but not yet released...