-
Notifications
You must be signed in to change notification settings - Fork 699
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #814 from richardsliu/estimator_test
Estimator e2etest
- Loading branch information
Showing
7 changed files
with
241 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Tests that each replica has a correctly configured TF RunConfig object. | ||
// Each replica runs a tf-operator-test-server, so a manual exit on the chief | ||
// worker is required for the job to end successfully. | ||
local params = std.extVar("__ksonnet/params").components.estimator_runconfig; | ||
|
||
local k = import "k.libsonnet"; | ||
|
||
local parts(namespace, name, image) = { | ||
job:: { | ||
apiVersion: "kubeflow.org/v1alpha2", | ||
kind: "TFJob", | ||
metadata: { | ||
name: name, | ||
namespace: namespace, | ||
}, | ||
spec: { | ||
cleanPodPolicy: "All", | ||
tfReplicaSpecs: { | ||
Chief: { | ||
replicas: 1, | ||
restartPolicy: "Never", | ||
template: { | ||
spec: { | ||
containers: [ | ||
{ | ||
name: "tensorflow", | ||
image: "gcr.io/kubeflow-images-staging/tf-operator-test-server:v20180904-7d89548b", | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
PS: { | ||
replicas: 2, | ||
restartPolicy: "Never", | ||
template: { | ||
spec: { | ||
containers: [ | ||
{ | ||
name: "tensorflow", | ||
image: "gcr.io/kubeflow-images-staging/tf-operator-test-server:v20180904-7d89548b", | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
Worker: { | ||
replicas: 2, | ||
restartPolicy: "Never", | ||
template: { | ||
spec: { | ||
containers: [ | ||
{ | ||
name: "tensorflow", | ||
image: "gcr.io/kubeflow-images-staging/tf-operator-test-server:v20180904-7d89548b", | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
std.prune(k.core.v1.list.new([parts(params.namespace, params.name, params.image).job])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters