diff --git a/content/docs/components/hyperparameter.md b/content/docs/components/hyperparameter.md index 03131cd89ed6791f640131960b6e92e431cc4e09..291520d4ef5c6e2fe5b89042e7923a779613eb8b 100644 --- a/content/docs/components/hyperparameter.md +++ b/content/docs/components/hyperparameter.md @@ -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) diff --git a/content/docs/components/istio.md b/content/docs/components/istio.md index 6315b2345c08f2d09abd483ff0eefdd53d8aa5b0..8557aefa87295f69eaee632e697951ce21ce1fd3 100644 --- a/content/docs/components/istio.md +++ b/content/docs/components/istio.md @@ -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 ``` diff --git a/content/docs/components/pytorchserving.md b/content/docs/components/pytorchserving.md index 4f3974243d4e7984aac0ae8c1a5c7fe9ec33540c..09fb3dd5edfd844c56b3374b559b65589f6b00a2 100644 --- a/content/docs/components/pytorchserving.md +++ b/content/docs/components/pytorchserving.md @@ -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 diff --git a/content/docs/components/seldon.md b/content/docs/components/seldon.md index 512d0940967aea05352809702c66cfb2f4e07ea0..983a6fb659a20349da3a58a488c019cb77596c1b 100644 --- a/content/docs/components/seldon.md +++ b/content/docs/components/seldon.md @@ -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: diff --git a/content/docs/components/tfbatchpredict.md b/content/docs/components/tfbatchpredict.md index 5566ff8bee0d9eee3d590d9cdd0256fafc0c455f..b648460c4471ddcf4d24da1fcd95c8cf74de1193 100644 --- a/content/docs/components/tfbatchpredict.md +++ b/content/docs/components/tfbatchpredict.md @@ -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. diff --git a/content/docs/components/tfserving_new.md b/content/docs/components/tfserving_new.md index 0684791cad64c789d678466fbf441d127a10a8e3..0a6abcd8039f98f17080809d569c28231cf0bdf5 100644 --- a/content/docs/components/tfserving_new.md +++ b/content/docs/components/tfserving_new.md @@ -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: diff --git a/content/docs/components/tftraining.md b/content/docs/components/tftraining.md index d335ae0b41f90cec54acbb73e9e8da21bb91c8f0..1fb798c452b2335b22e7fbc8573eb113352b4a56 100644 --- a/content/docs/components/tftraining.md +++ b/content/docs/components/tftraining.md @@ -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} diff --git a/content/docs/other-guides/troubleshooting.md b/content/docs/other-guides/troubleshooting.md index 7fcf4380cba6364bfbb17f1841957eda40732eaa..3891cab4417b61e6fa00831b864a4dd3e612dff4 100644 --- a/content/docs/other-guides/troubleshooting.md +++ b/content/docs/other-guides/troubleshooting.md @@ -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