Source: <https://www.union.ai/docs/flyte/tutorials...
# flyte-support
c
Source: https://www.union.ai/docs/flyte/tutorials/model-training/mnist-classifier/#distributed-data-parallel-training > Flyte also supports distributed training for PyTorch models, but this is not native. It is achieved using {ref}`kf-pytorch-op`, for example. what does this mean that its not native? is there a tutorial for this?
f
Aah docs problem cc @powerful-gold-59386
The non native refers to it uses an external plugin that you have to install
It does not ship with default
@powerful-gold-59386 we should say it’s not default
@curved-whale-1505 you have to install the KF training operator
p
got it
f
Also @powerful-gold-59386 - I wouldn’t say not native. I would say - needs additional dependencies. Also it seems the ref is not working
c
Are there any public examples showing how to use Kubeflow Trainer with Flyte?
f
Ya
@curved-whale-1505 sorry but something is wrong with docs rendering - we are looking Here is raw code https://github.com/flyteorg/flytesnacks/blob/c9b2c44dc5d0ce42e482be1ffb16c8b19e72c23c/examples/kfpytorch_plugin/kfpytorch_plugin/pytorch_mnist.py#L204
You need the decorator that’s it
c
oh that's awesome, thanks!
f
Let me look at what’s happening with the docs
So @curved-whale-1505 basically idea is everything is @task and if you want special plugin - you can develop anything you use task_config=…
This will select the backend capability
For example Ray, Spark, dask, distributed training, sagemaker, slurm etc
This keeps code locally runnable To
Inputs are auto passed
And outputs read
Cc @wooden-london-36069 fyi
@curved-whale-1505 actually the doc is there - just the link is weirdly missing from the DDP page - https://www.union.ai/docs/flyte/integrations/native-backend-plugins/kfpytorch_plugin/pytorch_mnist/
c
which version of KF Training Operator does Flyte support? V1 or V2 or both? https://www.kubeflow.org/docs/components/trainer/legacy-v1/
Reading the code here: https://github.com/flyteorg/flytekit/blob/master/plugins/flytekit-kf-pytorch/flytekitplugins/kfpytorch/task.py It seems to point to the deprecated training-operator repository: https://github.com/kubeflow/pytorch-operator Does it still work with the latest release of KF Training Operator V1?
f
Ohh man sorry about that