From e4bbdce37a502890217050123aa4a43f7552464e Mon Sep 17 00:00:00 2001 From: Dan Sun Date: Mon, 30 Sep 2019 00:09:36 -0400 Subject: [PATCH] Generate KFService api docs (#381) * Generate api docs * Add link to readme * Rename html to README.md --- Makefile | 4 + README.md | 1 + docs/apis/Dockerfile | 14 + docs/apis/README.md | 1277 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1296 insertions(+) create mode 100644 docs/apis/Dockerfile create mode 100644 docs/apis/README.md diff --git a/Makefile b/Makefile index 587c375b82..550f4282fd 100644 --- a/Makefile +++ b/Makefile @@ -85,3 +85,7 @@ docker-build-executor: test docker-push-executor: docker push ${EXECUTOR_IMG} + +apidocs: + docker build -f docs/apis/Dockerfile --rm -t apidocs-gen . && \ + docker run -it --rm -v ${PWD}/docs/apis:/go/gen-crd-api-reference-docs/apidocs apidocs-gen diff --git a/README.md b/README.md index 8f4c31c7bc..6e77fce5ff 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ KFServing encapsulates the complexity of autoscaling, networking, health checkin * Join our [Working Group](https://groups.google.com/forum/#!forum/kfserving) for meeting invites and discussion. * [Read the Docs](/docs). * [Examples](./docs/samples). +* [API Docs](./docs/apis/README.md) * [Roadmap](/ROADMAP.md). * [KFServing 101 Slides](https://drive.google.com/file/d/16oqz6dhY5BR0u74pi9mDThU97Np__AFb/view). * [KFServing 101 Tech Talk](https://www.youtube.com/watch?v=hGIvlFADMhU). diff --git a/docs/apis/Dockerfile b/docs/apis/Dockerfile new file mode 100644 index 0000000000..1fa63144ef --- /dev/null +++ b/docs/apis/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.13.1 + +RUN apt-get update && apt-get -y upgrade && apt-get -y install git + +RUN git clone https://github.com/ahmetb/gen-crd-api-reference-docs + +WORKDIR gen-crd-api-reference-docs + +RUN go build + +VOLUME /go/gen-crd-api-reference-docs/apidocs + +ENTRYPOINT ["./gen-crd-api-reference-docs"] +CMD ["-config", "./example-config.json", "-api-dir", "github.com/kubeflow/kfserving/pkg/apis/serving/v1alpha2", "-out-file", "./apidocs/README.md"] diff --git a/docs/apis/README.md b/docs/apis/README.md new file mode 100644 index 0000000000..d55882f364 --- /dev/null +++ b/docs/apis/README.md @@ -0,0 +1,1277 @@ +

Packages:

+ +

serving.kubeflow.org/v1alpha2

+

+

Package v1alpha2 contains API Schema definitions for the serving v1alpha2 API group

+

+Resource Types: + +

KFService +

+

+

KFService is the Schema for the services API

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +serving.kubeflow.org/v1alpha2 + +
+kind
+string +
KFService
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +KFServiceSpec + + +
+
+
+ + + + + + + + + + + + + +
+default
+ + +EndpointSpec + + +
+

Default defines default KFService endpoints

+
+canary
+ + +EndpointSpec + + +
+(Optional) +

Canary defines an alternate endpoints to route a percentage of traffic.

+
+canaryTrafficPercent
+ +int + +
+(Optional) +

CanaryTrafficPercent defines the percentage of traffic going to canary KFService endpoints

+
+
+status
+ + +KFServiceStatus + + +
+
+

AlibiExplainerSpec +

+

+(Appears on: +ExplainerSpec) +

+

+

AlibiExplainerSpec defines the arguments for configuring an Alibi Explanation Server

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+type
+ + +AlibiExplainerType + + +
+

The type of Alibi explainer

+
+storageUri
+ +string + +
+

The location of a trained explanation model

+
+runtimeVersion
+ +string + +
+

Defaults to latest Alibi Version.

+
+resources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

Defaults to requests and limits of 1CPU, 2Gb MEM.

+
+config
+ +map[string]string + +
+

Inline custom parameter settings for explainer

+
+

AlibiExplainerType +(string alias)

+

+(Appears on: +AlibiExplainerSpec) +

+

+

+

CustomSpec +

+

+(Appears on: +ExplainerSpec, +PredictorSpec, +TransformerSpec) +

+

+

CustomSpec provides a hook for arbitrary container configuration.

+

+ + + + + + + + + + + + + +
FieldDescription
+container
+ + +Kubernetes core/v1.Container + + +
+
+

DeploymentSpec +

+

+(Appears on: +ExplainerSpec, +PredictorSpec, +TransformerSpec) +

+

+

DeploymentSpec defines the configuration for a given KFService service component

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName is the name of the ServiceAccount to use to run the service

+
+minReplicas
+ +int + +
+(Optional) +

Minimum number of replicas, pods won’t scale down to 0 in case of no traffic

+
+maxReplicas
+ +int + +
+(Optional) +

This is the up bound for autoscaler to scale to

+
+

EndpointSpec +

+

+(Appears on: +KFServiceSpec) +

+

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+predictor
+ + +PredictorSpec + + +
+

Predictor defines the model serving spec

+
+explainer
+ + +ExplainerSpec + + +
+(Optional) +

Explainer defines the model explanation service spec +explainer service calls to transformer or predictor service

+
+transformer
+ + +TransformerSpec + + +
+(Optional) +

Transformer defines the transformer service spec for pre/post processing +transformer service calls to predictor service

+
+

ExplainerConfig +

+

+(Appears on: +ExplainersConfig) +

+

+

+ + + + + + + + + + + + + +
FieldDescription
+image
+ +string + +
+
+

ExplainerHandler +

+

+

+

ExplainerSpec +

+

+(Appears on: +EndpointSpec) +

+

+

ExplainerSpec defines the arguments for a model explanation server

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+alibi
+ + +AlibiExplainerSpec + + +
+

The following fields follow a “1-of” semantic. Users must specify exactly one spec.

+
+custom
+ + +CustomSpec + + +
+
+DeploymentSpec
+ + +DeploymentSpec + + +
+

+(Members of DeploymentSpec are embedded into this type.) +

+
+

ExplainersConfig +

+

+

+ + + + + + + + + + + + + +
FieldDescription
+alibi
+ + +ExplainerConfig + + +
+
+

FrameworkConfig +

+

+(Appears on: +FrameworksConfig) +

+

+

+ + + + + + + + + + + + + +
FieldDescription
+image
+ +string + +
+
+

FrameworkHandler +

+

+

+

FrameworksConfig +

+

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+tensorflow
+ + +FrameworkConfig + + +
+
+tensorrt
+ + +FrameworkConfig + + +
+
+xgboost
+ + +FrameworkConfig + + +
+
+sklearn
+ + +FrameworkConfig + + +
+
+pytorch
+ + +FrameworkConfig + + +
+
+onnx
+ + +FrameworkConfig + + +
+
+

KFServiceSpec +

+

+(Appears on: +KFService) +

+

+

KFServiceSpec defines the desired state of KFService

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+default
+ + +EndpointSpec + + +
+

Default defines default KFService endpoints

+
+canary
+ + +EndpointSpec + + +
+(Optional) +

Canary defines an alternate endpoints to route a percentage of traffic.

+
+canaryTrafficPercent
+ +int + +
+(Optional) +

CanaryTrafficPercent defines the percentage of traffic going to canary KFService endpoints

+
+

KFServiceStatus +

+

+(Appears on: +KFService) +

+

+

KFServiceStatus defines the observed state of KFService

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+Status
+ +knative.dev/pkg/apis/duck/v1beta1.Status + +
+

+(Members of Status are embedded into this type.) +

+
+url
+ +string + +
+
+default
+ + +StatusConfigurationSpec + + +
+
+canary
+ + +StatusConfigurationSpec + + +
+
+

ONNXSpec +

+

+(Appears on: +PredictorSpec) +

+

+

ONNXSpec defines arguments for configuring ONNX model serving.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+storageUri
+ +string + +
+

The location of the trained model

+
+runtimeVersion
+ +string + +
+

Defaults to latest ONNX Version.

+
+resources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

Defaults to requests and limits of 1CPU, 2Gb MEM.

+
+

PredictorSpec +

+

+(Appears on: +EndpointSpec) +

+

+

PredictorSpec defines the configuration to route traffic to a predictor.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+custom
+ + +CustomSpec + + +
+

The following fields follow a “1-of” semantic. Users must specify exactly one spec.

+
+tensorflow
+ + +TensorflowSpec + + +
+
+tensorrt
+ + +TensorRTSpec + + +
+
+xgboost
+ + +XGBoostSpec + + +
+
+sklearn
+ + +SKLearnSpec + + +
+
+onnx
+ + +ONNXSpec + + +
+
+pytorch
+ + +PyTorchSpec + + +
+
+DeploymentSpec
+ + +DeploymentSpec + + +
+

+(Members of DeploymentSpec are embedded into this type.) +

+
+

PyTorchSpec +

+

+(Appears on: +PredictorSpec) +

+

+

PyTorchSpec defines arguments for configuring PyTorch model serving.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+storageUri
+ +string + +
+

The location of the trained model

+
+modelClassName
+ +string + +
+

Defaults PyTorch model class name to ‘PyTorchModel’

+
+runtimeVersion
+ +string + +
+

Defaults to latest PyTorch Version

+
+resources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

Defaults to requests and limits of 1CPU, 2Gb MEM.

+
+

SKLearnSpec +

+

+(Appears on: +PredictorSpec) +

+

+

SKLearnSpec defines arguments for configuring SKLearn model serving.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+storageUri
+ +string + +
+

The location of the trained model

+
+runtimeVersion
+ +string + +
+

Defaults to latest SKLearn Version.

+
+resources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

Defaults to requests and limits of 1CPU, 2Gb MEM.

+
+

StatusConfigurationSpec +

+

+(Appears on: +KFServiceStatus) +

+

+

StatusConfigurationSpec describes the state of the configuration receiving traffic.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+replicas
+ +int + +
+
+traffic
+ +int + +
+
+

TensorRTSpec +

+

+(Appears on: +PredictorSpec) +

+

+

TensorRTSpec defines arguments for configuring TensorRT model serving.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+storageUri
+ +string + +
+

The location of the trained model

+
+runtimeVersion
+ +string + +
+

Defaults to latest TensorRT Version.

+
+resources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

Defaults to requests and limits of 1CPU, 2Gb MEM.

+
+

TensorflowSpec +

+

+(Appears on: +PredictorSpec) +

+

+

TensorflowSpec defines arguments for configuring Tensorflow model serving.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+storageUri
+ +string + +
+

The location of the trained model

+
+runtimeVersion
+ +string + +
+

Defaults to latest TF Version.

+
+resources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

Defaults to requests and limits of 1CPU, 2Gb MEM.

+
+

TransformerSpec +

+

+(Appears on: +EndpointSpec) +

+

+

TransformerSpec defines transformer service for pre/post processing

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+custom
+ + +CustomSpec + + +
+
+DeploymentSpec
+ + +DeploymentSpec + + +
+

+(Members of DeploymentSpec are embedded into this type.) +

+
+

XGBoostSpec +

+

+(Appears on: +PredictorSpec) +

+

+

XGBoostSpec defines arguments for configuring XGBoost model serving.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+storageUri
+ +string + +
+

The location of the trained model

+
+runtimeVersion
+ +string + +
+

Defaults to latest XGBoost Version.

+
+resources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

Defaults to requests and limits of 1CPU, 2Gb MEM.

+
+
+

+Generated with gen-crd-api-reference-docs +on git commit 52e137b. +