I found the `@dynamic` decorator. Is it true that ...
# ask-the-community
e
I found the
@dynamic
decorator. Is it true that I can use it to: • run a thread that e.g. looks for new data • if new data is found: ◦ spawn a new subgraph ▪︎ rebuild the dataset ▪︎ cancel the current training ▪︎ (re)start training task ?
s
The dynamic decorator is helpful when the input data is user-given or dynamic. I think here you can use a combination of
conditional
and
dynamic
/ subworkflow. To cancel the training, you can include an approval signal if that's user-given or that can be automated too. You can use
FlyteRemote
to abort an execution, but you must be knowing the execution ID beforehand. You can restart the training task by say, triggering a
@workflow
or a
LaunchPlan
.
152 Views