Hey, couple of questions related to file sensors: ...
# flyte-support
m
Hey, couple of questions related to file sensors: • I am trying to create a custom file sensor which inherits from
BaseSensor
but it did not worked, this sensor failed with
rpc error: code = Internal desc = failed to get sensor task with error: No module named 'src'.…
error. Do we need to register "cusom sensor" somewhere? Tried asking this question to @ancient-wolf-19325 but it suggests to build an entirely new
docker image
which sounds like an overkill. • Any idea if and when this feature of
sensor timeout
will be shipped? https://github.com/flyteorg/flytekit/pull/2745 šŸ™‚
j
It seems likely that when creating a custom file sensor in Flyte, you need to ensure that the sensor is properly registered and available in the environment where Flyte is running. According to the Flyte documentation, custom sensors should be implemented by extending the
BaseSensor
class and may require additional setup, such as building a Docker image, to ensure all dependencies are included. This might seem extensive, but it ensures the sensor is correctly integrated into the Flyte ecosystem. Regarding the sensor timeout feature, it appears that there is ongoing discussion and development around this functionality. The GitHub issue suggests that the community is aware of the need for sensor timeouts, but it is not yet available. The feature is being considered for future updates, but there is no specific timeline for its release. Would you like more detailed information on either topic? Sources: - Flyte documentation on developing agents - GitHub issue šŸ‘ 0 button šŸ‘Ž 1 button šŸ’” Hint: Mention @ancient-wolf-19325 in the thread for followups.
m
Hi @average-finland-92144 could you please help me with the above question? tldr; do we need to register custom file sensor after writing it ?
a
@millions-night-34157 sorry for the delays. I'm assuming you already added the following to your configuration? https://docs.flyte.org/en/latest/deployment/agents/sensor.html#specify-agent-configuration
@millions-night-34157 FileSensor timeout was released last week in
flytekit>=1.15.3