ancient-wolf-19325
08/09/2024, 3:39 PM@task decorator. Additionally, you can configure default task resources in the Flyte configuration.
Here is an example of how to set resource requests and limits in a task:
from flytekit import task, Resources
@task(
requests=Resources(mem="1000Mi"),
limits=Resources(mem="2000Mi")
)
def my_task():
# Task implementation
pass
For setting default task resources in the Flyte configuration, you can modify the values.yaml file as follows:
configuration:
inline:
task_resources:
defaults:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "2"
memory: "2Gi"
Would you like more details on how to implement these changes or further troubleshooting steps?
Sources:
- Flyte Discussion
- Flyte Configuration
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1723217965.492619 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.