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

Alykhan Tejani

03/18/2024, 6:54 PM
is there a way to achieve the async execution of
launch_other_task
?
b

Blake Jackson

03/18/2024, 7:02 PM
Have you seen the FileSensor? Would this solve your problem? https://docs.flyte.org/en/latest/flytesnacks/examples/sensor/file_sensor_example.html
a

Alykhan Tejani

03/18/2024, 7:06 PM
maybe but not in an ideal way. I am actually using
tf.train.checkpoint_iterator
which is a tensorflow function to poll for new checkpoints
so the logic of detecting a checkpoint is handled there
s

Samhita Alla

03/19/2024, 1:44 PM
you could define a sensor to wait for the file to become available, similar to the file sensor: https://github.com/flyteorg/flytekit/blob/master/flytekit/sensor/file_sensor.py
a

Alykhan Tejani

03/19/2024, 1:45 PM
problem is I dont know what the file is called
s

Samhita Alla

03/19/2024, 1:45 PM
how are you polling?
a

Alykhan Tejani

03/19/2024, 1:46 PM
atm using tf.train.checkpoint_iterator
which does the checking internally
and polling
s

Samhita Alla

03/19/2024, 1:47 PM
you could define a new sensor to handle this. have you tried triggering a task from within your dynamic workflow?
a

Alykhan Tejani

03/19/2024, 1:47 PM
yes Im trying that now