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

Add api doc #303

Merged
merged 4 commits into from
Dec 25, 2018
Merged

Add api doc #303

merged 4 commits into from
Dec 25, 2018

Conversation

YujiOshima
Copy link
Contributor

@YujiOshima YujiOshima commented Dec 19, 2018

Fix #150
We can gen doc by pkg/api/build.sh script from api.proto.
I didn't use Kubernetes doc generater https://kubernetes.io/docs/contribute/generate-ref-docs/kubernetes-api/
It may be better to use it in the future.

Signed-off-by: YujiOshima yuji.oshima0x3fd@gmail.com


This change is Reviewable

Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
@YujiOshima
Copy link
Contributor Author

/assign @jlewi @richardsliu

@@ -347,6 +356,7 @@
},
"/api/Manager/GetWorkerFullInfo": {
"get": {
"summary": "* \nGet a full informations related to specified Workers.\nIt includes Worker Config, HyperParameters and Metrics Logs.",
Copy link
Member

Choose a reason for hiding this comment

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

a full informations -> full information

@@ -390,6 +400,7 @@
},
"/api/Manager/GetWorkers": {
"get": {
"summary": "* \nGet a Worker Configs and Statuses from DB by ID of Study, Trial or Worker.",
Copy link
Member

Choose a reason for hiding this comment

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

configs and status of a worker

pass
"""*
Create or Update parameter set for a suggestion service.
When you specified a ID of parameter set, it will update the parameter set by your request.
Copy link
Member

Choose a reason for hiding this comment

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

When you specified ->if you specify

Copy link
Member

@hougangliu hougangliu left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 10 files reviewed, 16 unresolved discussions (waiting on @johnugeorge, @YujiOshima, @ddysher, and @texasmichelle)


pkg/api/api.proto, line 72 at r1 (raw file):

    };
    /** 
     * Get a Worker Configs and Statuses from DB by ID of Study, Trial or Worker.

s/Statuses/Status


pkg/api/api.proto, line 90 at r1 (raw file):

    /** 
     * Get a full informations related to specified Workers.
     * It includes Worker Config, HyperParameters and Metrics Logs.

s/informations/information


pkg/api/api.proto, line 125 at r1 (raw file):

     * Create or Update parameter set for a suggestion service.
     * When you specified a ID of parameter set, it will update the parameter set by your request.
     * When you specified no ID, it will create a new parameter set for corresponding study and suggestion service.

s/specified/specify
s/a ID/an ID
s/you specified no ID/you don't specify an ID


pkg/api/api.proto, line 308 at r1 (raw file):

/**
 * Parameter for Suggestion service. Key value format.

s/Key value/Key-value


pkg/api/api.proto, line 317 at r1 (raw file):

/**
 * Parameter for EarlyStopping service. Key value format.
 */

s/Key value/Key-value


pkg/api/api.proto, line 324 at r1 (raw file):

/**
 * Tag for each resources.

s/resources/resource


pkg/api/api.proto, line 343 at r1 (raw file):

/**
 * A set of Hyperparameter.
 * In a study, multiple trials are evaluated by worker.

s/worker/workers


pkg/api/api.proto, line 394 at r1 (raw file):

/** 
 * Create a Study from Study Config.
 * Generate a unique ID and store the Study to DB.

s/a unique/an unique


pkg/api/api.proto, line 436 at r1 (raw file):

/**
 * Create a Trial from Trial Config.
 * Generate a unique ID and store the Trial to DB.

s/a unique/an unique


pkg/api/api.proto, line 465 at r1 (raw file):

/**
 * Create a Worker from Worker Config.
 * Generate a unique ID and store the Worker to DB.

s/a unique/an unique


pkg/api/api.proto, line 489 at r1 (raw file):

/** 
 * Get a Worker Configs and Statuses from DB by ID of Study, Trial or Worker.
 */

s/Statuses /Status


pkg/api/api.proto, line 515 at r1 (raw file):

/** 
 * Get a full informations related to specified Workers.

s/informations/information


pkg/api/api.swagger.json, line 441 at r1 (raw file):

      "post": {
        "summary": "*\nCreate a Worker from Worker Config.\nGenerate a unique ID and store the Worker to DB.",
        "operationId": "RegisterWorker",

s/a unique/an unique

@jlewi
Copy link
Contributor

jlewi commented Dec 20, 2018

Thanks @YujiOshima are instructions for generating the API docs somewhere? If not could we add them?

Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
@YujiOshima
Copy link
Contributor Author

@jlewi
Copy link
Contributor

jlewi commented Dec 21, 2018

/assign @hougangliu
/unassign @richardsliu (OOO)

LGTM

@hougangliu Could you take another look please and see if you are satisfied? thanks!

Copy link
Member

@hougangliu hougangliu left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 10 files at r1.
Reviewable status: 1 of 11 files reviewed, 19 unresolved discussions (waiting on @johnugeorge, @YujiOshima, @ddysher, and @texasmichelle)


pkg/api/README.md, line 4 at r2 (raw file):

This is APIs for Katib.
Manager service is an API for core component.
Suggestion  service is an API for Suggestion services.

s/Suggestion service/Suggestion service


pkg/api/README.md, line 10 at r2 (raw file):

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

## Update API and generatie documents

s/generatie/generate


pkg/api/README.md, line 13 at r2 (raw file):

When you want to edit API, please only edit [api.proto](./api.proto) and generate other files 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 files from api.proto and generate docs.

s/files/file

@hougangliu
Copy link
Member

Thanks @YujiOshima . Lgtm except these typo error.

Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
@YujiOshima
Copy link
Contributor Author

@hougangliu Thanks! fixed.

@hougangliu
Copy link
Member

/lgtm

@YujiOshima
Copy link
Contributor Author

Thanks!
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: YujiOshima

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit f24889c into kubeflow:master Dec 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants