ancient-wolf-19325
06/19/2024, 11:36 PMclean_pod_policy is indeed a configurable option for PyTorch tasks but not explicitly mentioned for Elastic tasks in the provided data sources. You can set clean_pod_policy for PyTorch tasks using the RunPolicy configuration, as shown in the Flytekit Kubeflow PyTorch Plugin README.
Example for PyTorch tasks:
from flytekitplugins.kfpytorch import PyTorch, Worker, RunPolicy, CleanPodPolicy
@task(
task_config=PyTorch(
worker=Worker(replicas=5),
run_policy=RunPolicy(clean_pod_policy=CleanPodPolicy.ALL)
),
image="test_image",
resources=Resources(cpu="1", mem="1Gi"),
)
def pytorch_job():
...
However, for the Elastic plugin, the provided data sources do not explicitly mention the clean_pod_policy configuration. This might be an oversight or a feature that is not yet implemented for Elastic tasks.
Would you like more detail or help with a workaround?
Sources:
- Flytekit Kubeflow PyTorch Plugin README
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1718840160.260989 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.