cuddly-jelly-27016
03/07/2025, 5:21 PMincrease_shared_mem flag in flytekitplugins-kf-pytorch in favor of new native @task argument
Pull request opened by fg91
#2543 introduced a convenience flag increase_shared_mem to the task configs provided by the kfpytorch plugins (PyTorch and Elastic). If specified, a shared memory volume mount is added to the pod template under the hood.
The flytekit 1.15.0 release introduced a similar flag to the @task decorator itself. Instead of using the pod template to configure the volume mount on the flytekit side, there is proper support in flyteidl and the volume mount is added in flytepropeller.
The flag on the @task level also works for the distributed kfpytorch plugin task types which means there are now two ways to increase shared memory for pytorch jobs.
Let's mark the kfpytorch-plugin specific mechanism as deprecated so that users switch to the native one and we can eventually delete this code.
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
### Summary by Bito
This PR deprecates the increase_shared_mem flag in kfpytorch plugin, directing users to use the native @task(shared_memory=...) functionality instead. It updates deprecation messages, refines condition checks in pod templates and task implementations, and adds tests to verify that the shared_memory flag takes precedence correctly. Warning messages and updated docstrings have been added to alert users about this deprecation.
Unit tests added: True
Estimated effort to review (1-5, lower is better): 1
flyteorg/flytekitcuddly-jelly-27016
03/08/2025, 8:32 PM