From 9380ad8ec71d522742b4aec3f72cbf2d0183ffa4 Mon Sep 17 00:00:00 2001 From: avelichk Date: Fri, 8 Oct 2021 12:35:33 +0100 Subject: [PATCH] Modify developer guide --- docs/development/developer_guide.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/development/developer_guide.md b/docs/development/developer_guide.md index e70a50dfaf..7466af6eb6 100644 --- a/docs/development/developer_guide.md +++ b/docs/development/developer_guide.md @@ -1,6 +1,6 @@ # Developer Guide -Tf-operator is currently at v1. +Kubeflow Training Operator is currently at v1. ## Requirements @@ -15,7 +15,7 @@ mkdir -p ${go env GOPATH}/src/github.com/kubeflow ln -sf ${GIT_TRAINING} ${go env GOPATH}/src/github.com/kubeflow/training-operator ``` -* GIT_TRAINING should be the location where you checked out https://github.com/kubeflow/training-operator +- GIT_TRAINING should be the location where you checked out https://github.com/kubeflow/training-operator Install dependencies @@ -54,7 +54,7 @@ export KUBECONFIG=$(echo ~/.kube/config) export KUBEFLOW_NAMESPACE=$(your_namespace) ``` -* KUBEFLOW_NAMESPACE is used when deployed on Kubernetes, we use this variable to create other resources (e.g. the resource lock) internal in the same namespace. It is optional, use `default` namespace if not set. +- KUBEFLOW_NAMESPACE is used when deployed on Kubernetes, we use this variable to create other resources (e.g. the resource lock) internal in the same namespace. It is optional, use `default` namespace if not set. ### Create the TFJob CRD @@ -87,11 +87,14 @@ On ubuntu the default go package appears to be gccgo-go which has problems see [ ## Generate Python SDK To generate Python SDK for the operator, run: + ``` ./hack/python-sdk/gen-sdk.sh ``` + This command will re-generate the api and model files together with the documentation and model tests. The following files/folders in `sdk/python` are auto-generated and should not be modified directly: + ``` docs kubeflow/training/models @@ -103,15 +106,15 @@ test/*.py ### Python -* Use [yapf](https://github.com/google/yapf) to format Python code -* `yapf` style is configured in `.style.yapf` file -* To autoformat code +- Use [yapf](https://github.com/google/yapf) to format Python code +- `yapf` style is configured in `.style.yapf` file +- To autoformat code ```sh yapf -i py/**/*.py ``` -* To sort imports +- To sort imports ```sh isort path/to/module.py