Open mski-iksm opened 3 years ago
Is there a scene where you want to dynamically change the parameters of an instantiated class?
x = GokartTask(task_parameter=1) <- we can change
gokart.build(x)
@vaaaaanquish I believe that the parameter injection feature will be needed when
class ChildTask(TaskOnKart):
task_parameter2:int = luigi.IntParameter()
class RootTask(TaskOnKart):
task_parameter:int = luigi.IntParameter()
def requires(self):
return ChildTask()
x = RootTask(task_parameter=1)
gokart.build(x)
In such case, ChildTask.task_parameter2 must be set somehow. I think this may happen sometimes.
I see the demand.
Task parameters can be set at
gokart.run()
as following example.When using
gokart.build()
this is not possible, which makes changing parameters bothersome.