<#1678 Dep: Use protos of new `kubeflow.pytorch` p...
# flyte-github
a
#1678 Dep: Use protos of new `kubeflow.pytorch` plugin instead of legacy `pytorch` plugin Pull request opened by fg91 TL;DR In flyteorg/flyteidl@5a3a44f the kubeflow training operator plugins' protos where refactored. In this PR I update the task to use the new
flyteidl.plugins.kubeflow.pytorch_pb2.ElasticConfig
instead of the legacy
from flyteidl.plugins.pytorch_pb2.ElasticConfig
(notice the addional
kubeflow
). Without this fix, registration fails with this error:
Copy code
│ /home/fabiogratz/miniconda3/envs/dev/lib/python3.9/site-packages/flytekitplugins/kfpytorch/task.py:371 in get_custom                               │
│                                                                                                                                                    │
│ ❱ 371 │   │   │   job = pytorch_task.DistributedPyTorchTrainingTask(                                                                               │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Parameter to MergeFrom() must be instance of same class: expected <class 'flyteidl.plugins.kubeflow.pytorch_pb2.ElasticConfig'> got <class 
'flyteidl.plugins.pytorch_pb2.ElasticConfig'>.
Here, I used
flytekit==1.6.2
and
flyteidl==1.5.8
and the cluster was running images of version
1.6.0
. I pin
flyteidl
to at least version
1.5.1
which introduced the new
flyteidl.plugins.kubeflow
module. Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☐ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description NA Tracking Issue NA Follow-up issue NA flyteorg/flytekit All checks have passed 30/30 successful checks