Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update REAME example links for v1alpha1 #452

Merged
merged 9 commits into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ A Suggestion is an algorithm to construct a parameter set. Currently Katib suppo
## Components in Katib

Katib consists of several components as shown below. Each component is running on k8s as a deployment.
Each component communicates with others via GRPC and the API is defined at `pkg/api/api.proto`.
Each component communicates with others via GRPC and the API is defined at `pkg/api/v1alpha1/api.proto`.

- vizier: main components.
- vizier-core : API server of vizier.
Expand All @@ -78,19 +78,19 @@ Each component communicates with others via GRPC and the API is defined at `pkg/

## Getting Started

Please see [README.md](./examples/README.md) for more details.
Please see [README.md](./examples/v1alpha1/README.md) for more details.

## Web UI

Katib provides a Web UI.
You can visualize general trend of Hyper parameter space and each training history. You can use
[random-example](https://github.com/kubeflow/katib/blob/master/examples/random-example.yaml) or
[other examples](https://github.com/kubeflow/katib/blob/master/examples) to generate a similar UI.
[random-example](https://github.com/kubeflow/katib/blob/master/examples/v1alpha1/random-example.yaml) or
[other examples](https://github.com/kubeflow/katib/blob/master/examples/v1alpha1) to generate a similar UI.
![katibui](https://user-images.githubusercontent.com/10014831/48778081-a4388b80-ed17-11e8-938b-fc59a5d2e574.gif)

## API Documentation

Please refer to [api.md](./pkg/api/gen-doc/api.md).
Please refer to [api.md](./pkg/api/v1alpha1/gen-doc/api.md).

## Quickstart to run tfjob and pytorch operator jobs in Katib

Expand Down Expand Up @@ -158,7 +158,7 @@ spec:
Create this pv after deploying Katib package

```
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/manifests/pv/pv.yaml
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/manifests/v1alpha1/pv/pv.yaml
```

### Running examples
Expand Down Expand Up @@ -189,21 +189,21 @@ spec:
If you are not using GKE and you don't have StorageClass for dynamic volume provisioning at your cluster, you have to create pvc and pv

```
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/examples/tfevent-volume/tfevent-pvc.yaml
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/examples/v1alpha1/tfevent-volume/tfevent-pvc.yaml
Copy link
Member

@hougangliu hougangliu Apr 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
please also update linke of line 93, too.
In fact, links in https://github.com/kubeflow/katib/blob/master/docs/developer-guide.md and https://github.com/kubeflow/katib/blob/master/docs/rest-api.md need be updated, too


kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/examples/tfevent-volume/tfevent-pv.yaml
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/examples/v1alpha1/tfevent-volume/tfevent-pv.yaml
```

This is example for tfjob operator

```
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/examples/tfjob-example.yaml
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/examples/v1alpha1/tfjob-example.yaml
```

This is example for pytorch operator

```
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/examples/pytorchjob-example.yaml
kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/examples/v1alpha1/pytorchjob-example.yaml
```

You can check status of StudyJob
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expand Down Expand Up @@ -359,7 +359,7 @@ ks delete ${KF_ENV} -c tf-job-operator
If you create pv for Katib, delete it

```
kubectl delete -f https://raw.githubusercontent.com/kubeflow/katib/master/manifests/pv/pv.yaml
kubectl delete -f https://raw.githubusercontent.com/kubeflow/katib/master/manifests/v1alpha1/pv/pv.yaml
```

If you deploy Ambassador, delete it
Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ dep ensure --vendor-only
You can build all images from source.

```bash
./scripts/build.sh
./scripts/v1alpha1/build.sh
```

## Implement new suggestion algorithm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Suggestion API is defined as GRPC service at `pkg/api/api.proto`. Source code is [here](https://github.com/kubeflow/katib/blob/master/pkg/api/api.proto). You can attach new algorithm easily.
Suggestion API is defined as GRPC service at `pkg/api/v1alpha1/api.proto`. Source code is [here](https://github.com/kubeflow/katib/blob/master/pkg/api/v1alpha1/api.proto). You can attach new algorithm easily.

- implement suggestion API
- make k8s service named vizier-suggestion-{ algorithm-name } and expose port 6789
Expand Down
4 changes: 2 additions & 2 deletions docs/rest-api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## REST API
## REST API

For each RPC service, we define an equivalent HTTP REST API method using [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway). The mapping between service and REST API method can be found in this [file](https://github.com/kubeflow/katib/blob/master/pkg/api/api.proto). The mapping includes the URL path, query parameters and request body. You can read more details on the supported methods and binding options at this [link](https://cloud.google.com/service-infrastructure/docs/service-management/reference/rpc/google.api#http)
For each RPC service, we define an equivalent HTTP REST API method using [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway). The mapping between service and REST API method can be found in this [file](https://github.com/kubeflow/katib/blob/master/pkg/api/v1alpha1/api.proto). The mapping includes the URL path, query parameters and request body. You can read more details on the supported methods and binding options at this [link](https://cloud.google.com/service-infrastructure/docs/service-management/reference/rpc/google.api#http)

## Examples

Expand Down
4 changes: 2 additions & 2 deletions examples/v1alpha1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ The templates are defined in [ConfigMap](./workerConfigMap.yaml).
There are two templates: defaultWorkerTemplate.yaml and gpuWorkerTemplate.yaml.
You can add your template for worker.
Then you should specify the template in your studyjob spec.
[This example](/examples/gpu-example.yaml) uses `gpuWorkerTemplate.yaml`.
[This example](/examples/v1alpha1/gpu-example.yaml) uses `gpuWorkerTemplate.yaml`.
You can apply it same as other examples.
```
$ kubectl apply -f gpu-example.yaml
Expand Down Expand Up @@ -369,7 +369,7 @@ batch2 accuracy=0.8
Validation-accuracy=0.75
```
The metrics collector will collect all logs of metrics.
The manifest of metrics collector is also generated from template and defined [here](/manifests/studyjobcontroller/metricsControllerConfigMap.yaml).
The manifest of metrics collector is also generated from template and defined [here](/manifests/v1alpha1/studyjobcontroller/metricsControllerConfigMap.yaml).
You can add your template and specify `spec.metricsCollectorSpec.metricsCollectorTemplatePath` in a studyjob manifest.

### TF Event File Metrics Collector
Expand Down
15 changes: 11 additions & 4 deletions pkg/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ Suggestion service is an API for Suggestion services.
EarlyStopping service is an API for EarlyStopping services.

## Documentation
Please refer to [api.md](./gen-doc/api.md).
Please refer to the `api.md`:
* [v1alpha1 documentation](./v1alpha1/gen-doc/api.md)
* [v1alpha2 documentation](./v1alpha2/gen-doc/api.md)

## Update API and generate documents
When you want to edit API, please only edit [api.proto](./api.proto) and generate other file from it.
Documents are also generated from [api.proto](./api.proto) by [protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc).
By [build.sh](./build.sh), you can update every file from api.proto and generate docs.
When you want to edit the API, please only edit the corresponding `api.proto` and generate other files from it:
* [v1alpha1/api.proto](./v1alpha1/api.proto)
* [v1alpha2/api.proto](./v1alpha2/api.proto)

Documents are also generated from `api.proto` by [protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc).
Running `build.sh` can update every file from `api.proto` and generate docs:
* [v1alpha1/build.sh](./v1alpha1/build.sh)
* [v1alpha2/build.sh](./v1alpha2/build.sh)