New RunLLM response generated: >>>*# Question* Is...
# runllm-flyte-trial
a
New RunLLM response generated: >>>*# Question* Is there a way to get the current task restart count? Couldn't find it from current_context() # Answer The current task restart count can be accessed using the
ExecutionContext
in Flyte. Specifically, you can use the
CurrentTaskExecutionCount
method to retrieve this information. This method is part of the
ExecutionContext
interface in Flyte's codebase. Here's a snippet illustrating how you might access the `CurrentTaskExecutionCount`:
Copy code
type ExecutionContext interface {
    ...
    CurrentTaskExecutionCount() uint32
    ...
}
For more detailed usage, you might need to look into the FlytePropeller's executor package, which defines the
ExecutionContext
interface and its methods. Would you like more detail on how to implement this in your specific context? Sources: - Flyte ExecutionContext - Flyte ExecutionContext Mock Slack Link https://flyte-org.slack.com/archives/CP2HDHKE1/p1719862283.432239 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.