提交 c163b43e 编写于 作者: S Sarah Maddox 提交者: Kubernetes Prow Robot

Clarified meaning of environment in KF_ENV. (#625)

上级 4cec27aa
......@@ -12,7 +12,8 @@ framework (such as TensorFlow, MXNet, or PyTorch).
## Installing Katib
To run Katib jobs, you must install the required packages.
To run Katib jobs, you must install the required packages as shown in this
section.
In your ksonnet application's root directory, run the following commands:
......@@ -22,8 +23,12 @@ ks env set ${KF_ENV} --namespace=kubeflow
ks registry add kubeflow github.com/kubeflow/kubeflow/tree/master/kubeflow
```
You can read more about Kubeflow's use of ksonnet in the [ksonnet component
guide](/docs/components/ksonnet/).
The `KF_ENV` environment variable represents a conceptual deployment environment
such as development, test, staging, or production, as defined by
ksonnet. For this example, we use the `default` environment.
You can read more about Kubeflow's use of ksonnet in the Kubeflow
[ksonnet component guide](/docs/components/ksonnet/).
### TFJob (tf-operator)
......
......@@ -96,6 +96,7 @@ and gradually move traffic from A to B. This can be achieved using Istio's traff
```
MODEL_COMPONENT2=mnist-v2
KF_ENV=default
ks generate tf-serving-deployment-gcp ${MODEL_COMPONENT2}
ks param set ${MODEL_COMPONENT2} modelName mnist // modelName should be the SAME as the previous one
ks param set ${MODEL_COMPONENT2} versionName v2 // v2 !!
......@@ -106,6 +107,12 @@ and gradually move traffic from A to B. This can be achieved using Istio's traff
ks apply ${KF_ENV} -c ${MODEL_COMPONENT2}
```
The `KF_ENV` environment variable represents a conceptual deployment environment
such as development, test, staging, or production, as defined by
ksonnet. For this example, we use the `default` environment.
You can read more about Kubeflow's use of ksonnet in the Kubeflow
[ksonnet component guide](/docs/components/ksonnet/).
3. Update the traffic weight
```
......
......@@ -36,10 +36,18 @@ You can find more details about wrapping a model with seldon-core [here](https:/
## Deploying the model to your Kubeflow cluster
We need to have seldon component deployed, you can deploy the model once trained using a pre-defined ksonnet component, similar to [this](https://github.com/kubeflow/examples/blob/master/pytorch_mnist/ks_app/components/serving_model.jsonnet) example.
We need to setup our own environment `${KF_ENV}` (e.g., 'default') and modify the Ksonnet component
Create an environment variable, `${KF_ENV}`, to represent a conceptual
deployment environment such as development, test, staging, or production, as
defined by ksonnet. For this example, we use the `default` environment. You can
read more about Kubeflow's use of ksonnet in the Kubeflow
[ksonnet component guide](/docs/components/ksonnet/).
Then modify the Ksonnet component
[parameters](https://github.com/kubeflow/examples/blob/master/pytorch_mnist/ks_app/components/params.libsonnet) to use your specific image.
```bash
export KF_ENV=default
cd ks_app
ks env add ${KF_ENV}
ks apply ${KF_ENV} -c serving_model
......
......@@ -28,9 +28,16 @@ ks generate seldon seldon
Deploy seldon cluster manager:
```
export KF_ENV=default
ks apply ${KF_ENV} -c seldon
```
The `KF_ENV` environment variable represents a conceptual deployment environment
such as development, test, staging, or production, as defined by
ksonnet. For this example, we use the `default` environment.
You can read more about Kubeflow's use of ksonnet in the Kubeflow
[ksonnet component guide](/docs/components/ksonnet/).
### Seldon Deployment Graphs
Seldon allows complex runtime graphs for model inference to be deployed. Some example prototypes have been provided to help you get started. Follow the [Seldon docs](https://github.com/SeldonIO/seldon-core/blob/master/docs/wrappers/readme.md) to wrap your model code into an image that can be managed by Seldon. In the examples below we will use a model image ```seldonio/mock_classifier``` ; replace this with your actual model image. You will also need to choose between the v1alpha2 and v1alpha1 prototype examples depending on which version of Seldon you generated above. The following prototypes are available:
......
......@@ -100,9 +100,16 @@ configuration to start the kubernetes job.
### Submit the job
```
export KF_ENV=default
ks apply ${KF_ENV} -c ${MY_BATCH_PREDICT_JOB_NAME}
```
The `KF_ENV` environment variable represents a conceptual deployment environment
such as development, test, staging, or production, as defined by
ksonnet. For this example, we use the `default` environment.
You can read more about Kubeflow's use of ksonnet in the Kubeflow
[ksonnet component guide](/docs/components/ksonnet/).
You should see that a job is started to provision the batch-predict docker image.
Then a pod starts to run the job.
......
......@@ -104,10 +104,17 @@ for serving an object detection model with GPU.
### Deploying
```
export KF_ENV=default
ks apply ${KF_ENV} -c mnist-service
ks apply ${KF_ENV} -c ${MODEL_COMPONENT}
```
The `KF_ENV` environment variable represents a conceptual deployment environment
such as development, test, staging, or production, as defined by
ksonnet. For this example, we use the `default` environment.
You can read more about Kubeflow's use of ksonnet in the Kubeflow
[ksonnet component guide](/docs/components/ksonnet/).
### Sending prediction request directly
If the service type is LoadBalancer, it will have its own accessible external ip.
Get the external ip by:
......
......@@ -176,13 +176,20 @@ Run the `generate` command:
ks generate tf-job-simple-v1beta1 ${CNN_JOB_NAME} --name=${CNN_JOB_NAME}
```
Submit it
Submit the job:
```
export KF_ENV=default
ks apply ${KF_ENV} -c ${CNN_JOB_NAME}
```
Monitor it (Please refer to the [TfJob docs](https://github.com/kubeflow/tf-operator#monitoring-your-job))
The `KF_ENV` environment variable represents a conceptual deployment environment
such as development, test, staging, or production, as defined by
ksonnet. For this example, we use the `default` environment.
You can read more about Kubeflow's use of ksonnet in the Kubeflow
[ksonnet component guide](/docs/components/ksonnet/).
Monitor the job (see the [TFJob docs](/docs/components/tftraining/#monitoring-your-job)):
```
kubectl get -n kubeflow -o yaml tfjobs ${CNN_JOB_NAME}
......
......@@ -192,6 +192,7 @@ Kubeflow requires a [specific version of ksonnet](/docs/started/requirements).
If you run `ks apply` with an older version of ksonnet you will likely get the error `Unknown variable: env` as illustrated below:
```shell
export KF_ENV=default
ks apply ${KF_ENV}
ERROR Error reading /Users/xxx/projects/devel/go/src/github.com/kubeflow/kubeflow/my-kubeflow/environments/nocloud/main.jsonnet: /Users/xxx/projects/devel/go/src/github.com/kubeflow/kubeflow/my-kubeflow/components/jupyterhub.jsonnet:8:49-52 Unknown variable: env
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册