Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
training-operator | training-operator-master/pkg/common/util/reconciler_generic.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 4,749 | 34.447761 | 113 | go |
training-operator | training-operator-master/pkg/common/util/reconciler_test.go | package util
import (
"testing"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/event"
kubeflowv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
"github.com/kubeflow/training-operator/pk... | 1,412 | 22.55 | 77 | go |
training-operator | training-operator-master/pkg/common/util/scheduler.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,218 | 32.861111 | 113 | go |
training-operator | training-operator-master/pkg/common/util/util.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 2,543 | 28.241379 | 118 | go |
training-operator | training-operator-master/pkg/common/util/util_test.go | // Copyright 2022 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,672 | 28.384 | 88 | go |
training-operator | training-operator-master/pkg/config/config.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,519 | 40.081081 | 102 | go |
training-operator | training-operator-master/pkg/controller.v1/register_controller.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,761 | 43.785714 | 140 | go |
training-operator | training-operator-master/pkg/controller.v1/register_controller_test.go | // Copyright 2022 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,951 | 24.350649 | 80 | go |
training-operator | training-operator-master/pkg/controller.v1/common/job.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 14,796 | 34.828087 | 159 | go |
training-operator | training-operator-master/pkg/controller.v1/common/job_controller.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 10,037 | 35.904412 | 140 | go |
training-operator | training-operator-master/pkg/controller.v1/common/job_test.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 6,390 | 28.05 | 110 | go |
training-operator | training-operator-master/pkg/controller.v1/common/pod.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 17,746 | 35.972917 | 149 | go |
training-operator | training-operator-master/pkg/controller.v1/common/pod_test.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | 5,601 | 25.803828 | 105 | go |
training-operator | training-operator-master/pkg/controller.v1/common/scheduling.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 5,093 | 32.077922 | 160 | go |
training-operator | training-operator-master/pkg/controller.v1/common/service.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | 10,278 | 36.652015 | 165 | go |
training-operator | training-operator-master/pkg/controller.v1/common/service_test.go | package common
import (
"testing"
"github.com/kubeflow/training-operator/pkg/core"
apiv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestCalculate... | 2,430 | 19.956897 | 71 | go |
training-operator | training-operator-master/pkg/controller.v1/common/status.go | package common
import (
apiv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
"github.com/kubeflow/training-operator/pkg/core"
corev1 "k8s.io/api/core/v1"
)
// initializeReplicaStatuses initializes the ReplicaStatuses for replica.
func initializeReplicaStatuses(jobStatus *apiv1.JobStatus, rtype ap... | 631 | 34.111111 | 101 | go |
training-operator | training-operator-master/pkg/controller.v1/common/status_test.go | package common
import (
"testing"
"time"
apiv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestUpdateJobReplicaStatuses(t *testing.T) {
jobStatus := apiv1.JobStatus{}
ini... | 1,578 | 30.58 | 122 | go |
training-operator | training-operator-master/pkg/controller.v1/common/util.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,767 | 24.808219 | 142 | go |
training-operator | training-operator-master/pkg/controller.v1/common/util_test.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,833 | 21.096386 | 75 | go |
training-operator | training-operator-master/pkg/controller.v1/control/controller_ref_manager.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 13,757 | 35.110236 | 155 | go |
training-operator | training-operator-master/pkg/controller.v1/control/controller_ref_manager_test.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 13,448 | 34.959893 | 152 | go |
training-operator | training-operator-master/pkg/controller.v1/control/pod_control.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 9,982 | 34.400709 | 178 | go |
training-operator | training-operator-master/pkg/controller.v1/control/pod_control_test.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 2,803 | 33.617284 | 166 | go |
training-operator | training-operator-master/pkg/controller.v1/control/podgroup_control.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 6,933 | 33.67 | 119 | go |
training-operator | training-operator-master/pkg/controller.v1/control/service_control.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 7,839 | 36.333333 | 177 | go |
training-operator | training-operator-master/pkg/controller.v1/control/service_control_test.go | // Copyright 2019 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 4,546 | 32.433824 | 102 | go |
training-operator | training-operator-master/pkg/controller.v1/control/utils.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 1,659 | 30.923077 | 139 | go |
training-operator | training-operator-master/pkg/controller.v1/expectation/expectation.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 9,301 | 40.713004 | 140 | go |
training-operator | training-operator-master/pkg/controller.v1/expectation/expectation_test.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 5,265 | 33.418301 | 105 | go |
training-operator | training-operator-master/pkg/controller.v1/expectation/util.go | package expectation
import (
"strings"
)
// GenExpectationPodsKey generates an expectation key for pods of a job
func GenExpectationPodsKey(jobKey string, replicaType string) string {
return jobKey + "/" + strings.ToLower(replicaType) + "/pods"
}
// GenExpectationPodsKey generates an expectation key for services o... | 471 | 28.5 | 75 | go |
training-operator | training-operator-master/pkg/controller.v1/mpi/mpijob.go | // Copyright 2019 The Kubeflow Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 8,954 | 32.289963 | 151 | go |
training-operator | training-operator-master/pkg/controller.v1/mpi/mpijob_controller.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 51,821 | 35.805398 | 202 | go |
training-operator | training-operator-master/pkg/controller.v1/mpi/mpijob_controller_test.go | // Copyright 2021 The Kubeflow Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 26,472 | 31.682716 | 159 | go |
training-operator | training-operator-master/pkg/controller.v1/mpi/suite_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,162 | 28.839623 | 96 | go |
training-operator | training-operator-master/pkg/controller.v1/mxnet/mxjob_controller.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 19,383 | 37.536779 | 172 | go |
training-operator | training-operator-master/pkg/controller.v1/mxnet/mxnet.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 6,625 | 25.717742 | 99 | go |
training-operator | training-operator-master/pkg/controller.v1/mxnet/suite_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 2,249 | 28.220779 | 96 | go |
training-operator | training-operator-master/pkg/controller.v1/paddlepaddle/envvar.go | // Copyright 2022 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 5,995 | 33.65896 | 126 | go |
training-operator | training-operator-master/pkg/controller.v1/paddlepaddle/paddlepaddle_controller.go | // Copyright 2022 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 22,087 | 38.442857 | 180 | go |
training-operator | training-operator-master/pkg/controller.v1/paddlepaddle/paddlepaddle_controller_suite_test.go | // Copyright 2022 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 2,985 | 27.990291 | 96 | go |
training-operator | training-operator-master/pkg/controller.v1/paddlepaddle/paddlepaddle_controller_test.go | // Copyright 2022 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 6,095 | 32.130435 | 111 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/elastic.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 6,014 | 28.925373 | 161 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/elastic_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,189 | 23.921875 | 80 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/envvar.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 5,643 | 33 | 105 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/hpa.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,070 | 30.020202 | 90 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/initcontainer.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,896 | 27.445255 | 170 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/initcontainer_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,232 | 28.126126 | 96 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/master.go | package pytorch
import (
"strconv"
"sync"
corev1 "k8s.io/api/core/v1"
kubeflowv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
)
var (
masterGenerator EnvVarGenerator
onceMaster sync.Once
EnvMasterPort = "MASTER_PORT"
EnvMasterAddr = "MASTER_ADDR"
PETMasterPort = "PET_MASTER_PO... | 1,509 | 22.968254 | 92 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/pytorchjob_controller.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 22,812 | 39.520426 | 182 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/pytorchjob_controller_suite_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,243 | 29.037037 | 96 | go |
training-operator | training-operator-master/pkg/controller.v1/pytorch/pytorchjob_controller_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 10,784 | 32.808777 | 112 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/job_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 26,655 | 32.195517 | 182 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/pod_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 18,196 | 32.206204 | 138 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/status_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 20,494 | 33.215359 | 185 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/suite_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,593 | 29.201681 | 96 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/tensorflow.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 6,457 | 33.169312 | 114 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/tensorflow_test.go | // Copyright 2020 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,825 | 38.695652 | 93 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/tfjob_controller.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 27,322 | 37.591808 | 172 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/tfjob_controller_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 11,022 | 33.126935 | 199 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/util.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 4,256 | 34.773109 | 111 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/util_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,996 | 30.203125 | 100 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/testutil/pod.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,593 | 31.089286 | 158 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/testutil/service.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 2,680 | 29.816092 | 129 | go |
training-operator | training-operator-master/pkg/controller.v1/tensorflow/testutil/tfjob.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 7,312 | 28.84898 | 106 | go |
training-operator | training-operator-master/pkg/controller.v1/xgboost/status.go | package xgboost
import (
"fmt"
"github.com/sirupsen/logrus"
kubeflowv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
commonutil "github.com/kubeflow/training-operator/pkg/util"
)
func setRunningCondition(logger *logrus.Entry, jobName string, jobStatus *kubeflowv1.JobStatus) error {
msg := fm... | 987 | 29.875 | 156 | go |
training-operator | training-operator-master/pkg/controller.v1/xgboost/status_test.go | package xgboost
import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
kubeflowv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
commonutil "github.com/kubeflow/training-operator/pkg/util"
)
var ignor... | 3,990 | 30.674603 | 121 | go |
training-operator | training-operator-master/pkg/controller.v1/xgboost/suite_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 2,259 | 28.350649 | 96 | go |
training-operator | training-operator-master/pkg/controller.v1/xgboost/xgboost.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 4,759 | 30.733333 | 112 | go |
training-operator | training-operator-master/pkg/controller.v1/xgboost/xgboostjob_controller.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 20,434 | 39.87 | 182 | go |
training-operator | training-operator-master/pkg/core/job.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 4,920 | 35.723881 | 161 | go |
training-operator | training-operator-master/pkg/core/pod.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 2,922 | 31.842697 | 119 | go |
training-operator | training-operator-master/pkg/core/service.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 3,333 | 31.686275 | 165 | go |
training-operator | training-operator-master/pkg/core/status.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 1,753 | 33.392157 | 101 | go |
training-operator | training-operator-master/pkg/core/utils.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 848 | 23.970588 | 72 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/README.md | ## Reconciler.v1
This is package providing most functionalities in `pkg/controller.v1` in the form of [reconciler](https://book.kubebuilder.io/cronjob-tutorial/controller-overview.html).
To use the reconciler, following methods must be overridden according to the APIs the reconciler handles.
```go
// GetJob returns ... | 1,210 | 47.44 | 169 | md |
training-operator | training-operator-master/pkg/reconciler.v1/common/gang.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,091 | 30.2 | 75 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/gang_scheduler_framework.go | // Copyright 2023 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 6,315 | 32.242105 | 139 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/gang_volcano.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 6,893 | 32.794118 | 147 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/interface.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 12,038 | 48.747934 | 132 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/job.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 16,608 | 32.351406 | 160 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/pod.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 9,250 | 32.157706 | 143 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/pod_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,691 | 25.184397 | 83 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/service.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 7,554 | 32.281938 | 165 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/service_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,261 | 32.285714 | 143 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/utils.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 2,029 | 29.298507 | 86 | go |
training-operator | training-operator-master/pkg/reconciler.v1/common/utils_test.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,662 | 26.262295 | 90 | go |
training-operator | training-operator-master/pkg/util/counter.go | package util
import (
"fmt"
"sync"
)
type Counter struct {
lock sync.Mutex
data map[string]int
}
func NewCounter() *Counter {
return &Counter{
lock: sync.Mutex{},
data: map[string]int{},
}
}
func (c *Counter) Inc(key string) {
c.lock.Lock()
defer c.lock.Unlock()
v, ok := c.data[key]
if ok {
c.data[... | 1,089 | 14.138889 | 68 | go |
training-operator | training-operator-master/pkg/util/logger.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 3,149 | 31.474227 | 94 | go |
training-operator | training-operator-master/pkg/util/status.go | package util
import (
"fmt"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
apiv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
)
const (
// JobCreatedReason is added in a job when it is created.
JobCreatedReason = "Created"
// JobSucceededReason is added in a job whe... | 4,189 | 31.48062 | 122 | go |
training-operator | training-operator-master/pkg/util/status_test.go | package util
import (
"testing"
apiv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
)
func TestIsSucceeded(t *testing.T) {
jobStatus := apiv1.JobStatus{
Conditions: []apiv1.JobCondition{
{
Type: apiv1.JobSucceeded,
... | 3,229 | 30.666667 | 83 | go |
training-operator | training-operator-master/pkg/util/k8sutil/client.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 3,313 | 31.490196 | 120 | go |
training-operator | training-operator-master/pkg/util/k8sutil/k8sutil.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 4,604 | 30.541096 | 106 | go |
training-operator | training-operator-master/pkg/util/labels/labels.go | // Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1,646 | 26.45 | 75 | go |
training-operator | training-operator-master/pkg/util/labels/labels_test.go | /*
Copyright 2023 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 2,357 | 20.833333 | 78 | go |
training-operator | training-operator-master/pkg/util/signals/signal.go | /*
Copyright 2017 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 1,184 | 25.931818 | 85 | go |
training-operator | training-operator-master/pkg/util/signals/signal_posix.go | //go:build !windows
// +build !windows
/*
Copyright 2017 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ap... | 720 | 24.75 | 72 | go |
training-operator | training-operator-master/pkg/util/signals/signal_windows.go | /*
Copyright 2017 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | 652 | 26.208333 | 72 | go |
training-operator | training-operator-master/pkg/util/testutil/constants.go | package testutil
import "time"
const (
Timeout = 30 * time.Second
Interval = 250 * time.Millisecond
)
| 107 | 11 | 34 | go |
training-operator | training-operator-master/pkg/util/train/train_util.go | // Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 742 | 34.380952 | 75 | go |