Skip to content

Commit

Permalink
chore: update proto docs and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and callmehiphop committed Feb 26, 2019
1 parent 748c764 commit 534f3fd
Show file tree
Hide file tree
Showing 19 changed files with 150 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Contains annotation information that is relevant to AutoML.
message AnnotationPayload {
// Output only . Additional information about the annotation
Expand All @@ -43,10 +42,11 @@ message AnnotationPayload {
// ancestor dataset, or the dataset that was used to train the model in use.
string annotation_spec_id = 1;

// Output only. The value of [AnnotationSpec.display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] when the model
// was trained. Because this field returns a value at model training time,
// for different models trained using the same dataset, the returned value
// could be different as model owner could update the display_name between
// any two model training.
// Output only. The value of
// [AnnotationSpec.display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
// when the model was trained. Because this field returns a value at model
// training time, for different models trained using the same dataset, the
// returned value could be different as model owner could update the
// display_name between any two model training.
string display_name = 5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ option java_outer_classname = "ClassificationProto";
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Contains annotation details specific to classification.
message ClassificationAnnotation {
// Output only. A confidence estimate between 0.0 and 1.0. A higher value
Expand Down Expand Up @@ -61,7 +60,10 @@ message ClassificationEvaluationMetrics {
// example.
float precision_at1 = 6;

// Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
// Output only. The harmonic mean of
// [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1]
// and
// [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
float f1_score_at1 = 7;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// A representation of an image.
message Image {
// Input only. The data representing the image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// A workspace for solving a single, particular machine learning (ML) problem.
// A workspace contains examples that may be annotated.
message Dataset {
Expand All @@ -40,7 +39,8 @@ message Dataset {
TranslationDatasetMetadata translation_dataset_metadata = 23;

// Metadata for a dataset used for image classification.
ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24;
ImageClassificationDatasetMetadata image_classification_dataset_metadata =
24;

// Metadata for a dataset used for text classification.
TextClassificationDatasetMetadata text_classification_dataset_metadata = 25;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ option java_outer_classname = "ImageProto";
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Dataset metadata that is specific to image classification.
message ImageClassificationDatasetMetadata {
// Required.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Input configuration.
message InputConfig {
// Required. The source of the input.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// API proto representing a trained machine learning model.
message Model {
// Deployment state of the model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Evaluation results of a model.
message ModelEvaluation {
// Output only. Problem type specific evaluation metrics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Metadata used across all long running operations returned by AutoML API.
message OperationMetadata {
// Ouptut only. Details of specific operation. Even if this field is empty,
Expand All @@ -55,6 +54,4 @@ message OperationMetadata {
}

// Details of CreateModel operation.
message CreateModelOperationMetadata {

}
message CreateModelOperationMetadata {}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ option java_outer_classname = "PredictionServiceProto";
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// AutoML Prediction API.
service PredictionService {
// Perform a prediction.
Expand All @@ -38,7 +37,8 @@ service PredictionService {
}
}

// Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
// Request message for
// [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
message PredictRequest {
// Name of the model requested to serve the prediction.
string name = 1;
Expand All @@ -60,7 +60,8 @@ message PredictRequest {
map<string, string> params = 3;
}

// Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
// Response message for
// [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
//
// Currently, this is only
// used to return an image recognition prediction result. More prediction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ option java_outer_classname = "AutoMlProto";
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// AutoML Server API.
//
// The resource names are assigned by the server.
Expand Down Expand Up @@ -71,7 +70,8 @@ service AutoMl {
// [response][google.longrunning.Operation.response] field when it completes,
// and `delete_details` in the
// [metadata][google.longrunning.Operation.metadata] field.
rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) {
rpc DeleteDataset(DeleteDatasetRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
};
Expand Down Expand Up @@ -150,7 +150,8 @@ service AutoMl {
// Undeploys model.
// Returns an `UndeployModelResponse` in the
// [response][google.longrunning.Operation.response] field when it completes.
rpc UndeployModel(UndeployModelRequest) returns (google.longrunning.Operation) {
rpc UndeployModel(UndeployModelRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy"
body: "*"
Expand All @@ -165,14 +166,16 @@ service AutoMl {
}

// Lists model evaluations.
rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) {
rpc ListModelEvaluations(ListModelEvaluationsRequest)
returns (ListModelEvaluationsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations"
};
}
}

// Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset].
// Request message for
// [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset].
message CreateDatasetRequest {
// The resource name of the project to create the dataset for.
string parent = 1;
Expand All @@ -181,13 +184,15 @@ message CreateDatasetRequest {
Dataset dataset = 2;
}

// Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset].
// Request message for
// [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset].
message GetDatasetRequest {
// The resource name of the dataset to retrieve.
string name = 1;
}

// Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
// Request message for
// [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
message ListDatasetsRequest {
// The resource name of the project from which to list datasets.
string parent = 1;
Expand All @@ -208,28 +213,35 @@ message ListDatasetsRequest {

// A token identifying a page of results for the server to return
// Typically obtained via
// [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
// [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
// [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token]
// of the previous
// [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets]
// call.
string page_token = 6;
}

// Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
// Response message for
// [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
message ListDatasetsResponse {
// The datasets read.
repeated Dataset datasets = 1;

// A token to retrieve next page of results.
// Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.page_token] to obtain that page.
// Pass to
// [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.page_token]
// to obtain that page.
string next_page_token = 2;
}

// Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset].
// Request message for
// [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset].
message DeleteDatasetRequest {
// The resource name of the dataset to delete.
string name = 1;
}

// Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData].
// Request message for
// [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData].
message ImportDataRequest {
// Required. Dataset name. Dataset must already exist. All imported
// annotations and examples will be added.
Expand All @@ -239,7 +251,8 @@ message ImportDataRequest {
InputConfig input_config = 3;
}

// Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData].
// Request message for
// [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData].
message ExportDataRequest {
// Required. The resource name of the dataset.
string name = 1;
Expand All @@ -248,7 +261,8 @@ message ExportDataRequest {
OutputConfig output_config = 3;
}

// Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel].
// Request message for
// [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel].
message CreateModelRequest {
// Resource name of the parent project where the model is being created.
string parent = 1;
Expand All @@ -257,13 +271,15 @@ message CreateModelRequest {
Model model = 4;
}

// Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel].
// Request message for
// [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel].
message GetModelRequest {
// Resource name of the model.
string name = 1;
}

// Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
// Request message for
// [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
message ListModelsRequest {
// Resource name of the project, from which to list the models.
string parent = 1;
Expand All @@ -286,12 +302,14 @@ message ListModelsRequest {

// A token identifying a page of results for the server to return
// Typically obtained via
// [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
// [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token]
// of the previous
// [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
string page_token = 6;
}

// Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
// Response message for
// [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
message ListModelsResponse {
// List of models in the requested page.
repeated Model model = 1;
Expand All @@ -301,31 +319,36 @@ message ListModelsResponse {
string next_page_token = 2;
}

// Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel].
// Request message for
// [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel].
message DeleteModelRequest {
// Resource name of the model being deleted.
string name = 1;
}

// Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel].
// Request message for
// [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel].
message DeployModelRequest {
// Resource name of the model to deploy.
string name = 1;
}

// Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel].
// Request message for
// [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel].
message UndeployModelRequest {
// Resource name of the model to undeploy.
string name = 1;
}

// Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation].
// Request message for
// [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation].
message GetModelEvaluationRequest {
// Resource name for the model evaluation.
string name = 1;
}

// Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
// Request message for
// [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
message ListModelEvaluationsRequest {
// Resource name of the model to list the model evaluations for.
// If modelId is set as "-", this will list model evaluations from across all
Expand All @@ -351,11 +374,13 @@ message ListModelEvaluationsRequest {
// A token identifying a page of results for the server to return.
// Typically obtained via
// `ListModelEvaluationsResponse.next_page_token` of the previous
// [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
// [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]
// call.
string page_token = 6;
}

// Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
// Response message for
// [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
message ListModelEvaluationsResponse {
// List of model evaluations in the requested page.
repeated ModelEvaluation model_evaluation = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ option java_outer_classname = "TextProto";
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Dataset metadata for classification.
message TextClassificationDatasetMetadata {
// Required.
Expand All @@ -34,6 +33,4 @@ message TextClassificationDatasetMetadata {
}

// Model metadata that is specific to text classification.
message TextClassificationModelMetadata {

}
message TextClassificationModelMetadata {}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ option java_outer_classname = "TranslationProto";
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Dataset metadata that is specific to translation.
message TranslationDatasetMetadata {
// Required. The BCP-47 language code of the source language.
Expand Down
Loading

0 comments on commit 534f3fd

Please sign in to comment.