By this point, you should have a Jupyter Notebook running at http://127.0.0.1:8000
.
Open the Jupyter Notebook interface and create a new Terminal by clicking on New -> Terminal. In the Terminal, clone this git repo by executing: git clone https://github.com/kubeflow/examples.git
.
Now you should have all the code required to complete training in the examples/github_issue_summarization/notebooks
folder. Navigate to this folder. Here you should see two files:
Training.ipynb
seq2seq_utils.py
Open Training.ipynb
. This contains a complete walk-through of downloading the training data, preprocessing it and training it.
Run the Training.ipynb
notebook, viewing the output at each step to confirm that the resulting models produce sensible predictions.
After training completes, download the resulting files to your local machine. The following files are needed for serving:
seq2seq_model_tutorial.h5
- the keras modelbody_pp.dpkl
- the serialized body preprocessortitle_pp.dpkl
- the serialized title preprocessor
In a locally cloned copy of the same repo, issue the following commands to place these three files into the examples/github_issue_summarization/notebooks
folder:
PODNAME=`kubectl get pods --namespace=${NAMESPACE} --selector="app=jupyterhub" --output=template --template="{{with index .items 0}}{{.metadata.name}}{{end}}"`
kubectl --namespace=${NAMESPACE} cp ${PODNAME}:/home/jovyan/examples/github_issue_summarization/notebooks/seq2seq_model_tutorial.h5 examples/github_issue_summarization/notebooks
kubectl --namespace=${NAMESPACE} cp ${PODNAME}:/home/jovyan/examples/github_issue_summarization/notebooks/body_pp.dpkl examples/github_issue_summarization/notebooks
kubectl --namespace=${NAMESPACE} cp ${PODNAME}:/home/jovyan/examples/github_issue_summarization/notebooks/title_pp.dpkl examples/github_issue_summarization/notebooks
Next: Serving the model