Skip to content

Commit

Permalink
remove kubeflow training (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoning777 authored Aug 21, 2019
1 parent 2592307 commit 93e3121
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 186 deletions.
47 changes: 0 additions & 47 deletions samples/core/kubeflow_training_classification/README.md

This file was deleted.

This file was deleted.

26 changes: 1 addition & 25 deletions test/sample-test/run_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,6 @@ def main():
'steps':
'5'
}
elif args.testname == 'kubeflow_training_classification':
params = {
'output': args.output,
'project': 'ml-pipeline-test',
'evaluation': 'gs://ml-pipeline-dataset/sample-test/flower/eval15.csv',
'train': 'gs://ml-pipeline-dataset/sample-test/flower/train30.csv',
'hidden-layer-size': '10,5',
'steps': '5'
}
elif args.testname == 'xgboost_training_cm':
params = {
'output': args.output,
Expand Down Expand Up @@ -150,22 +141,7 @@ def main():

###### Validate the results for specific test cases ######
#TODO: Add result check for tfx-cab-classification after launch.
if args.testname == 'kubeflow_training_classification':
cm_tar_path = './confusion_matrix.tar.gz'
utils.get_artifact_in_minio(workflow_json, 'confusion-matrix', cm_tar_path,
'mlpipeline-ui-metadata')
with tarfile.open(cm_tar_path) as tar_handle:
file_handles = tar_handle.getmembers()
assert len(file_handles) == 1

with tar_handle.extractfile(file_handles[0]) as f:
cm_data = json.load(io.TextIOWrapper(f))
utils.add_junit_test(
test_cases, 'confusion matrix format',
(len(cm_data['outputs'][0]['schema']) == 3),
'the column number of the confusion matrix output is not equal to three'
)
elif args.testname == 'xgboost_training_cm':
if args.testname == 'xgboost_training_cm':
cm_tar_path = './confusion_matrix.tar.gz'
utils.get_artifact_in_minio(workflow_json, 'confusion-matrix', cm_tar_path,
'mlpipeline-ui-metadata')
Expand Down
23 changes: 1 addition & 22 deletions test/sample-test/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,6 @@ xgboost_training_cm_injection() {
sed -i "s|gcr.io/ml-pipeline/ml-pipeline-local-roc:\([a-zA-Z0-9_.-]\)\+|${LOCAL_ROC_IMAGE}|g" ${TEST_NAME}.yaml
}

################################################################################
# Utility function to inject correct images to python files for
# kubeflow_training_classification test.
################################################################################
kubeflow_training_classification_injection() {
sed -i "s|gcr.io/ml-pipeline/ml-pipeline-dataflow-tft:\([a-zA-Z0-9_.-]\)\+|${DATAFLOW_TFT_IMAGE}|g" ${TEST_NAME}.py
sed -i "s|gcr.io/ml-pipeline/ml-pipeline-kubeflow-tf-trainer:\([a-zA-Z0-9_.-]\)\+|${KUBEFLOW_DNNTRAINER_IMAGE}|g" ${TEST_NAME}.py
sed -i "s|gcr.io/ml-pipeline/ml-pipeline-dataflow-tf-predict:\([a-zA-Z0-9_.-]\)\+|${DATAFLOW_PREDICT_IMAGE}|g" ${TEST_NAME}.py
sed -i "s|gcr.io/ml-pipeline/ml-pipeline-local-confusion-matrix:\([a-zA-Z0-9_.-]\)\+|${LOCAL_CONFUSIONMATRIX_IMAGE}|g" ${TEST_NAME}.py
}

if [[ -z "$RESULTS_GCS_DIR" ]]; then
usage
exit 1
Expand All @@ -231,17 +220,7 @@ echo "Run the sample tests..."
# Run the tests
preparation ${TEST_NAME}

if [[ "${TEST_NAME}" == "kubeflow_training_classification" ]]; then
#TODO(numerology): convert the sed commands to sed -e
# 's|gcr.io/ml-pipeline/|gcr.io/ml-pipeline-test/' and tag replacement. Also
# let the postsubmit tests refer to yaml files.
if [ -n "${DATAFLOW_TFT_IMAGE}" ];then
kubeflow_training_classification_injection
fi

dsl-compile --py "${TEST_NAME}.py" --output "${TEST_NAME}.yaml"
check_result ${TEST_NAME}
elif [[ "${TEST_NAME}" == "tfx_cab_classification" ]]; then
if [[ "${TEST_NAME}" == "tfx_cab_classification" ]]; then
dsl-compile --py "${TEST_NAME}.py" --output "${TEST_NAME}.yaml"
if [[ -n "${DATAFLOW_TFT_IMAGE}" ]]; then
tfx_cab_classification_injection
Expand Down
1 change: 0 additions & 1 deletion test/sample_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ spec:
- name: test-name
value: "{{item}}"
withItems:
- kubeflow_training_classification
- tfx_cab_classification
- xgboost_training_cm
- kubeflow_pipeline_using_TFX_OSS_components
Expand Down

0 comments on commit 93e3121

Please sign in to comment.