Skip to content

Commit

Permalink
Rename experiment_id and treatment_id (#15)
Browse files Browse the repository at this point in the history
Rename `experiment_id` to `experiment_name` and `treatment_id` to
`treatment_name` to better emphasize that the fields are human readable
instead of numerical value.
  • Loading branch information
aria authored Oct 26, 2022
1 parent 1faf05e commit 50e7d79
Show file tree
Hide file tree
Showing 17 changed files with 31,109 additions and 158 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# regenerate all code and docs

.PHONY: generate
generate: lint
generate: export OPENAPI_GENERATOR_VERSION=6.0.1
generate: lint
@buf generate
@OPENAPI_GENERATOR_VERSION=6.0.1 tools/openapi-generator-cli generate -i docs/openapiv2/caraml/upi/v1/upi.swagger.json -g go -o ./gen/go/openapi -p enumClassPrefix=true && \
tools/openapi-generator-cli generate -i docs/openapiv2/caraml/upi/v1/upi.swagger.json -g python -o ./gen/python/openapi -p enumClassPrefix=true
@tools/openapi-generator-cli generate -i docs/openapiv2/caraml/upi/v1/upi.swagger.json -g go -o ./gen/go/openapi -p enumClassPrefix=true
@tools/openapi-generator-cli generate -i docs/openapiv2/caraml/upi/v1/upi.swagger.json -g python -o ./gen/python/openapi -p enumClassPrefix=true

.PHONY:
setup:
Expand Down
10 changes: 6 additions & 4 deletions docs/api_html/caraml/upi/v1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -784,17 +784,19 @@ <h3 id="caraml.upi.v1.ResponseMetadata">ResponseMetadata</h3>
</tr>

<tr>
<td>experiment_id</td>
<td>experiment_name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>Optional experimentation metadata </p></td>
<td><p>Name of the experiment that is used to produce the response
The value might be empty if experimentation is not involved to produce response </p></td>
</tr>

<tr>
<td>treatment_id</td>
<td>treatment_name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>Name of the treatment chosen from the experiment to produce the response
The value might be empty if experimentation is not involved to produce response </p></td>
</tr>

</tbody>
Expand Down
4 changes: 2 additions & 2 deletions docs/api_markdown/caraml/upi/v1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ Represents a request to predict multiple values
| ----- | ---- | ----- | ----------- |
| prediction_id | [string](#string) | | Prediction ID generated by the platform. The user is expected include the prediction ID (along with row ID) when calling the observations API so that predictions and observations can be joined. Prediction ID is needed because row ID may not be globally unique across requests (only locally unique within each request). If there are experiments with alternative models, the mapping from prediciton ID to treatment ID will be logged by the platform |
| models | [ModelMetadata](#caraml-upi-v1-ModelMetadata) | repeated | List of model that produces the prediction This field is repeated to cater for use case such as ensembling several model production results |
| experiment_id | [string](#string) | | Optional experimentation metadata |
| treatment_id | [string](#string) | | |
| experiment_name | [string](#string) | | Name of the experiment that is used to produce the response The value might be empty if experimentation is not involved to produce response |
| treatment_name | [string](#string) | | Name of the treatment chosen from the experiment to produce the response The value might be empty if experimentation is not involved to produce response |



Expand Down
9 changes: 5 additions & 4 deletions docs/openapiv2/caraml/upi/v1/upi.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,13 @@
},
"title": "List of model that produces the prediction \nThis field is repeated to cater for use case such as ensembling several model production results"
},
"experimentId": {
"experimentName": {
"type": "string",
"title": "Optional experimentation metadata"
"title": "Name of the experiment that is used to produce the response \nThe value might be empty if experimentation is not involved to produce response"
},
"treatmentId": {
"type": "string"
"treatmentName": {
"type": "string",
"title": "Name of the treatment chosen from the experiment to produce the response\nThe value might be empty if experimentation is not involved to produce response"
}
}
},
Expand Down
98 changes: 51 additions & 47 deletions gen/go/grpc/caraml/upi/v1/upi.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions gen/go/openapi/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ components:
version: version
- name: name
version: version
experimentId: experimentId
predictionId: predictionId
treatmentId: treatmentId
experimentName: experimentName
treatmentName: treatmentName
predictionContext:
- stringValue: stringValue
name: name
Expand Down Expand Up @@ -200,9 +200,9 @@ components:
version: version
- name: name
version: version
experimentId: experimentId
predictionId: predictionId
treatmentId: treatmentId
experimentName: experimentName
treatmentName: treatmentName
properties:
predictionId:
title: "Prediction ID generated by the platform. \nThe user is expected\
Expand All @@ -219,10 +219,14 @@ components:
title: "List of model that produces the prediction \nThis field is repeated\
\ to cater for use case such as ensembling several model production results"
type: array
experimentId:
title: Optional experimentation metadata
experimentName:
title: "Name of the experiment that is used to produce the response \nThe\
\ value might be empty if experimentation is not involved to produce response"
type: string
treatmentId:
treatmentName:
title: |-
Name of the treatment chosen from the experiment to produce the response
The value might be empty if experimentation is not involved to produce response
type: string
type: object
v1Row:
Expand Down
52 changes: 26 additions & 26 deletions gen/go/openapi/docs/V1ResponseMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**PredictionId** | Pointer to **string** | | [optional]
**Models** | Pointer to [**[]V1ModelMetadata**](V1ModelMetadata.md) | | [optional]
**ExperimentId** | Pointer to **string** | | [optional]
**TreatmentId** | Pointer to **string** | | [optional]
**ExperimentName** | Pointer to **string** | | [optional]
**TreatmentName** | Pointer to **string** | | [optional]

## Methods

Expand Down Expand Up @@ -78,55 +78,55 @@ SetModels sets Models field to given value.

HasModels returns a boolean if a field has been set.

### GetExperimentId
### GetExperimentName

`func (o *V1ResponseMetadata) GetExperimentId() string`
`func (o *V1ResponseMetadata) GetExperimentName() string`

GetExperimentId returns the ExperimentId field if non-nil, zero value otherwise.
GetExperimentName returns the ExperimentName field if non-nil, zero value otherwise.

### GetExperimentIdOk
### GetExperimentNameOk

`func (o *V1ResponseMetadata) GetExperimentIdOk() (*string, bool)`
`func (o *V1ResponseMetadata) GetExperimentNameOk() (*string, bool)`

GetExperimentIdOk returns a tuple with the ExperimentId field if it's non-nil, zero value otherwise
GetExperimentNameOk returns a tuple with the ExperimentName field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetExperimentId
### SetExperimentName

`func (o *V1ResponseMetadata) SetExperimentId(v string)`
`func (o *V1ResponseMetadata) SetExperimentName(v string)`

SetExperimentId sets ExperimentId field to given value.
SetExperimentName sets ExperimentName field to given value.

### HasExperimentId
### HasExperimentName

`func (o *V1ResponseMetadata) HasExperimentId() bool`
`func (o *V1ResponseMetadata) HasExperimentName() bool`

HasExperimentId returns a boolean if a field has been set.
HasExperimentName returns a boolean if a field has been set.

### GetTreatmentId
### GetTreatmentName

`func (o *V1ResponseMetadata) GetTreatmentId() string`
`func (o *V1ResponseMetadata) GetTreatmentName() string`

GetTreatmentId returns the TreatmentId field if non-nil, zero value otherwise.
GetTreatmentName returns the TreatmentName field if non-nil, zero value otherwise.

### GetTreatmentIdOk
### GetTreatmentNameOk

`func (o *V1ResponseMetadata) GetTreatmentIdOk() (*string, bool)`
`func (o *V1ResponseMetadata) GetTreatmentNameOk() (*string, bool)`

GetTreatmentIdOk returns a tuple with the TreatmentId field if it's non-nil, zero value otherwise
GetTreatmentNameOk returns a tuple with the TreatmentName field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetTreatmentId
### SetTreatmentName

`func (o *V1ResponseMetadata) SetTreatmentId(v string)`
`func (o *V1ResponseMetadata) SetTreatmentName(v string)`

SetTreatmentId sets TreatmentId field to given value.
SetTreatmentName sets TreatmentName field to given value.

### HasTreatmentId
### HasTreatmentName

`func (o *V1ResponseMetadata) HasTreatmentId() bool`
`func (o *V1ResponseMetadata) HasTreatmentName() bool`

HasTreatmentId returns a boolean if a field has been set.
HasTreatmentName returns a boolean if a field has been set.


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
Loading

0 comments on commit 50e7d79

Please sign in to comment.