Skip to content

Commit

Permalink
add clientset for mpijob, pytorchjob, mxjob, and xgboostjob
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzen-y committed Jun 11, 2022
1 parent a579f63 commit 230baee
Show file tree
Hide file tree
Showing 215 changed files with 7,152 additions and 6,960 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Image URL to use all building/pushing image targets
IMG ?= kubeflow/training-operator:latest
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
Expand Down Expand Up @@ -69,7 +68,7 @@ HAS_SETUP_ENVTEST := $(shell command -v setup-envtest;)
testall: manifests generate fmt vet golangci-lint test ## Run tests.

test: envtest
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out
KUBEBUILDER_ASSETS="$(shell setup-envtest --arch=amd64 use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out

envtest:
ifndef HAS_SETUP_ENVTEST
Expand Down
8 changes: 4 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@ resources:
controller: true
group: kubeflow.org
kind: XGBoostJob
path: github.com/kubeflow/training-operator/pkg/apis/xgboost/v1
path: github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1
version: v1
- api:
crdVersion: v1
namespaced: true
controller: true
group: kubeflow.org
kind: PyTorchJob
path: github.com/kubeflow/training-operator/pkg/apis/pytorch/v1
path: github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1
version: v1
- api:
crdVersion: v1
namespaced: true
controller: true
group: kubeflow.org
kind: TFJob
path: github.com/kubeflow/training-operator/pkg/apis/tensorflow/v1
path: github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1
version: v1
- api:
crdVersion: v1
namespaced: true
controller: true
group: kubeflow.org
kind: MXJob
path: github.com/kubeflow/training-operator/pkg/apis/mxnet/v1
path: github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1
version: v1
version: "3"
12 changes: 2 additions & 10 deletions cmd/training-operator.v1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"

commonutil "github.com/kubeflow/common/pkg/util"
mpiv1 "github.com/kubeflow/training-operator/pkg/apis/mpi/v1"
mxnetv1 "github.com/kubeflow/training-operator/pkg/apis/mxnet/v1"
pytorchv1 "github.com/kubeflow/training-operator/pkg/apis/pytorch/v1"
tensorflowv1 "github.com/kubeflow/training-operator/pkg/apis/tensorflow/v1"
xgboostv1 "github.com/kubeflow/training-operator/pkg/apis/xgboost/v1"
kubeflowv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
"github.com/kubeflow/training-operator/pkg/config"
controllerv1 "github.com/kubeflow/training-operator/pkg/controller.v1"
//+kubebuilder:scaffold:imports
Expand All @@ -48,11 +44,7 @@ var (

func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(xgboostv1.AddToScheme(scheme))
utilruntime.Must(pytorchv1.AddToScheme(scheme))
utilruntime.Must(tensorflowv1.AddToScheme(scheme))
utilruntime.Must(mxnetv1.AddToScheme(scheme))
utilruntime.Must(mpiv1.AddToScheme(scheme))
utilruntime.Must(kubeflowv1.AddToScheme(scheme))
//+kubebuilder:scaffold:scheme
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
k8s.io/code-generator v0.24.1
k8s.io/klog v1.0.0
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
sigs.k8s.io/controller-runtime v0.12.1
sigs.k8s.io/yaml v1.3.0
volcano.sh/apis v1.2.0-k8s1.19.6
Expand Down Expand Up @@ -86,7 +87,6 @@ require (
k8s.io/component-base v0.24.1 // indirect
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
)
2 changes: 1 addition & 1 deletion hack/python-sdk/gen-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [[ ! -f "$SWAGGER_CODEGEN_JAR" ]]; then
fi

echo "Generating swagger file ..."
go run "${repo_root}"/hack/python-sdk/main.go ${VERSION} >"${SWAGGER_CODEGEN_FILE}"
go run "${repo_root}"/hack/swagger/main.go ${VERSION} >"${SWAGGER_CODEGEN_FILE}"

echo "Removing previously generated files ..."
rm -rf "${SDK_OUTPUT_PATH}"/docs/V1*.md "${SDK_OUTPUT_PATH}"/kubeflow/training/models "${SDK_OUTPUT_PATH}"/kubeflow/training/*.py "${SDK_OUTPUT_PATH}"/test/*.py
Expand Down
Loading

0 comments on commit 230baee

Please sign in to comment.