forked from kubeflow/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the update_index.sh (kubeflow#373)
* add search index creator container * add pipeline * update op name * update readme * update scripts * typo fix * Update Makefile * Update Makefile * address comments * fix ks * update pipeline * restructure the images * remove echo * update image * add code embedding launcher * small fixes * format * format * address comments * add flag * Update arguments.py * update parameter * revert to use --wait_until_finished. --wait_until_finish never works * update image * update git script * update script * update readme
- Loading branch information
1 parent
6855802
commit 3799bac
Showing
3 changed files
with
52 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,42 @@ | ||
To run the pipeline, follow the kubeflow pipeline instruction and compile index_update_pipeline.py and upload to pipeline | ||
## Overview | ||
This directory shows how to build a scheduled pipeline to periodically update the search index and update the search UI | ||
using the new index. It also uses github to store the search UI's Kubernetes spec and hooks up Argo CD to automatically | ||
update the search UI. | ||
|
||
At a high level, the pipeline automate the process to | ||
1. Compute the function embeddings | ||
2. Create new search index file | ||
3. Update the github manifest pointing to the new search index file | ||
|
||
ArgoCD then triggers a new service deployment with the new manifest. | ||
|
||
## Perquisite | ||
- A cluster with kubeflow deployed, including [kubeflow pipeline](https://github.com/kubeflow/pipelines) | ||
- A pre trained code search model. | ||
|
||
|
||
## Instruction | ||
1. Upload the ks-web-app/ dir to a github repository, and set up Argo CD following the | ||
[instruction](https://github.com/argoproj/argo-cd/blob/master/docs/getting_started.md#6-create-an-application-from-a-git-repository-location) | ||
Set up [Automated sync](https://github.com/argoproj/argo-cd/blob/master/docs/auto_sync.md) if you want the search UI to | ||
be updated at real time. Otherwise Argo CD will pull latest config every 3 minutes as default. | ||
2. Create a github token following [instruction](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token) | ||
and store it in the cluster as secret. This allows pipeline to update github. The secret is stored in the kubeflow namespace, assuming it's the same namespace | ||
as which the kubeflow is stored | ||
```bash | ||
kubectl create secret generic github-access-token --from-literal=token=[your_github_token] -n kubeflow | ||
``` | ||
3. To run the pipeline, follow the kubeflow pipeline instruction and compile index_update_pipeline.py and upload to pipeline | ||
page. | ||
|
||
Provide the parameter, e.g. | ||
|
||
``` | ||
PROJECT='code-search-demo' | ||
CLUSTER_NAME='cs-demo-1103' | ||
WORKING_DIR='gs://code-search-demo/pipeline' | ||
SAVED_MODEL_DIR='gs://code-search-demo/models/20181107-dist-sync-gpu/export/1541712907/' | ||
DATA_DIR='gs://code-search-demo/20181104/data' | ||
``` | ||
``` | ||
|
||
TODO(IronPan): more details on how to run pipeline | ||
|