<#313 Discard fields when replica number equals ze...
# flyte-github
a
#313 Discard fields when replica number equals zero to avoid api client error Pull request opened by ByronHsu TL;DR In some versions of tensorflow CRD, there is an enforcement to restrict the minimum number of replica. If users pass in 0 as the number of replicas, the k8s client will throw an error at runtime. The field should be discarded if the number of replicas is zero. Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Bug In the order version of tfjob CRD, it will validate the minimum number of replicas. If the replica == 0 but the field exists, the kubeflow client will fail. Test
Copy code
byhsu@byhsu-ld1 ~/local-repo/flyte/flyteplugins gh-tf-replica-bug* ❯ go test <http://github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow|github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow>
ok      <http://github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow|github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/kfoperators/tensorflow>    0.072s
Are all requirements met? ☑︎ Code completed ☐ Smoke tested ☑︎ Unit tests added ☑︎ Code documentation added ☐ Any pending items have an associated Issue flyteorg/flyteplugins All checks have passed 6/6 successful checks