Skip to content

Commit

Permalink
implement gRPC API to verify parameters for early stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzen-y committed Nov 8, 2021
1 parent a9322f8 commit 0e35f07
Show file tree
Hide file tree
Showing 15 changed files with 865 additions and 149 deletions.
306 changes: 188 additions & 118 deletions pkg/apis/manager/v1beta1/api.pb.go

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions pkg/apis/manager/v1beta1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ service Suggestion {
service EarlyStopping {
rpc GetEarlyStoppingRules(GetEarlyStoppingRulesRequest) returns (GetEarlyStoppingRulesReply);
rpc SetTrialStatus(SetTrialStatusRequest) returns (SetTrialStatusReply);
rpc ValidateEarlyStoppingSettings(ValidateEarlyStoppingSettingsRequest) returns (ValidateEarlyStoppingSettingsReply);
}

/**
Expand Down Expand Up @@ -339,6 +340,16 @@ message EarlyStoppingRule {
int32 start_step = 4;
}

message ValidateEarlyStoppingSettingsRequest {
EarlyStoppingSpec early_stopping_spec = 1;
}

/**
* Return INVALID_ARGUMENT Error if Early Stopping Settings are not Valid
*/
message ValidateEarlyStoppingSettingsReply {
}

enum ComparisonType {
UNKNOWN_COMPARISON = 0; // Unknown comparison, not used
EQUAL = 1; // Equal comparison, e.g. accuracy = 0.7
Expand Down
28 changes: 28 additions & 0 deletions pkg/apis/manager/v1beta1/gen-doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
- [TrialStatus](#api.v1.beta1.TrialStatus)
- [ValidateAlgorithmSettingsReply](#api.v1.beta1.ValidateAlgorithmSettingsReply)
- [ValidateAlgorithmSettingsRequest](#api.v1.beta1.ValidateAlgorithmSettingsRequest)
- [ValidateEarlyStoppingSettingsReply](#api.v1.beta1.ValidateEarlyStoppingSettingsReply)
- [ValidateEarlyStoppingSettingsRequest](#api.v1.beta1.ValidateEarlyStoppingSettingsRequest)

- [ComparisonType](#api.v1.beta1.ComparisonType)
- [ObjectiveType](#api.v1.beta1.ObjectiveType)
Expand Down Expand Up @@ -696,6 +698,31 @@ Return INVALID_ARGUMENT Error if Algorithm Settings are not Valid




<a name="api.v1.beta1.ValidateEarlyStoppingSettingsReply"></a>

### ValidateEarlyStoppingSettingsReply
Return INVALID_ARGUMENT Error if Early Stopping Settings are not Valid






<a name="api.v1.beta1.ValidateEarlyStoppingSettingsRequest"></a>

### ValidateEarlyStoppingSettingsRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| early_stopping_spec | [EarlyStoppingSpec](#api.v1.beta1.EarlyStoppingSpec) | | |








Expand Down Expand Up @@ -784,6 +811,7 @@ EarlyStopping service defines APIs to manage Katib Early Stopping algorithms
| ----------- | ------------ | ------------- | ------------|
| GetEarlyStoppingRules | [GetEarlyStoppingRulesRequest](#api.v1.beta1.GetEarlyStoppingRulesRequest) | [GetEarlyStoppingRulesReply](#api.v1.beta1.GetEarlyStoppingRulesReply) | |
| SetTrialStatus | [SetTrialStatusRequest](#api.v1.beta1.SetTrialStatusRequest) | [SetTrialStatusReply](#api.v1.beta1.SetTrialStatusReply) | |
| ValidateEarlyStoppingSettings | [ValidateEarlyStoppingSettingsRequest](#api.v1.beta1.ValidateEarlyStoppingSettingsRequest) | [ValidateEarlyStoppingSettingsReply](#api.v1.beta1.ValidateEarlyStoppingSettingsReply) | |


<a name="api.v1.beta1.Suggestion"></a>
Expand Down
46 changes: 46 additions & 0 deletions pkg/apis/manager/v1beta1/gen-doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,14 @@ <h2>Table of Contents</h2>
<a href="#api.v1.beta1.ValidateAlgorithmSettingsRequest"><span class="badge">M</span>ValidateAlgorithmSettingsRequest</a>
</li>

<li>
<a href="#api.v1.beta1.ValidateEarlyStoppingSettingsReply"><span class="badge">M</span>ValidateEarlyStoppingSettingsReply</a>
</li>

<li>
<a href="#api.v1.beta1.ValidateEarlyStoppingSettingsRequest"><span class="badge">M</span>ValidateEarlyStoppingSettingsRequest</a>
</li>


<li>
<a href="#api.v1.beta1.ComparisonType"><span class="badge">E</span>ComparisonType</a>
Expand Down Expand Up @@ -1630,6 +1638,37 @@ <h3 id="api.v1.beta1.ValidateAlgorithmSettingsRequest">ValidateAlgorithmSettings



<h3 id="api.v1.beta1.ValidateEarlyStoppingSettingsReply">ValidateEarlyStoppingSettingsReply</h3>
<p>Return INVALID_ARGUMENT Error if Early Stopping Settings are not Valid</p>





<h3 id="api.v1.beta1.ValidateEarlyStoppingSettingsRequest">ValidateEarlyStoppingSettingsRequest</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>early_stopping_spec</td>
<td><a href="#api.v1.beta1.EarlyStoppingSpec">EarlyStoppingSpec</a></td>
<td></td>
<td><p> </p></td>
</tr>

</tbody>
</table>







<h3 id="api.v1.beta1.ComparisonType">ComparisonType</h3>
Expand Down Expand Up @@ -1852,6 +1891,13 @@ <h3 id="api.v1.beta1.EarlyStopping">EarlyStopping</h3>
<td><p></p></td>
</tr>

<tr>
<td>ValidateEarlyStoppingSettings</td>
<td><a href="#api.v1.beta1.ValidateEarlyStoppingSettingsRequest">ValidateEarlyStoppingSettingsRequest</a></td>
<td><a href="#api.v1.beta1.ValidateEarlyStoppingSettingsReply">ValidateEarlyStoppingSettingsReply</a></td>
<td><p></p></td>
</tr>

</tbody>
</table>

Expand Down
Loading

0 comments on commit 0e35f07

Please sign in to comment.