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 metrics collector spec to v1alpha2 API #481

Merged
merged 4 commits into from
May 1, 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
12 changes: 10 additions & 2 deletions pkg/api/operators/apis/experiment/v1alpha2/experiment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ type ExperimentSpec struct {
// Whether to retain historical data in DB after deletion.
RetainHistoricalData bool `json:"retainHistoricalData,omitempty"`

// TODO - figure out what to do with metric collectors
MetricsCollectorType string `json:"metricsCollectorSpec,omitempty"`
// For v1alpha2 we will keep the metrics collector implementation same as v1alpha1.
MetricsCollectorSpec *MetricsCollectorSpec `json:"metricsCollectorSpec,omitempty"`
richardsliu marked this conversation as resolved.
Show resolved Hide resolved

NasConfig *NasConfig `json:"nasConfig,omitempty"`

Expand Down Expand Up @@ -250,6 +250,14 @@ type Operation struct {
Parameters []ParameterSpec `json:"parameterconfigs,omitempty"`
}

// Spec for metrics collectors. For v1alpha2 we will keep metrics collection as
// cron jobs. This can be replaced by a push-model when the metadata client lib
// is ready.
type MetricsCollectorSpec struct {
Retain bool `json:"retain,omitempty"`
GoTemplate GoTemplate `json:"goTemplate,omitempty"`
}

func init() {
SchemeBuilder.Register(&Experiment{}, &ExperimentList{})
}

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

328 changes: 159 additions & 169 deletions pkg/api/v1alpha2/api.pb.go

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pkg/api/v1alpha2/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,7 @@ message ExperimentSpec {
string trial_template = 4;
int32 parallel_trial_count = 5;
int32 max_trial_count = 6;
string metrics_collector_type = 7;
NasConfig nas_config = 8;
NasConfig nas_config = 7;
}

message ExperimentStatus {
Expand Down
3 changes: 0 additions & 3 deletions pkg/api/v1alpha2/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,6 @@
"type": "integer",
"format": "int32"
},
"metrics_collector_type": {
"type": "string"
},
"nas_config": {
"$ref": "#/definitions/alpha2NasConfig"
}
Expand Down
Loading