https://flyte.org logo
#ask-the-community
Title
# ask-the-community
e

ewam

02/03/2023, 10:45 AM
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

Samhita Alla

02/06/2023, 4:53 AM
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
.
30 Views