Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove kubeflow training to favor tfx components #1902

Merged
merged 1 commit into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -65,7 +65,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