New RunLLM response generated: >>>*# Question* Hi...
# runllm-flyte-trial
a
New RunLLM response generated: >>>*# Question* Hi. I am looking at flytekitplugins/kfpytorch/task.py And I see that when using the Elastic plugin, a clean_pod_policy is not being set. This results in resources not being cleaned up automatically. The same setting is there for PyTorch tasks. Am I missing something? # Answer The
clean_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:
Copy code
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.