From 03178ba8171590bd5358fb8621ad7ea3cf71f397 Mon Sep 17 00:00:00 2001 From: hougangliu Date: Wed, 22 May 2019 00:54:31 +0000 Subject: [PATCH] Add PreCheckRegisterExperiment --- cmd/manager/v1alpha2/main.go | 8 + pkg/api/v1alpha2/api.pb.go | 431 ++++++++++-------- pkg/api/v1alpha2/api.pb.gw.go | 46 ++ pkg/api/v1alpha2/api.proto | 14 + pkg/api/v1alpha2/api.swagger.json | 36 ++ pkg/api/v1alpha2/python/api_pb2.py | 259 +++++++---- pkg/api/v1alpha2/python/api_pb2_grpc.py | 18 + pkg/common/v1alpha2/katib_manager_util.go | 16 +- .../experiment/managerclient/managerclient.go | 16 +- .../experiment/validator/validator.go | 19 +- .../experiment/validator/validator_test.go | 15 +- pkg/db/v1alpha2/interface.go | 14 + pkg/mock/v1alpha2/api/manager.go | 20 + pkg/mock/v1alpha2/db/db.go | 15 + .../experiment/managerclient/managerclient.go | 14 +- 15 files changed, 627 insertions(+), 314 deletions(-) diff --git a/cmd/manager/v1alpha2/main.go b/cmd/manager/v1alpha2/main.go index 72ac1535dca..220f4500df4 100644 --- a/cmd/manager/v1alpha2/main.go +++ b/cmd/manager/v1alpha2/main.go @@ -31,6 +31,14 @@ func (s *server) RegisterExperiment(ctx context.Context, in *api_pb.RegisterExpe return &api_pb.RegisterExperimentReply{}, err } +// Register a Experiment to DB. +func (s *server) PreCheckRegisterExperiment(ctx context.Context, in *api_pb.RegisterExperimentRequest) (*api_pb.PreCheckRegisterExperimentReply, error) { + can_register, err := dbIf.PreCheckRegisterExperiment(in.Experiment) + return &api_pb.PreCheckRegisterExperimentReply{ + CanRegister: can_register, + }, err +} + // Delete a Experiment from DB by name. func (s *server) DeleteExperiment(ctx context.Context, in *api_pb.DeleteExperimentRequest) (*api_pb.DeleteExperimentReply, error) { err := dbIf.DeleteExperiment(in.ExperimentName) diff --git a/pkg/api/v1alpha2/api.pb.go b/pkg/api/v1alpha2/api.pb.go index 30d019effba..a43ced37a6d 100644 --- a/pkg/api/v1alpha2/api.pb.go +++ b/pkg/api/v1alpha2/api.pb.go @@ -30,6 +30,7 @@ It has these top-level messages: Trial RegisterExperimentRequest RegisterExperimentReply + PreCheckRegisterExperimentReply DeleteExperimentRequest DeleteExperimentReply GetExperimentRequest @@ -944,6 +945,24 @@ func (m *RegisterExperimentReply) String() string { return proto.Comp func (*RegisterExperimentReply) ProtoMessage() {} func (*RegisterExperimentReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +type PreCheckRegisterExperimentReply struct { + CanRegister bool `protobuf:"varint,1,opt,name=can_register,json=canRegister" json:"can_register,omitempty"` +} + +func (m *PreCheckRegisterExperimentReply) Reset() { *m = PreCheckRegisterExperimentReply{} } +func (m *PreCheckRegisterExperimentReply) String() string { return proto.CompactTextString(m) } +func (*PreCheckRegisterExperimentReply) ProtoMessage() {} +func (*PreCheckRegisterExperimentReply) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{22} +} + +func (m *PreCheckRegisterExperimentReply) GetCanRegister() bool { + if m != nil { + return m.CanRegister + } + return false +} + type DeleteExperimentRequest struct { ExperimentName string `protobuf:"bytes,1,opt,name=experiment_name,json=experimentName" json:"experiment_name,omitempty"` } @@ -951,7 +970,7 @@ type DeleteExperimentRequest struct { func (m *DeleteExperimentRequest) Reset() { *m = DeleteExperimentRequest{} } func (m *DeleteExperimentRequest) String() string { return proto.CompactTextString(m) } func (*DeleteExperimentRequest) ProtoMessage() {} -func (*DeleteExperimentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (*DeleteExperimentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } func (m *DeleteExperimentRequest) GetExperimentName() string { if m != nil { @@ -966,7 +985,7 @@ type DeleteExperimentReply struct { func (m *DeleteExperimentReply) Reset() { *m = DeleteExperimentReply{} } func (m *DeleteExperimentReply) String() string { return proto.CompactTextString(m) } func (*DeleteExperimentReply) ProtoMessage() {} -func (*DeleteExperimentReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (*DeleteExperimentReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } type GetExperimentRequest struct { ExperimentName string `protobuf:"bytes,1,opt,name=experiment_name,json=experimentName" json:"experiment_name,omitempty"` @@ -975,7 +994,7 @@ type GetExperimentRequest struct { func (m *GetExperimentRequest) Reset() { *m = GetExperimentRequest{} } func (m *GetExperimentRequest) String() string { return proto.CompactTextString(m) } func (*GetExperimentRequest) ProtoMessage() {} -func (*GetExperimentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } +func (*GetExperimentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } func (m *GetExperimentRequest) GetExperimentName() string { if m != nil { @@ -991,7 +1010,7 @@ type GetExperimentReply struct { func (m *GetExperimentReply) Reset() { *m = GetExperimentReply{} } func (m *GetExperimentReply) String() string { return proto.CompactTextString(m) } func (*GetExperimentReply) ProtoMessage() {} -func (*GetExperimentReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (*GetExperimentReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } func (m *GetExperimentReply) GetExperiment() *Experiment { if m != nil { @@ -1008,7 +1027,7 @@ type ExperimentSummary struct { func (m *ExperimentSummary) Reset() { *m = ExperimentSummary{} } func (m *ExperimentSummary) String() string { return proto.CompactTextString(m) } func (*ExperimentSummary) ProtoMessage() {} -func (*ExperimentSummary) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } +func (*ExperimentSummary) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } func (m *ExperimentSummary) GetExperimentName() string { if m != nil { @@ -1030,7 +1049,7 @@ type GetExperimentListRequest struct { func (m *GetExperimentListRequest) Reset() { *m = GetExperimentListRequest{} } func (m *GetExperimentListRequest) String() string { return proto.CompactTextString(m) } func (*GetExperimentListRequest) ProtoMessage() {} -func (*GetExperimentListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } +func (*GetExperimentListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } type GetExperimentListReply struct { ExperimentSummaries []*ExperimentSummary `protobuf:"bytes,1,rep,name=experiment_summaries,json=experimentSummaries" json:"experiment_summaries,omitempty"` @@ -1039,7 +1058,7 @@ type GetExperimentListReply struct { func (m *GetExperimentListReply) Reset() { *m = GetExperimentListReply{} } func (m *GetExperimentListReply) String() string { return proto.CompactTextString(m) } func (*GetExperimentListReply) ProtoMessage() {} -func (*GetExperimentListReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (*GetExperimentListReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } func (m *GetExperimentListReply) GetExperimentSummaries() []*ExperimentSummary { if m != nil { @@ -1056,7 +1075,7 @@ type UpdateExperimentStatusRequest struct { func (m *UpdateExperimentStatusRequest) Reset() { *m = UpdateExperimentStatusRequest{} } func (m *UpdateExperimentStatusRequest) String() string { return proto.CompactTextString(m) } func (*UpdateExperimentStatusRequest) ProtoMessage() {} -func (*UpdateExperimentStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (*UpdateExperimentStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } func (m *UpdateExperimentStatusRequest) GetExperimentName() string { if m != nil { @@ -1078,7 +1097,7 @@ type UpdateExperimentStatusReply struct { func (m *UpdateExperimentStatusReply) Reset() { *m = UpdateExperimentStatusReply{} } func (m *UpdateExperimentStatusReply) String() string { return proto.CompactTextString(m) } func (*UpdateExperimentStatusReply) ProtoMessage() {} -func (*UpdateExperimentStatusReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (*UpdateExperimentStatusReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } type UpdateAlgorithmExtraSettingsRequest struct { ExperimentName string `protobuf:"bytes,1,opt,name=experiment_name,json=experimentName" json:"experiment_name,omitempty"` @@ -1089,7 +1108,7 @@ func (m *UpdateAlgorithmExtraSettingsRequest) Reset() { *m = UpdateAlgor func (m *UpdateAlgorithmExtraSettingsRequest) String() string { return proto.CompactTextString(m) } func (*UpdateAlgorithmExtraSettingsRequest) ProtoMessage() {} func (*UpdateAlgorithmExtraSettingsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{31} + return fileDescriptor0, []int{32} } func (m *UpdateAlgorithmExtraSettingsRequest) GetExperimentName() string { @@ -1113,7 +1132,7 @@ func (m *UpdateAlgorithmExtraSettingsReply) Reset() { *m = UpdateAlgorit func (m *UpdateAlgorithmExtraSettingsReply) String() string { return proto.CompactTextString(m) } func (*UpdateAlgorithmExtraSettingsReply) ProtoMessage() {} func (*UpdateAlgorithmExtraSettingsReply) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{32} + return fileDescriptor0, []int{33} } type GetAlgorithmExtraSettingsRequest struct { @@ -1124,7 +1143,7 @@ func (m *GetAlgorithmExtraSettingsRequest) Reset() { *m = GetAlgorithmEx func (m *GetAlgorithmExtraSettingsRequest) String() string { return proto.CompactTextString(m) } func (*GetAlgorithmExtraSettingsRequest) ProtoMessage() {} func (*GetAlgorithmExtraSettingsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{33} + return fileDescriptor0, []int{34} } func (m *GetAlgorithmExtraSettingsRequest) GetExperimentName() string { @@ -1141,7 +1160,7 @@ type GetAlgorithmExtraSettingsReply struct { func (m *GetAlgorithmExtraSettingsReply) Reset() { *m = GetAlgorithmExtraSettingsReply{} } func (m *GetAlgorithmExtraSettingsReply) String() string { return proto.CompactTextString(m) } func (*GetAlgorithmExtraSettingsReply) ProtoMessage() {} -func (*GetAlgorithmExtraSettingsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } +func (*GetAlgorithmExtraSettingsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } func (m *GetAlgorithmExtraSettingsReply) GetExtraAlgorithmSettings() []*AlgorithmSetting { if m != nil { @@ -1157,7 +1176,7 @@ type RegisterTrialRequest struct { func (m *RegisterTrialRequest) Reset() { *m = RegisterTrialRequest{} } func (m *RegisterTrialRequest) String() string { return proto.CompactTextString(m) } func (*RegisterTrialRequest) ProtoMessage() {} -func (*RegisterTrialRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } +func (*RegisterTrialRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } func (m *RegisterTrialRequest) GetTrial() *Trial { if m != nil { @@ -1172,7 +1191,7 @@ type RegisterTrialReply struct { func (m *RegisterTrialReply) Reset() { *m = RegisterTrialReply{} } func (m *RegisterTrialReply) String() string { return proto.CompactTextString(m) } func (*RegisterTrialReply) ProtoMessage() {} -func (*RegisterTrialReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +func (*RegisterTrialReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } type DeleteTrialRequest struct { TrialName string `protobuf:"bytes,1,opt,name=trial_name,json=trialName" json:"trial_name,omitempty"` @@ -1181,7 +1200,7 @@ type DeleteTrialRequest struct { func (m *DeleteTrialRequest) Reset() { *m = DeleteTrialRequest{} } func (m *DeleteTrialRequest) String() string { return proto.CompactTextString(m) } func (*DeleteTrialRequest) ProtoMessage() {} -func (*DeleteTrialRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } +func (*DeleteTrialRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } func (m *DeleteTrialRequest) GetTrialName() string { if m != nil { @@ -1196,7 +1215,7 @@ type DeleteTrialReply struct { func (m *DeleteTrialReply) Reset() { *m = DeleteTrialReply{} } func (m *DeleteTrialReply) String() string { return proto.CompactTextString(m) } func (*DeleteTrialReply) ProtoMessage() {} -func (*DeleteTrialReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } +func (*DeleteTrialReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } type GetTrialListRequest struct { ExperimentName string `protobuf:"bytes,1,opt,name=experiment_name,json=experimentName" json:"experiment_name,omitempty"` @@ -1206,7 +1225,7 @@ type GetTrialListRequest struct { func (m *GetTrialListRequest) Reset() { *m = GetTrialListRequest{} } func (m *GetTrialListRequest) String() string { return proto.CompactTextString(m) } func (*GetTrialListRequest) ProtoMessage() {} -func (*GetTrialListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } +func (*GetTrialListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } func (m *GetTrialListRequest) GetExperimentName() string { if m != nil { @@ -1229,7 +1248,7 @@ type GetTrialListReply struct { func (m *GetTrialListReply) Reset() { *m = GetTrialListReply{} } func (m *GetTrialListReply) String() string { return proto.CompactTextString(m) } func (*GetTrialListReply) ProtoMessage() {} -func (*GetTrialListReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } +func (*GetTrialListReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } func (m *GetTrialListReply) GetTrials() []*Trial { if m != nil { @@ -1245,7 +1264,7 @@ type GetTrialRequest struct { func (m *GetTrialRequest) Reset() { *m = GetTrialRequest{} } func (m *GetTrialRequest) String() string { return proto.CompactTextString(m) } func (*GetTrialRequest) ProtoMessage() {} -func (*GetTrialRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } +func (*GetTrialRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } func (m *GetTrialRequest) GetTrialName() string { if m != nil { @@ -1261,7 +1280,7 @@ type GetTrialReply struct { func (m *GetTrialReply) Reset() { *m = GetTrialReply{} } func (m *GetTrialReply) String() string { return proto.CompactTextString(m) } func (*GetTrialReply) ProtoMessage() {} -func (*GetTrialReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } +func (*GetTrialReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } func (m *GetTrialReply) GetTrial() *Trial { if m != nil { @@ -1278,7 +1297,7 @@ type UpdateTrialStatusRequest struct { func (m *UpdateTrialStatusRequest) Reset() { *m = UpdateTrialStatusRequest{} } func (m *UpdateTrialStatusRequest) String() string { return proto.CompactTextString(m) } func (*UpdateTrialStatusRequest) ProtoMessage() {} -func (*UpdateTrialStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } +func (*UpdateTrialStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } func (m *UpdateTrialStatusRequest) GetTrialName() string { if m != nil { @@ -1300,7 +1319,7 @@ type UpdateTrialStatusReply struct { func (m *UpdateTrialStatusReply) Reset() { *m = UpdateTrialStatusReply{} } func (m *UpdateTrialStatusReply) String() string { return proto.CompactTextString(m) } func (*UpdateTrialStatusReply) ProtoMessage() {} -func (*UpdateTrialStatusReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } +func (*UpdateTrialStatusReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } type ReportObservationLogRequest struct { TrialName string `protobuf:"bytes,1,opt,name=trial_name,json=trialName" json:"trial_name,omitempty"` @@ -1310,7 +1329,7 @@ type ReportObservationLogRequest struct { func (m *ReportObservationLogRequest) Reset() { *m = ReportObservationLogRequest{} } func (m *ReportObservationLogRequest) String() string { return proto.CompactTextString(m) } func (*ReportObservationLogRequest) ProtoMessage() {} -func (*ReportObservationLogRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } +func (*ReportObservationLogRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } func (m *ReportObservationLogRequest) GetTrialName() string { if m != nil { @@ -1332,7 +1351,7 @@ type ReportObservationLogReply struct { func (m *ReportObservationLogReply) Reset() { *m = ReportObservationLogReply{} } func (m *ReportObservationLogReply) String() string { return proto.CompactTextString(m) } func (*ReportObservationLogReply) ProtoMessage() {} -func (*ReportObservationLogReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } +func (*ReportObservationLogReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } type GetObservationLogRequest struct { TrialName string `protobuf:"bytes,1,opt,name=trial_name,json=trialName" json:"trial_name,omitempty"` @@ -1344,7 +1363,7 @@ type GetObservationLogRequest struct { func (m *GetObservationLogRequest) Reset() { *m = GetObservationLogRequest{} } func (m *GetObservationLogRequest) String() string { return proto.CompactTextString(m) } func (*GetObservationLogRequest) ProtoMessage() {} -func (*GetObservationLogRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } +func (*GetObservationLogRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } func (m *GetObservationLogRequest) GetTrialName() string { if m != nil { @@ -1381,7 +1400,7 @@ type GetObservationLogReply struct { func (m *GetObservationLogReply) Reset() { *m = GetObservationLogReply{} } func (m *GetObservationLogReply) String() string { return proto.CompactTextString(m) } func (*GetObservationLogReply) ProtoMessage() {} -func (*GetObservationLogReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } +func (*GetObservationLogReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} } func (m *GetObservationLogReply) GetObservationLog() *ObservationLog { if m != nil { @@ -1399,7 +1418,7 @@ type GetSuggestionsRequest struct { func (m *GetSuggestionsRequest) Reset() { *m = GetSuggestionsRequest{} } func (m *GetSuggestionsRequest) String() string { return proto.CompactTextString(m) } func (*GetSuggestionsRequest) ProtoMessage() {} -func (*GetSuggestionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} } +func (*GetSuggestionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{50} } func (m *GetSuggestionsRequest) GetExperimentName() string { if m != nil { @@ -1429,7 +1448,7 @@ type GetSuggestionsReply struct { func (m *GetSuggestionsReply) Reset() { *m = GetSuggestionsReply{} } func (m *GetSuggestionsReply) String() string { return proto.CompactTextString(m) } func (*GetSuggestionsReply) ProtoMessage() {} -func (*GetSuggestionsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{50} } +func (*GetSuggestionsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{51} } func (m *GetSuggestionsReply) GetTrials() []*Trial { if m != nil { @@ -1447,7 +1466,7 @@ func (m *ValidateAlgorithmSettingsRequest) Reset() { *m = ValidateAlgori func (m *ValidateAlgorithmSettingsRequest) String() string { return proto.CompactTextString(m) } func (*ValidateAlgorithmSettingsRequest) ProtoMessage() {} func (*ValidateAlgorithmSettingsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{51} + return fileDescriptor0, []int{52} } func (m *ValidateAlgorithmSettingsRequest) GetExperimentSpec() *ExperimentSpec { @@ -1472,7 +1491,7 @@ type ValidateAlgorithmSettingsReply struct { func (m *ValidateAlgorithmSettingsReply) Reset() { *m = ValidateAlgorithmSettingsReply{} } func (m *ValidateAlgorithmSettingsReply) String() string { return proto.CompactTextString(m) } func (*ValidateAlgorithmSettingsReply) ProtoMessage() {} -func (*ValidateAlgorithmSettingsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{52} } +func (*ValidateAlgorithmSettingsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{53} } func init() { proto.RegisterType((*FeasibleSpace)(nil), "api.v1.alpha2.FeasibleSpace") @@ -1501,6 +1520,7 @@ func init() { proto.RegisterType((*Trial)(nil), "api.v1.alpha2.Trial") proto.RegisterType((*RegisterExperimentRequest)(nil), "api.v1.alpha2.RegisterExperimentRequest") proto.RegisterType((*RegisterExperimentReply)(nil), "api.v1.alpha2.RegisterExperimentReply") + proto.RegisterType((*PreCheckRegisterExperimentReply)(nil), "api.v1.alpha2.PreCheckRegisterExperimentReply") proto.RegisterType((*DeleteExperimentRequest)(nil), "api.v1.alpha2.DeleteExperimentRequest") proto.RegisterType((*DeleteExperimentReply)(nil), "api.v1.alpha2.DeleteExperimentReply") proto.RegisterType((*GetExperimentRequest)(nil), "api.v1.alpha2.GetExperimentRequest") @@ -1553,6 +1573,9 @@ type ManagerClient interface { // Register a Experiment to DB. RegisterExperiment(ctx context.Context, in *RegisterExperimentRequest, opts ...grpc.CallOption) (*RegisterExperimentReply, error) // * + // PreCheck to register a Experiment to DB. + PreCheckRegisterExperiment(ctx context.Context, in *RegisterExperimentRequest, opts ...grpc.CallOption) (*PreCheckRegisterExperimentReply, error) + // * // Delete a Experiment from DB by name. DeleteExperiment(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*DeleteExperimentReply, error) // * @@ -1623,6 +1646,15 @@ func (c *managerClient) RegisterExperiment(ctx context.Context, in *RegisterExpe return out, nil } +func (c *managerClient) PreCheckRegisterExperiment(ctx context.Context, in *RegisterExperimentRequest, opts ...grpc.CallOption) (*PreCheckRegisterExperimentReply, error) { + out := new(PreCheckRegisterExperimentReply) + err := grpc.Invoke(ctx, "/api.v1.alpha2.Manager/PreCheckRegisterExperiment", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *managerClient) DeleteExperiment(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*DeleteExperimentReply, error) { out := new(DeleteExperimentReply) err := grpc.Invoke(ctx, "/api.v1.alpha2.Manager/DeleteExperiment", in, out, c.cc, opts...) @@ -1765,6 +1797,9 @@ type ManagerServer interface { // Register a Experiment to DB. RegisterExperiment(context.Context, *RegisterExperimentRequest) (*RegisterExperimentReply, error) // * + // PreCheck to register a Experiment to DB. + PreCheckRegisterExperiment(context.Context, *RegisterExperimentRequest) (*PreCheckRegisterExperimentReply, error) + // * // Delete a Experiment from DB by name. DeleteExperiment(context.Context, *DeleteExperimentRequest) (*DeleteExperimentReply, error) // * @@ -1840,6 +1875,24 @@ func _Manager_RegisterExperiment_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Manager_PreCheckRegisterExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ManagerServer).PreCheckRegisterExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.alpha2.Manager/PreCheckRegisterExperiment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ManagerServer).PreCheckRegisterExperiment(ctx, req.(*RegisterExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Manager_DeleteExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteExperimentRequest) if err := dec(in); err != nil { @@ -2118,6 +2171,10 @@ var _Manager_serviceDesc = grpc.ServiceDesc{ MethodName: "RegisterExperiment", Handler: _Manager_RegisterExperiment_Handler, }, + { + MethodName: "PreCheckRegisterExperiment", + Handler: _Manager_PreCheckRegisterExperiment_Handler, + }, { MethodName: "DeleteExperiment", Handler: _Manager_DeleteExperiment_Handler, @@ -2313,158 +2370,162 @@ var _EarlyStopping_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("api.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 2447 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdd, 0x6f, 0x1b, 0x59, - 0x15, 0xdf, 0xb1, 0xf3, 0x51, 0x1f, 0xd7, 0x8e, 0x73, 0x93, 0xb4, 0x8e, 0xfb, 0x11, 0xf7, 0xf6, - 0x2b, 0x64, 0xdb, 0xa4, 0xf5, 0x2e, 0xdb, 0xdd, 0x6c, 0xd9, 0xdd, 0xd4, 0x71, 0xa3, 0xa8, 0xa9, - 0x53, 0x8d, 0x9d, 0x42, 0x17, 0xa4, 0x61, 0xe2, 0xde, 0xba, 0x03, 0xe3, 0x99, 0x61, 0x66, 0xdc, - 0x4d, 0xa8, 0x2a, 0xa1, 0xc2, 0x03, 0x08, 0xa8, 0x84, 0xe0, 0x05, 0x90, 0xe0, 0x0d, 0x89, 0x07, - 0x78, 0xe2, 0x95, 0x07, 0x24, 0x1e, 0x79, 0xe3, 0xe3, 0x2f, 0x80, 0xff, 0x03, 0xdd, 0x33, 0xdf, - 0x5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x56, 0xd4, - 0xce, 0xa7, 0xd4, 0x5d, 0x08, 0xcc, 0x4b, 0xeb, 0x57, 0x02, 0xff, 0xf1, 0x94, 0x6c, 0x3c, 0xc9, - 0x4a, 0x22, 0xf9, 0x32, 0x7b, 0xe4, 0xda, 0xf2, 0x58, 0x58, 0xce, 0xec, 0x1a, 0x32, 0xbb, 0x42, - 0x2f, 0xc4, 0xf2, 0x35, 0x89, 0xe7, 0xe4, 0x5e, 0x39, 0x77, 0x41, 0x8c, 0x59, 0xca, 0x5d, 0x90, - 0x4e, 0xeb, 0xf2, 0xd1, 0xc0, 0x70, 0x0d, 0x25, 0xee, 0x82, 0x24, 0xa1, 0x97, 0x02, 0x94, 0xa3, - 0xfd, 0x1f, 0xb9, 0x94, 0xdc, 0x24, 0xd9, 0xae, 0xd6, 0xe8, 0x11, 0xa8, 0xd0, 0x9d, 0x44, 0xcf, - 0xc4, 0x79, 0x84, 0x90, 0x9c, 0xc4, 0x1f, 0x05, 0x58, 0xcc, 0xec, 0xd5, 0x12, 0x6a, 0x78, 0x54, - 0xa3, 0x99, 0x50, 0xc3, 0xd1, 0x6d, 0x20, 0xbd, 0x89, 0x2c, 0xdf, 0xa5, 0x57, 0x22, 0x2c, 0x33, - 0x17, 0xad, 0x0b, 0x2b, 0x8d, 0xff, 0x08, 0x00, 0x81, 0x0f, 0xe4, 0xf3, 0xff, 0x5d, 0x0c, 0xc9, - 0xf3, 0xff, 0x63, 0x68, 0x1a, 0x33, 0x50, 0x8a, 0xfc, 0xd1, 0x7f, 0x7f, 0x0a, 0xff, 0xc3, 0xe5, - 0xbd, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x10, 0xc7, 0xd4, 0x34, 0x1b, 0x23, 0x00, 0x00, + // 2505 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xcb, 0x73, 0x1b, 0x59, + 0xf5, 0x9e, 0x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ea, 0x70, 0xd0, 0x55, 0xa4, 0x43, 0x66, 0x98, 0xe8, + 0xd6, 0xa4, 0x98, 0x53, 0x87, 0x83, 0x5d, 0x1c, 0x20, 0x4b, 0x90, 0x97, 0x55, 0x7d, 0x68, 0x75, + 0x4d, 0xf9, 0xdb, 0xcc, 0xc4, 0xf3, 0x99, 0x14, 0x01, 0x87, 0xda, 0x7c, 0x84, 0x9c, 0x87, 0x13, + 0xda, 0xd0, 0xf2, 0x11, 0x59, 0x44, 0xe4, 0xed, 0x31, 0x84, 0xd0, 0xbf, 0x09, 0x90, 0xf3, 0xa8, + 0xf0, 0xf4, 0xf0, 0xc8, 0x74, 0xbd, 0xfa, 0xc9, 0x89, 0x05, 0x6f, 0x14, 0x6b, 0xf6, 0x3e, 0xcc, + 0xfa, 0x85, 0xcf, 0xcf, 0xd2, 0x0d, 0xdb, 0x72, 0x9a, 0x93, 0x6b, 0x21, 0x35, 0x31, 0x45, 0x5f, + 0x38, 0xf0, 0xb9, 0xda, 0x82, 0x62, 0x18, 0x41, 0x6e, 0x01, 0x78, 0x18, 0xd3, 0x89, 0x61, 0xaa, + 0xb0, 0x60, 0x9e, 0x04, 0xf0, 0xf4, 0xd7, 0x13, 0x50, 0x6c, 0x3e, 0xd3, 0x99, 0x21, 0x0f, 0x98, + 0x6a, 0x61, 0xea, 0xef, 0xc7, 0x49, 0xdb, 0x89, 0x72, 0x25, 0x9a, 0x81, 0xa1, 0x75, 0x47, 0x30, + 0x27, 0x1b, 0x90, 0xf3, 0x54, 0xc0, 0x89, 0x42, 0xaa, 0xda, 0x20, 0x4d, 0x1f, 0xce, 0xd7, 0x7a, + 0xc5, 0x92, 0x22, 0x7b, 0xa1, 0xf2, 0x15, 0x7d, 0x38, 0x3f, 0x2a, 0xcb, 0x90, 0x25, 0xa5, 0x6b, + 0xb1, 0x81, 0xae, 0x48, 0x16, 0x73, 0x04, 0xbc, 0x80, 0xa3, 0x1d, 0x67, 0x90, 0xbc, 0x0f, 0x27, + 0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0x75, 0xe9, 0x68, 0x60, 0xb0, + 0x86, 0x62, 0x77, 0x41, 0x9c, 0xd0, 0x4b, 0x01, 0x8a, 0xe1, 0xae, 0x95, 0x5c, 0x8c, 0x6f, 0x12, + 0x6f, 0xb2, 0xab, 0xf4, 0x08, 0x54, 0xe0, 0x4e, 0xa2, 0xa7, 0xa3, 0x3c, 0x02, 0x48, 0x4e, 0xe2, + 0x77, 0x02, 0x2c, 0xa6, 0x76, 0x98, 0x31, 0x35, 0x3c, 0xaa, 0x3d, 0x8e, 0xa9, 0xe1, 0xe8, 0xe6, + 0x95, 0x5e, 0x47, 0x96, 0xef, 0xd2, 0xcb, 0x21, 0x96, 0xa9, 0x8b, 0x36, 0x84, 0xd5, 0xfa, 0xbf, + 0x05, 0x00, 0xdf, 0x07, 0xf2, 0xf9, 0x7f, 0x2f, 0x86, 0xe4, 0xf9, 0xff, 0x30, 0x34, 0xf5, 0x59, + 0x28, 0x84, 0xfe, 0xe1, 0xe1, 0x60, 0x0a, 0xff, 0xbb, 0xe7, 0xbd, 0xff, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x8b, 0x40, 0x8a, 0x6f, 0x17, 0x24, 0x00, 0x00, } diff --git a/pkg/api/v1alpha2/api.pb.gw.go b/pkg/api/v1alpha2/api.pb.gw.go index 1fafb9cef5b..aa65dcbb750 100644 --- a/pkg/api/v1alpha2/api.pb.gw.go +++ b/pkg/api/v1alpha2/api.pb.gw.go @@ -41,6 +41,19 @@ func request_Manager_RegisterExperiment_0(ctx context.Context, marshaler runtime } +func request_Manager_PreCheckRegisterExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterExperimentRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Experiment); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PreCheckRegisterExperiment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_Manager_DeleteExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteExperimentRequest var metadata runtime.ServerMetadata @@ -419,6 +432,35 @@ func RegisterManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr }) + mux.Handle("POST", pattern_Manager_PreCheckRegisterExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Manager_PreCheckRegisterExperiment_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Manager_PreCheckRegisterExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Manager_DeleteExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(ctx) defer cancel() @@ -860,6 +902,8 @@ func RegisterManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr var ( pattern_Manager_RegisterExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "Manager", "RegisterExperiment"}, "")) + pattern_Manager_PreCheckRegisterExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "Manager", "PreCheckRegisterExperiment"}, "")) + pattern_Manager_DeleteExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "Manager", "DeleteExperiment", "experiment_name"}, "")) pattern_Manager_GetExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "Manager", "GetExperiment", "experiment_name"}, "")) @@ -894,6 +938,8 @@ var ( var ( forward_Manager_RegisterExperiment_0 = runtime.ForwardResponseMessage + forward_Manager_PreCheckRegisterExperiment_0 = runtime.ForwardResponseMessage + forward_Manager_DeleteExperiment_0 = runtime.ForwardResponseMessage forward_Manager_GetExperiment_0 = runtime.ForwardResponseMessage diff --git a/pkg/api/v1alpha2/api.proto b/pkg/api/v1alpha2/api.proto index 7801a7a6921..185e0259259 100644 --- a/pkg/api/v1alpha2/api.proto +++ b/pkg/api/v1alpha2/api.proto @@ -24,6 +24,17 @@ service Manager { }; }; + /** + * PreCheck to register a Experiment to DB. + */ + rpc PreCheckRegisterExperiment(RegisterExperimentRequest) returns (PreCheckRegisterExperimentReply){ + option (google.api.http) = { + post: "/api/Manager/PreCheckRegisterExperiment" + body: "experiment" + }; + }; + + /** * Delete a Experiment from DB by name. */ @@ -392,6 +403,9 @@ message RegisterExperimentRequest { message RegisterExperimentReply { } +message PreCheckRegisterExperimentReply { + bool can_register = 1; +} message DeleteExperimentRequest { string experiment_name = 1; } diff --git a/pkg/api/v1alpha2/api.swagger.json b/pkg/api/v1alpha2/api.swagger.json index 99241bf48c0..396c767cc09 100644 --- a/pkg/api/v1alpha2/api.swagger.json +++ b/pkg/api/v1alpha2/api.swagger.json @@ -242,6 +242,33 @@ ] } }, + "/api/Manager/PreCheckRegisterExperiment": { + "post": { + "summary": "*\nPreCheck to register a Experiment to DB.", + "operationId": "PreCheckRegisterExperiment", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/alpha2PreCheckRegisterExperimentReply" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/alpha2Experiment" + } + } + ], + "tags": [ + "Manager" + ] + } + }, "/api/Manager/RegisterExperiment": { "post": { "summary": "*\nRegister a Experiment to DB.", @@ -906,6 +933,15 @@ "default": "UNKNOWN_TYPE", "description": "*\nTypes of value for HyperParameter." }, + "alpha2PreCheckRegisterExperimentReply": { + "type": "object", + "properties": { + "can_register": { + "type": "boolean", + "format": "boolean" + } + } + }, "alpha2RegisterExperimentReply": { "type": "object" }, diff --git a/pkg/api/v1alpha2/python/api_pb2.py b/pkg/api/v1alpha2/python/api_pb2.py index 230eab0bc02..77970b97be8 100644 --- a/pkg/api/v1alpha2/python/api_pb2.py +++ b/pkg/api/v1alpha2/python/api_pb2.py @@ -21,7 +21,7 @@ name='api.proto', package='api.v1.alpha2', syntax='proto3', - serialized_pb=_b('\n\tapi.proto\x12\rapi.v1.alpha2\x1a\x1cgoogle/api/annotations.proto\"E\n\rFeasibleSpace\x12\x0b\n\x03max\x18\x01 \x01(\t\x12\x0b\n\x03min\x18\x02 \x01(\t\x12\x0c\n\x04list\x18\x03 \x03(\t\x12\x0c\n\x04step\x18\x04 \x01(\t\"\x89\x01\n\rParameterSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0eparameter_type\x18\x02 \x01(\x0e\x32\x1c.api.v1.alpha2.ParameterType\x12\x34\n\x0e\x66\x65\x61sible_space\x18\x03 \x01(\x0b\x32\x1c.api.v1.alpha2.FeasibleSpace\"\x89\x01\n\rObjectiveSpec\x12*\n\x04type\x18\x01 \x01(\x0e\x32\x1c.api.v1.alpha2.ObjectiveType\x12\x0c\n\x04goal\x18\x02 \x01(\x02\x12\x1d\n\x15objective_metric_name\x18\x03 \x01(\t\x12\x1f\n\x17\x61\x64\x64itional_metric_names\x18\x04 \x03(\t\"/\n\x10\x41lgorithmSetting\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x13\n\x11\x45\x61rlyStoppingSpec\"\xa2\x01\n\rAlgorithmSpec\x12\x16\n\x0e\x61lgorithm_name\x18\x01 \x01(\t\x12:\n\x11\x61lgorithm_setting\x18\x02 \x03(\x0b\x32\x1f.api.v1.alpha2.AlgorithmSetting\x12=\n\x13\x65\x61rly_stopping_spec\x18\x03 \x01(\x0b\x32 .api.v1.alpha2.EarlyStoppingSpec\"\xb1\x01\n\tNasConfig\x12\x30\n\x0cgraph_config\x18\x01 \x01(\x0b\x32\x1a.api.v1.alpha2.GraphConfig\x12\x37\n\noperations\x18\x02 \x01(\x0b\x32#.api.v1.alpha2.NasConfig.Operations\x1a\x39\n\nOperations\x12+\n\toperation\x18\x01 \x03(\x0b\x32\x18.api.v1.alpha2.Operation\"L\n\x0bGraphConfig\x12\x12\n\nnum_layers\x18\x01 \x01(\x05\x12\x13\n\x0binput_sizes\x18\x02 \x03(\x05\x12\x14\n\x0coutput_sizes\x18\x03 \x03(\x05\"\xa9\x01\n\tOperation\x12\x16\n\x0eoperation_type\x18\x01 \x01(\t\x12@\n\x0fparameter_specs\x18\x02 \x01(\x0b\x32\'.api.v1.alpha2.Operation.ParameterSpecs\x1a\x42\n\x0eParameterSpecs\x12\x30\n\nparameters\x18\x01 \x03(\x0b\x32\x1c.api.v1.alpha2.ParameterSpec\"\x9a\x03\n\x0e\x45xperimentSpec\x12\x45\n\x0fparameter_specs\x18\x01 \x01(\x0b\x32,.api.v1.alpha2.ExperimentSpec.ParameterSpecs\x12/\n\tobjective\x18\x02 \x01(\x0b\x32\x1c.api.v1.alpha2.ObjectiveSpec\x12/\n\talgorithm\x18\x03 \x01(\x0b\x32\x1c.api.v1.alpha2.AlgorithmSpec\x12\x16\n\x0etrial_template\x18\x04 \x01(\t\x12\x1e\n\x16metrics_collector_spec\x18\x05 \x01(\t\x12\x1c\n\x14parallel_trial_count\x18\x06 \x01(\x05\x12\x17\n\x0fmax_trial_count\x18\x07 \x01(\x05\x12,\n\nnas_config\x18\x08 \x01(\x0b\x32\x18.api.v1.alpha2.NasConfig\x1a\x42\n\x0eParameterSpecs\x12\x30\n\nparameters\x18\x01 \x03(\x0b\x32\x1c.api.v1.alpha2.ParameterSpec\"\xf8\x01\n\x10\x45xperimentStatus\x12\x12\n\nstart_time\x18\x01 \x01(\t\x12\x17\n\x0f\x63ompletion_time\x18\x02 \x01(\t\x12J\n\tcondition\x18\x03 \x01(\x0e\x32\x37.api.v1.alpha2.ExperimentStatus.ExperimentConditionType\"k\n\x17\x45xperimentConditionType\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nRESTARTING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05\"x\n\nExperiment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x04spec\x18\x02 \x01(\x0b\x32\x1d.api.v1.alpha2.ExperimentSpec\x12/\n\x06status\x18\x03 \x01(\x0b\x32\x1f.api.v1.alpha2.ExperimentStatus\"2\n\x13ParameterAssignment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"%\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"F\n\tMetricLog\x12\x12\n\ntime_stamp\x18\x01 \x01(\t\x12%\n\x06metric\x18\x02 \x01(\x0b\x32\x15.api.v1.alpha2.Metric\"5\n\x0bObservation\x12&\n\x07metrics\x18\x01 \x03(\x0b\x32\x15.api.v1.alpha2.Metric\"?\n\x0eObservationLog\x12-\n\x0bmetric_logs\x18\x01 \x03(\x0b\x32\x18.api.v1.alpha2.MetricLog\"\xa6\x02\n\tTrialSpec\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12/\n\tobjective\x18\x02 \x01(\x0b\x32\x1c.api.v1.alpha2.ObjectiveSpec\x12L\n\x15parameter_assignments\x18\x03 \x01(\x0b\x32-.api.v1.alpha2.TrialSpec.ParameterAssignments\x12\x10\n\x08run_spec\x18\x04 \x01(\t\x12\x1e\n\x16metrics_collector_spec\x18\x05 \x01(\t\x1aO\n\x14ParameterAssignments\x12\x37\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\".api.v1.alpha2.ParameterAssignment\"\x91\x02\n\x0bTrialStatus\x12\x12\n\nstart_time\x18\x01 \x01(\t\x12\x17\n\x0f\x63ompletion_time\x18\x02 \x01(\t\x12@\n\tcondition\x18\x03 \x01(\x0e\x32-.api.v1.alpha2.TrialStatus.TrialConditionType\x12/\n\x0bobservation\x18\x04 \x01(\x0b\x32\x1a.api.v1.alpha2.Observation\"b\n\x12TrialConditionType\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06KILLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05\"i\n\x05Trial\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x04spec\x18\x02 \x01(\x0b\x32\x18.api.v1.alpha2.TrialSpec\x12*\n\x06status\x18\x03 \x01(\x0b\x32\x1a.api.v1.alpha2.TrialStatus\"J\n\x19RegisterExperimentRequest\x12-\n\nexperiment\x18\x01 \x01(\x0b\x32\x19.api.v1.alpha2.Experiment\"\x19\n\x17RegisterExperimentReply\"2\n\x17\x44\x65leteExperimentRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\"\x17\n\x15\x44\x65leteExperimentReply\"/\n\x14GetExperimentRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\"C\n\x12GetExperimentReply\x12-\n\nexperiment\x18\x01 \x01(\x0b\x32\x19.api.v1.alpha2.Experiment\"]\n\x11\x45xperimentSummary\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12/\n\x06status\x18\x02 \x01(\x0b\x32\x1f.api.v1.alpha2.ExperimentStatus\"\x1a\n\x18GetExperimentListRequest\"X\n\x16GetExperimentListReply\x12>\n\x14\x65xperiment_summaries\x18\x01 \x03(\x0b\x32 .api.v1.alpha2.ExperimentSummary\"m\n\x1dUpdateExperimentStatusRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12\x33\n\nnew_status\x18\x02 \x01(\x0b\x32\x1f.api.v1.alpha2.ExperimentStatus\"\x1d\n\x1bUpdateExperimentStatusReply\"\x81\x01\n#UpdateAlgorithmExtraSettingsRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12\x41\n\x18\x65xtra_algorithm_settings\x18\x02 \x03(\x0b\x32\x1f.api.v1.alpha2.AlgorithmSetting\"#\n!UpdateAlgorithmExtraSettingsReply\";\n GetAlgorithmExtraSettingsRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\"c\n\x1eGetAlgorithmExtraSettingsReply\x12\x41\n\x18\x65xtra_algorithm_settings\x18\x01 \x03(\x0b\x32\x1f.api.v1.alpha2.AlgorithmSetting\";\n\x14RegisterTrialRequest\x12#\n\x05trial\x18\x01 \x01(\x0b\x32\x14.api.v1.alpha2.Trial\"\x14\n\x12RegisterTrialReply\"(\n\x12\x44\x65leteTrialRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\"\x12\n\x10\x44\x65leteTrialReply\">\n\x13GetTrialListRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"9\n\x11GetTrialListReply\x12$\n\x06trials\x18\x01 \x03(\x0b\x32\x14.api.v1.alpha2.Trial\"%\n\x0fGetTrialRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\"4\n\rGetTrialReply\x12#\n\x05trial\x18\x01 \x01(\x0b\x32\x14.api.v1.alpha2.Trial\"^\n\x18UpdateTrialStatusRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\x12.\n\nnew_status\x18\x02 \x01(\x0b\x32\x1a.api.v1.alpha2.TrialStatus\"\x18\n\x16UpdateTrialStatusReply\"i\n\x1bReportObservationLogRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\x12\x36\n\x0fobservation_log\x18\x02 \x01(\x0b\x32\x1d.api.v1.alpha2.ObservationLog\"\x1b\n\x19ReportObservationLogReply\"i\n\x18GetObservationLogRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\x12\x13\n\x0bmetric_name\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\t\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\t\"P\n\x16GetObservationLogReply\x12\x36\n\x0fobservation_log\x18\x01 \x01(\x0b\x32\x1d.api.v1.alpha2.ObservationLog\"`\n\x15GetSuggestionsRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61lgorithm_name\x18\x02 \x01(\t\x12\x16\n\x0erequest_number\x18\x03 \x01(\x05\";\n\x13GetSuggestionsReply\x12$\n\x06trials\x18\x01 \x03(\x0b\x32\x14.api.v1.alpha2.Trial\"r\n ValidateAlgorithmSettingsRequest\x12\x36\n\x0f\x65xperiment_spec\x18\x01 \x01(\x0b\x32\x1d.api.v1.alpha2.ExperimentSpec\x12\x16\n\x0e\x61lgorithm_name\x18\x02 \x01(\t\" \n\x1eValidateAlgorithmSettingsReply*U\n\rParameterType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\n\n\x06\x44OUBLE\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x0c\n\x08\x44ISCRETE\x10\x03\x12\x0f\n\x0b\x43\x41TEGORICAL\x10\x04*8\n\rObjectiveType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08MINIMIZE\x10\x01\x12\x0c\n\x08MAXIMIZE\x10\x02\x32\xa6\x13\n\x07Manager\x12\x9b\x01\n\x12RegisterExperiment\x12(.api.v1.alpha2.RegisterExperimentRequest\x1a&.api.v1.alpha2.RegisterExperimentReply\"3\x82\xd3\xe4\x93\x02-\"\x1f/api/Manager/RegisterExperiment:\nexperiment\x12\x99\x01\n\x10\x44\x65leteExperiment\x12&.api.v1.alpha2.DeleteExperimentRequest\x1a$.api.v1.alpha2.DeleteExperimentReply\"7\x82\xd3\xe4\x93\x02\x31\x12//api/Manager/DeleteExperiment/{experiment_name}\x12\x8d\x01\n\rGetExperiment\x12#.api.v1.alpha2.GetExperimentRequest\x1a!.api.v1.alpha2.GetExperimentReply\"4\x82\xd3\xe4\x93\x02.\x12,/api/Manager/GetExperiment/{experiment_name}\x12\x8b\x01\n\x11GetExperimentList\x12\'.api.v1.alpha2.GetExperimentListRequest\x1a%.api.v1.alpha2.GetExperimentListReply\"&\x82\xd3\xe4\x93\x02 \x12\x1e/api/Manager/GetExperimentList\x12\xb4\x01\n\x16UpdateExperimentStatus\x12,.api.v1.alpha2.UpdateExperimentStatusRequest\x1a*.api.v1.alpha2.UpdateExperimentStatusReply\"@\x82\xd3\xe4\x93\x02:\x1a\x35/api/Manager/UpdateExperimentStatus/{experiment_name}:\x01*\x12\xcc\x01\n\x1cUpdateAlgorithmExtraSettings\x12\x32.api.v1.alpha2.UpdateAlgorithmExtraSettingsRequest\x1a\x30.api.v1.alpha2.UpdateAlgorithmExtraSettingsReply\"F\x82\xd3\xe4\x93\x02@\x1a;/api/Manager/UpdateAlgorithmExtraSettings/{experiment_name}:\x01*\x12\xbd\x01\n\x19GetAlgorithmExtraSettings\x12/.api.v1.alpha2.GetAlgorithmExtraSettingsRequest\x1a-.api.v1.alpha2.GetAlgorithmExtraSettingsReply\"@\x82\xd3\xe4\x93\x02:\x12\x38/api/Manager/GetAlgorithmExtraSettings/{experiment_name}\x12\x82\x01\n\rRegisterTrial\x12#.api.v1.alpha2.RegisterTrialRequest\x1a!.api.v1.alpha2.RegisterTrialReply\")\x82\xd3\xe4\x93\x02#\"\x1a/api/Manager/RegisterTrial:\x05trial\x12\x80\x01\n\x0b\x44\x65leteTrial\x12!.api.v1.alpha2.DeleteTrialRequest\x1a\x1f.api.v1.alpha2.DeleteTrialReply\"-\x82\xd3\xe4\x93\x02\'\x12%/api/Manager/DeleteTrial/{trial_name}\x12\x89\x01\n\x0cGetTrialList\x12\".api.v1.alpha2.GetTrialListRequest\x1a .api.v1.alpha2.GetTrialListReply\"3\x82\xd3\xe4\x93\x02-\x12+/api/Manager/GetTrialList/{experiment_name}\x12t\n\x08GetTrial\x12\x1e.api.v1.alpha2.GetTrialRequest\x1a\x1c.api.v1.alpha2.GetTrialReply\"*\x82\xd3\xe4\x93\x02$\x12\"/api/Manager/GetTrial/{trial_name}\x12\x8e\x01\n\x11UpdateTrialStatus\x12\'.api.v1.alpha2.UpdateTrialStatusRequest\x1a%.api.v1.alpha2.UpdateTrialStatusReply\")\x82\xd3\xe4\x93\x02#\x1a\x1e/api/Manager/UpdateTrialStatus:\x01*\x12\x9a\x01\n\x14ReportObservationLog\x12*.api.v1.alpha2.ReportObservationLogRequest\x1a(.api.v1.alpha2.ReportObservationLogReply\",\x82\xd3\xe4\x93\x02&\"!/api/Manager/ReportObservationLog:\x01*\x12\x8e\x01\n\x11GetObservationLog\x12\'.api.v1.alpha2.GetObservationLogRequest\x1a%.api.v1.alpha2.GetObservationLogReply\")\x82\xd3\xe4\x93\x02#\"\x1e/api/Manager/GetObservationLog:\x01*\x12\x82\x01\n\x0eGetSuggestions\x12$.api.v1.alpha2.GetSuggestionsRequest\x1a\".api.v1.alpha2.GetSuggestionsReply\"&\x82\xd3\xe4\x93\x02 \"\x1b/api/Manager/GetSuggestions:\x01*\x12\xae\x01\n\x19ValidateAlgorithmSettings\x12/.api.v1.alpha2.ValidateAlgorithmSettingsRequest\x1a-.api.v1.alpha2.ValidateAlgorithmSettingsReply\"1\x82\xd3\xe4\x93\x02+\"&/api/Manager/ValidateAlgorithmSettings:\x01*2\xe5\x01\n\nSuggestion\x12Z\n\x0eGetSuggestions\x12$.api.v1.alpha2.GetSuggestionsRequest\x1a\".api.v1.alpha2.GetSuggestionsReply\x12{\n\x19ValidateAlgorithmSettings\x12/.api.v1.alpha2.ValidateAlgorithmSettingsRequest\x1a-.api.v1.alpha2.ValidateAlgorithmSettingsReply2\x0f\n\rEarlyStoppingb\x06proto3') + serialized_pb=_b('\n\tapi.proto\x12\rapi.v1.alpha2\x1a\x1cgoogle/api/annotations.proto\"E\n\rFeasibleSpace\x12\x0b\n\x03max\x18\x01 \x01(\t\x12\x0b\n\x03min\x18\x02 \x01(\t\x12\x0c\n\x04list\x18\x03 \x03(\t\x12\x0c\n\x04step\x18\x04 \x01(\t\"\x89\x01\n\rParameterSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0eparameter_type\x18\x02 \x01(\x0e\x32\x1c.api.v1.alpha2.ParameterType\x12\x34\n\x0e\x66\x65\x61sible_space\x18\x03 \x01(\x0b\x32\x1c.api.v1.alpha2.FeasibleSpace\"\x89\x01\n\rObjectiveSpec\x12*\n\x04type\x18\x01 \x01(\x0e\x32\x1c.api.v1.alpha2.ObjectiveType\x12\x0c\n\x04goal\x18\x02 \x01(\x02\x12\x1d\n\x15objective_metric_name\x18\x03 \x01(\t\x12\x1f\n\x17\x61\x64\x64itional_metric_names\x18\x04 \x03(\t\"/\n\x10\x41lgorithmSetting\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x13\n\x11\x45\x61rlyStoppingSpec\"\xa2\x01\n\rAlgorithmSpec\x12\x16\n\x0e\x61lgorithm_name\x18\x01 \x01(\t\x12:\n\x11\x61lgorithm_setting\x18\x02 \x03(\x0b\x32\x1f.api.v1.alpha2.AlgorithmSetting\x12=\n\x13\x65\x61rly_stopping_spec\x18\x03 \x01(\x0b\x32 .api.v1.alpha2.EarlyStoppingSpec\"\xb1\x01\n\tNasConfig\x12\x30\n\x0cgraph_config\x18\x01 \x01(\x0b\x32\x1a.api.v1.alpha2.GraphConfig\x12\x37\n\noperations\x18\x02 \x01(\x0b\x32#.api.v1.alpha2.NasConfig.Operations\x1a\x39\n\nOperations\x12+\n\toperation\x18\x01 \x03(\x0b\x32\x18.api.v1.alpha2.Operation\"L\n\x0bGraphConfig\x12\x12\n\nnum_layers\x18\x01 \x01(\x05\x12\x13\n\x0binput_sizes\x18\x02 \x03(\x05\x12\x14\n\x0coutput_sizes\x18\x03 \x03(\x05\"\xa9\x01\n\tOperation\x12\x16\n\x0eoperation_type\x18\x01 \x01(\t\x12@\n\x0fparameter_specs\x18\x02 \x01(\x0b\x32\'.api.v1.alpha2.Operation.ParameterSpecs\x1a\x42\n\x0eParameterSpecs\x12\x30\n\nparameters\x18\x01 \x03(\x0b\x32\x1c.api.v1.alpha2.ParameterSpec\"\x9a\x03\n\x0e\x45xperimentSpec\x12\x45\n\x0fparameter_specs\x18\x01 \x01(\x0b\x32,.api.v1.alpha2.ExperimentSpec.ParameterSpecs\x12/\n\tobjective\x18\x02 \x01(\x0b\x32\x1c.api.v1.alpha2.ObjectiveSpec\x12/\n\talgorithm\x18\x03 \x01(\x0b\x32\x1c.api.v1.alpha2.AlgorithmSpec\x12\x16\n\x0etrial_template\x18\x04 \x01(\t\x12\x1e\n\x16metrics_collector_spec\x18\x05 \x01(\t\x12\x1c\n\x14parallel_trial_count\x18\x06 \x01(\x05\x12\x17\n\x0fmax_trial_count\x18\x07 \x01(\x05\x12,\n\nnas_config\x18\x08 \x01(\x0b\x32\x18.api.v1.alpha2.NasConfig\x1a\x42\n\x0eParameterSpecs\x12\x30\n\nparameters\x18\x01 \x03(\x0b\x32\x1c.api.v1.alpha2.ParameterSpec\"\xf8\x01\n\x10\x45xperimentStatus\x12\x12\n\nstart_time\x18\x01 \x01(\t\x12\x17\n\x0f\x63ompletion_time\x18\x02 \x01(\t\x12J\n\tcondition\x18\x03 \x01(\x0e\x32\x37.api.v1.alpha2.ExperimentStatus.ExperimentConditionType\"k\n\x17\x45xperimentConditionType\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nRESTARTING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05\"x\n\nExperiment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x04spec\x18\x02 \x01(\x0b\x32\x1d.api.v1.alpha2.ExperimentSpec\x12/\n\x06status\x18\x03 \x01(\x0b\x32\x1f.api.v1.alpha2.ExperimentStatus\"2\n\x13ParameterAssignment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"%\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"F\n\tMetricLog\x12\x12\n\ntime_stamp\x18\x01 \x01(\t\x12%\n\x06metric\x18\x02 \x01(\x0b\x32\x15.api.v1.alpha2.Metric\"5\n\x0bObservation\x12&\n\x07metrics\x18\x01 \x03(\x0b\x32\x15.api.v1.alpha2.Metric\"?\n\x0eObservationLog\x12-\n\x0bmetric_logs\x18\x01 \x03(\x0b\x32\x18.api.v1.alpha2.MetricLog\"\xa6\x02\n\tTrialSpec\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12/\n\tobjective\x18\x02 \x01(\x0b\x32\x1c.api.v1.alpha2.ObjectiveSpec\x12L\n\x15parameter_assignments\x18\x03 \x01(\x0b\x32-.api.v1.alpha2.TrialSpec.ParameterAssignments\x12\x10\n\x08run_spec\x18\x04 \x01(\t\x12\x1e\n\x16metrics_collector_spec\x18\x05 \x01(\t\x1aO\n\x14ParameterAssignments\x12\x37\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\".api.v1.alpha2.ParameterAssignment\"\x91\x02\n\x0bTrialStatus\x12\x12\n\nstart_time\x18\x01 \x01(\t\x12\x17\n\x0f\x63ompletion_time\x18\x02 \x01(\t\x12@\n\tcondition\x18\x03 \x01(\x0e\x32-.api.v1.alpha2.TrialStatus.TrialConditionType\x12/\n\x0bobservation\x18\x04 \x01(\x0b\x32\x1a.api.v1.alpha2.Observation\"b\n\x12TrialConditionType\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06KILLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05\"i\n\x05Trial\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x04spec\x18\x02 \x01(\x0b\x32\x18.api.v1.alpha2.TrialSpec\x12*\n\x06status\x18\x03 \x01(\x0b\x32\x1a.api.v1.alpha2.TrialStatus\"J\n\x19RegisterExperimentRequest\x12-\n\nexperiment\x18\x01 \x01(\x0b\x32\x19.api.v1.alpha2.Experiment\"\x19\n\x17RegisterExperimentReply\"7\n\x1fPreCheckRegisterExperimentReply\x12\x14\n\x0c\x63\x61n_register\x18\x01 \x01(\x08\"2\n\x17\x44\x65leteExperimentRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\"\x17\n\x15\x44\x65leteExperimentReply\"/\n\x14GetExperimentRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\"C\n\x12GetExperimentReply\x12-\n\nexperiment\x18\x01 \x01(\x0b\x32\x19.api.v1.alpha2.Experiment\"]\n\x11\x45xperimentSummary\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12/\n\x06status\x18\x02 \x01(\x0b\x32\x1f.api.v1.alpha2.ExperimentStatus\"\x1a\n\x18GetExperimentListRequest\"X\n\x16GetExperimentListReply\x12>\n\x14\x65xperiment_summaries\x18\x01 \x03(\x0b\x32 .api.v1.alpha2.ExperimentSummary\"m\n\x1dUpdateExperimentStatusRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12\x33\n\nnew_status\x18\x02 \x01(\x0b\x32\x1f.api.v1.alpha2.ExperimentStatus\"\x1d\n\x1bUpdateExperimentStatusReply\"\x81\x01\n#UpdateAlgorithmExtraSettingsRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12\x41\n\x18\x65xtra_algorithm_settings\x18\x02 \x03(\x0b\x32\x1f.api.v1.alpha2.AlgorithmSetting\"#\n!UpdateAlgorithmExtraSettingsReply\";\n GetAlgorithmExtraSettingsRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\"c\n\x1eGetAlgorithmExtraSettingsReply\x12\x41\n\x18\x65xtra_algorithm_settings\x18\x01 \x03(\x0b\x32\x1f.api.v1.alpha2.AlgorithmSetting\";\n\x14RegisterTrialRequest\x12#\n\x05trial\x18\x01 \x01(\x0b\x32\x14.api.v1.alpha2.Trial\"\x14\n\x12RegisterTrialReply\"(\n\x12\x44\x65leteTrialRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\"\x12\n\x10\x44\x65leteTrialReply\">\n\x13GetTrialListRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"9\n\x11GetTrialListReply\x12$\n\x06trials\x18\x01 \x03(\x0b\x32\x14.api.v1.alpha2.Trial\"%\n\x0fGetTrialRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\"4\n\rGetTrialReply\x12#\n\x05trial\x18\x01 \x01(\x0b\x32\x14.api.v1.alpha2.Trial\"^\n\x18UpdateTrialStatusRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\x12.\n\nnew_status\x18\x02 \x01(\x0b\x32\x1a.api.v1.alpha2.TrialStatus\"\x18\n\x16UpdateTrialStatusReply\"i\n\x1bReportObservationLogRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\x12\x36\n\x0fobservation_log\x18\x02 \x01(\x0b\x32\x1d.api.v1.alpha2.ObservationLog\"\x1b\n\x19ReportObservationLogReply\"i\n\x18GetObservationLogRequest\x12\x12\n\ntrial_name\x18\x01 \x01(\t\x12\x13\n\x0bmetric_name\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\t\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\t\"P\n\x16GetObservationLogReply\x12\x36\n\x0fobservation_log\x18\x01 \x01(\x0b\x32\x1d.api.v1.alpha2.ObservationLog\"`\n\x15GetSuggestionsRequest\x12\x17\n\x0f\x65xperiment_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61lgorithm_name\x18\x02 \x01(\t\x12\x16\n\x0erequest_number\x18\x03 \x01(\x05\";\n\x13GetSuggestionsReply\x12$\n\x06trials\x18\x01 \x03(\x0b\x32\x14.api.v1.alpha2.Trial\"r\n ValidateAlgorithmSettingsRequest\x12\x36\n\x0f\x65xperiment_spec\x18\x01 \x01(\x0b\x32\x1d.api.v1.alpha2.ExperimentSpec\x12\x16\n\x0e\x61lgorithm_name\x18\x02 \x01(\t\" \n\x1eValidateAlgorithmSettingsReply*U\n\rParameterType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\n\n\x06\x44OUBLE\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x0c\n\x08\x44ISCRETE\x10\x03\x12\x0f\n\x0b\x43\x41TEGORICAL\x10\x04*8\n\rObjectiveType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08MINIMIZE\x10\x01\x12\x0c\n\x08MAXIMIZE\x10\x02\x32\xdc\x14\n\x07Manager\x12\x9b\x01\n\x12RegisterExperiment\x12(.api.v1.alpha2.RegisterExperimentRequest\x1a&.api.v1.alpha2.RegisterExperimentReply\"3\x82\xd3\xe4\x93\x02-\"\x1f/api/Manager/RegisterExperiment:\nexperiment\x12\xb3\x01\n\x1aPreCheckRegisterExperiment\x12(.api.v1.alpha2.RegisterExperimentRequest\x1a..api.v1.alpha2.PreCheckRegisterExperimentReply\";\x82\xd3\xe4\x93\x02\x35\"\'/api/Manager/PreCheckRegisterExperiment:\nexperiment\x12\x99\x01\n\x10\x44\x65leteExperiment\x12&.api.v1.alpha2.DeleteExperimentRequest\x1a$.api.v1.alpha2.DeleteExperimentReply\"7\x82\xd3\xe4\x93\x02\x31\x12//api/Manager/DeleteExperiment/{experiment_name}\x12\x8d\x01\n\rGetExperiment\x12#.api.v1.alpha2.GetExperimentRequest\x1a!.api.v1.alpha2.GetExperimentReply\"4\x82\xd3\xe4\x93\x02.\x12,/api/Manager/GetExperiment/{experiment_name}\x12\x8b\x01\n\x11GetExperimentList\x12\'.api.v1.alpha2.GetExperimentListRequest\x1a%.api.v1.alpha2.GetExperimentListReply\"&\x82\xd3\xe4\x93\x02 \x12\x1e/api/Manager/GetExperimentList\x12\xb4\x01\n\x16UpdateExperimentStatus\x12,.api.v1.alpha2.UpdateExperimentStatusRequest\x1a*.api.v1.alpha2.UpdateExperimentStatusReply\"@\x82\xd3\xe4\x93\x02:\x1a\x35/api/Manager/UpdateExperimentStatus/{experiment_name}:\x01*\x12\xcc\x01\n\x1cUpdateAlgorithmExtraSettings\x12\x32.api.v1.alpha2.UpdateAlgorithmExtraSettingsRequest\x1a\x30.api.v1.alpha2.UpdateAlgorithmExtraSettingsReply\"F\x82\xd3\xe4\x93\x02@\x1a;/api/Manager/UpdateAlgorithmExtraSettings/{experiment_name}:\x01*\x12\xbd\x01\n\x19GetAlgorithmExtraSettings\x12/.api.v1.alpha2.GetAlgorithmExtraSettingsRequest\x1a-.api.v1.alpha2.GetAlgorithmExtraSettingsReply\"@\x82\xd3\xe4\x93\x02:\x12\x38/api/Manager/GetAlgorithmExtraSettings/{experiment_name}\x12\x82\x01\n\rRegisterTrial\x12#.api.v1.alpha2.RegisterTrialRequest\x1a!.api.v1.alpha2.RegisterTrialReply\")\x82\xd3\xe4\x93\x02#\"\x1a/api/Manager/RegisterTrial:\x05trial\x12\x80\x01\n\x0b\x44\x65leteTrial\x12!.api.v1.alpha2.DeleteTrialRequest\x1a\x1f.api.v1.alpha2.DeleteTrialReply\"-\x82\xd3\xe4\x93\x02\'\x12%/api/Manager/DeleteTrial/{trial_name}\x12\x89\x01\n\x0cGetTrialList\x12\".api.v1.alpha2.GetTrialListRequest\x1a .api.v1.alpha2.GetTrialListReply\"3\x82\xd3\xe4\x93\x02-\x12+/api/Manager/GetTrialList/{experiment_name}\x12t\n\x08GetTrial\x12\x1e.api.v1.alpha2.GetTrialRequest\x1a\x1c.api.v1.alpha2.GetTrialReply\"*\x82\xd3\xe4\x93\x02$\x12\"/api/Manager/GetTrial/{trial_name}\x12\x8e\x01\n\x11UpdateTrialStatus\x12\'.api.v1.alpha2.UpdateTrialStatusRequest\x1a%.api.v1.alpha2.UpdateTrialStatusReply\")\x82\xd3\xe4\x93\x02#\x1a\x1e/api/Manager/UpdateTrialStatus:\x01*\x12\x9a\x01\n\x14ReportObservationLog\x12*.api.v1.alpha2.ReportObservationLogRequest\x1a(.api.v1.alpha2.ReportObservationLogReply\",\x82\xd3\xe4\x93\x02&\"!/api/Manager/ReportObservationLog:\x01*\x12\x8e\x01\n\x11GetObservationLog\x12\'.api.v1.alpha2.GetObservationLogRequest\x1a%.api.v1.alpha2.GetObservationLogReply\")\x82\xd3\xe4\x93\x02#\"\x1e/api/Manager/GetObservationLog:\x01*\x12\x82\x01\n\x0eGetSuggestions\x12$.api.v1.alpha2.GetSuggestionsRequest\x1a\".api.v1.alpha2.GetSuggestionsReply\"&\x82\xd3\xe4\x93\x02 \"\x1b/api/Manager/GetSuggestions:\x01*\x12\xae\x01\n\x19ValidateAlgorithmSettings\x12/.api.v1.alpha2.ValidateAlgorithmSettingsRequest\x1a-.api.v1.alpha2.ValidateAlgorithmSettingsReply\"1\x82\xd3\xe4\x93\x02+\"&/api/Manager/ValidateAlgorithmSettings:\x01*2\xe5\x01\n\nSuggestion\x12Z\n\x0eGetSuggestions\x12$.api.v1.alpha2.GetSuggestionsRequest\x1a\".api.v1.alpha2.GetSuggestionsReply\x12{\n\x19ValidateAlgorithmSettings\x12/.api.v1.alpha2.ValidateAlgorithmSettingsRequest\x1a-.api.v1.alpha2.ValidateAlgorithmSettingsReply2\x0f\n\rEarlyStoppingb\x06proto3') , dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) @@ -54,8 +54,8 @@ ], containing_type=None, options=None, - serialized_start=4924, - serialized_end=5009, + serialized_start=4981, + serialized_end=5066, ) _sym_db.RegisterEnumDescriptor(_PARAMETERTYPE) @@ -81,8 +81,8 @@ ], containing_type=None, options=None, - serialized_start=5011, - serialized_end=5067, + serialized_start=5068, + serialized_end=5124, ) _sym_db.RegisterEnumDescriptor(_OBJECTIVETYPE) @@ -1230,6 +1230,37 @@ ) +_PRECHECKREGISTEREXPERIMENTREPLY = _descriptor.Descriptor( + name='PreCheckRegisterExperimentReply', + full_name='api.v1.alpha2.PreCheckRegisterExperimentReply', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='can_register', full_name='api.v1.alpha2.PreCheckRegisterExperimentReply.can_register', index=0, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2926, + serialized_end=2981, +) + + _DELETEEXPERIMENTREQUEST = _descriptor.Descriptor( name='DeleteExperimentRequest', full_name='api.v1.alpha2.DeleteExperimentRequest', @@ -1256,8 +1287,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2926, - serialized_end=2976, + serialized_start=2983, + serialized_end=3033, ) @@ -1280,8 +1311,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2978, - serialized_end=3001, + serialized_start=3035, + serialized_end=3058, ) @@ -1311,8 +1342,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3003, - serialized_end=3050, + serialized_start=3060, + serialized_end=3107, ) @@ -1342,8 +1373,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3052, - serialized_end=3119, + serialized_start=3109, + serialized_end=3176, ) @@ -1380,8 +1411,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3121, - serialized_end=3214, + serialized_start=3178, + serialized_end=3271, ) @@ -1404,8 +1435,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3216, - serialized_end=3242, + serialized_start=3273, + serialized_end=3299, ) @@ -1435,8 +1466,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3244, - serialized_end=3332, + serialized_start=3301, + serialized_end=3389, ) @@ -1473,8 +1504,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3334, - serialized_end=3443, + serialized_start=3391, + serialized_end=3500, ) @@ -1497,8 +1528,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3445, - serialized_end=3474, + serialized_start=3502, + serialized_end=3531, ) @@ -1535,8 +1566,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3477, - serialized_end=3606, + serialized_start=3534, + serialized_end=3663, ) @@ -1559,8 +1590,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3608, - serialized_end=3643, + serialized_start=3665, + serialized_end=3700, ) @@ -1590,8 +1621,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3645, - serialized_end=3704, + serialized_start=3702, + serialized_end=3761, ) @@ -1621,8 +1652,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3706, - serialized_end=3805, + serialized_start=3763, + serialized_end=3862, ) @@ -1652,8 +1683,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3807, - serialized_end=3866, + serialized_start=3864, + serialized_end=3923, ) @@ -1676,8 +1707,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3868, - serialized_end=3888, + serialized_start=3925, + serialized_end=3945, ) @@ -1707,8 +1738,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3890, - serialized_end=3930, + serialized_start=3947, + serialized_end=3987, ) @@ -1731,8 +1762,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3932, - serialized_end=3950, + serialized_start=3989, + serialized_end=4007, ) @@ -1769,8 +1800,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3952, - serialized_end=4014, + serialized_start=4009, + serialized_end=4071, ) @@ -1800,8 +1831,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4016, - serialized_end=4073, + serialized_start=4073, + serialized_end=4130, ) @@ -1831,8 +1862,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4075, - serialized_end=4112, + serialized_start=4132, + serialized_end=4169, ) @@ -1862,8 +1893,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4114, - serialized_end=4166, + serialized_start=4171, + serialized_end=4223, ) @@ -1900,8 +1931,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4168, - serialized_end=4262, + serialized_start=4225, + serialized_end=4319, ) @@ -1924,8 +1955,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4264, - serialized_end=4288, + serialized_start=4321, + serialized_end=4345, ) @@ -1962,8 +1993,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4290, - serialized_end=4395, + serialized_start=4347, + serialized_end=4452, ) @@ -1986,8 +2017,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4397, - serialized_end=4424, + serialized_start=4454, + serialized_end=4481, ) @@ -2038,8 +2069,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4426, - serialized_end=4531, + serialized_start=4483, + serialized_end=4588, ) @@ -2069,8 +2100,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4533, - serialized_end=4613, + serialized_start=4590, + serialized_end=4670, ) @@ -2114,8 +2145,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4615, - serialized_end=4711, + serialized_start=4672, + serialized_end=4768, ) @@ -2145,8 +2176,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4713, - serialized_end=4772, + serialized_start=4770, + serialized_end=4829, ) @@ -2183,8 +2214,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4774, - serialized_end=4888, + serialized_start=4831, + serialized_end=4945, ) @@ -2207,8 +2238,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4890, - serialized_end=4922, + serialized_start=4947, + serialized_end=4979, ) _PARAMETERSPEC.fields_by_name['parameter_type'].enum_type = _PARAMETERTYPE @@ -2282,6 +2313,7 @@ DESCRIPTOR.message_types_by_name['Trial'] = _TRIAL DESCRIPTOR.message_types_by_name['RegisterExperimentRequest'] = _REGISTEREXPERIMENTREQUEST DESCRIPTOR.message_types_by_name['RegisterExperimentReply'] = _REGISTEREXPERIMENTREPLY +DESCRIPTOR.message_types_by_name['PreCheckRegisterExperimentReply'] = _PRECHECKREGISTEREXPERIMENTREPLY DESCRIPTOR.message_types_by_name['DeleteExperimentRequest'] = _DELETEEXPERIMENTREQUEST DESCRIPTOR.message_types_by_name['DeleteExperimentReply'] = _DELETEEXPERIMENTREPLY DESCRIPTOR.message_types_by_name['GetExperimentRequest'] = _GETEXPERIMENTREQUEST @@ -2503,6 +2535,13 @@ )) _sym_db.RegisterMessage(RegisterExperimentReply) +PreCheckRegisterExperimentReply = _reflection.GeneratedProtocolMessageType('PreCheckRegisterExperimentReply', (_message.Message,), dict( + DESCRIPTOR = _PRECHECKREGISTEREXPERIMENTREPLY, + __module__ = 'api_pb2' + # @@protoc_insertion_point(class_scope:api.v1.alpha2.PreCheckRegisterExperimentReply) + )) +_sym_db.RegisterMessage(PreCheckRegisterExperimentReply) + DeleteExperimentRequest = _reflection.GeneratedProtocolMessageType('DeleteExperimentRequest', (_message.Message,), dict( DESCRIPTOR = _DELETEEXPERIMENTREQUEST, __module__ = 'api_pb2' @@ -2728,8 +2767,8 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=5070, - serialized_end=7540, + serialized_start=5127, + serialized_end=7779, methods=[ _descriptor.MethodDescriptor( name='RegisterExperiment', @@ -2740,10 +2779,19 @@ output_type=_REGISTEREXPERIMENTREPLY, options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002-\"\037/api/Manager/RegisterExperiment:\nexperiment')), ), + _descriptor.MethodDescriptor( + name='PreCheckRegisterExperiment', + full_name='api.v1.alpha2.Manager.PreCheckRegisterExperiment', + index=1, + containing_service=None, + input_type=_REGISTEREXPERIMENTREQUEST, + output_type=_PRECHECKREGISTEREXPERIMENTREPLY, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\0025\"\'/api/Manager/PreCheckRegisterExperiment:\nexperiment')), + ), _descriptor.MethodDescriptor( name='DeleteExperiment', full_name='api.v1.alpha2.Manager.DeleteExperiment', - index=1, + index=2, containing_service=None, input_type=_DELETEEXPERIMENTREQUEST, output_type=_DELETEEXPERIMENTREPLY, @@ -2752,7 +2800,7 @@ _descriptor.MethodDescriptor( name='GetExperiment', full_name='api.v1.alpha2.Manager.GetExperiment', - index=2, + index=3, containing_service=None, input_type=_GETEXPERIMENTREQUEST, output_type=_GETEXPERIMENTREPLY, @@ -2761,7 +2809,7 @@ _descriptor.MethodDescriptor( name='GetExperimentList', full_name='api.v1.alpha2.Manager.GetExperimentList', - index=3, + index=4, containing_service=None, input_type=_GETEXPERIMENTLISTREQUEST, output_type=_GETEXPERIMENTLISTREPLY, @@ -2770,7 +2818,7 @@ _descriptor.MethodDescriptor( name='UpdateExperimentStatus', full_name='api.v1.alpha2.Manager.UpdateExperimentStatus', - index=4, + index=5, containing_service=None, input_type=_UPDATEEXPERIMENTSTATUSREQUEST, output_type=_UPDATEEXPERIMENTSTATUSREPLY, @@ -2779,7 +2827,7 @@ _descriptor.MethodDescriptor( name='UpdateAlgorithmExtraSettings', full_name='api.v1.alpha2.Manager.UpdateAlgorithmExtraSettings', - index=5, + index=6, containing_service=None, input_type=_UPDATEALGORITHMEXTRASETTINGSREQUEST, output_type=_UPDATEALGORITHMEXTRASETTINGSREPLY, @@ -2788,7 +2836,7 @@ _descriptor.MethodDescriptor( name='GetAlgorithmExtraSettings', full_name='api.v1.alpha2.Manager.GetAlgorithmExtraSettings', - index=6, + index=7, containing_service=None, input_type=_GETALGORITHMEXTRASETTINGSREQUEST, output_type=_GETALGORITHMEXTRASETTINGSREPLY, @@ -2797,7 +2845,7 @@ _descriptor.MethodDescriptor( name='RegisterTrial', full_name='api.v1.alpha2.Manager.RegisterTrial', - index=7, + index=8, containing_service=None, input_type=_REGISTERTRIALREQUEST, output_type=_REGISTERTRIALREPLY, @@ -2806,7 +2854,7 @@ _descriptor.MethodDescriptor( name='DeleteTrial', full_name='api.v1.alpha2.Manager.DeleteTrial', - index=8, + index=9, containing_service=None, input_type=_DELETETRIALREQUEST, output_type=_DELETETRIALREPLY, @@ -2815,7 +2863,7 @@ _descriptor.MethodDescriptor( name='GetTrialList', full_name='api.v1.alpha2.Manager.GetTrialList', - index=9, + index=10, containing_service=None, input_type=_GETTRIALLISTREQUEST, output_type=_GETTRIALLISTREPLY, @@ -2824,7 +2872,7 @@ _descriptor.MethodDescriptor( name='GetTrial', full_name='api.v1.alpha2.Manager.GetTrial', - index=10, + index=11, containing_service=None, input_type=_GETTRIALREQUEST, output_type=_GETTRIALREPLY, @@ -2833,7 +2881,7 @@ _descriptor.MethodDescriptor( name='UpdateTrialStatus', full_name='api.v1.alpha2.Manager.UpdateTrialStatus', - index=11, + index=12, containing_service=None, input_type=_UPDATETRIALSTATUSREQUEST, output_type=_UPDATETRIALSTATUSREPLY, @@ -2842,7 +2890,7 @@ _descriptor.MethodDescriptor( name='ReportObservationLog', full_name='api.v1.alpha2.Manager.ReportObservationLog', - index=12, + index=13, containing_service=None, input_type=_REPORTOBSERVATIONLOGREQUEST, output_type=_REPORTOBSERVATIONLOGREPLY, @@ -2851,7 +2899,7 @@ _descriptor.MethodDescriptor( name='GetObservationLog', full_name='api.v1.alpha2.Manager.GetObservationLog', - index=13, + index=14, containing_service=None, input_type=_GETOBSERVATIONLOGREQUEST, output_type=_GETOBSERVATIONLOGREPLY, @@ -2860,7 +2908,7 @@ _descriptor.MethodDescriptor( name='GetSuggestions', full_name='api.v1.alpha2.Manager.GetSuggestions', - index=14, + index=15, containing_service=None, input_type=_GETSUGGESTIONSREQUEST, output_type=_GETSUGGESTIONSREPLY, @@ -2869,7 +2917,7 @@ _descriptor.MethodDescriptor( name='ValidateAlgorithmSettings', full_name='api.v1.alpha2.Manager.ValidateAlgorithmSettings', - index=15, + index=16, containing_service=None, input_type=_VALIDATEALGORITHMSETTINGSREQUEST, output_type=_VALIDATEALGORITHMSETTINGSREPLY, @@ -2887,8 +2935,8 @@ file=DESCRIPTOR, index=1, options=None, - serialized_start=7543, - serialized_end=7772, + serialized_start=7782, + serialized_end=8011, methods=[ _descriptor.MethodDescriptor( name='GetSuggestions', @@ -2920,8 +2968,8 @@ file=DESCRIPTOR, index=2, options=None, - serialized_start=7774, - serialized_end=7789, + serialized_start=8013, + serialized_end=8028, methods=[ ]) _sym_db.RegisterServiceDescriptor(_EARLYSTOPPING) @@ -2957,6 +3005,11 @@ def __init__(self, channel): request_serializer=RegisterExperimentRequest.SerializeToString, response_deserializer=RegisterExperimentReply.FromString, ) + self.PreCheckRegisterExperiment = channel.unary_unary( + '/api.v1.alpha2.Manager/PreCheckRegisterExperiment', + request_serializer=RegisterExperimentRequest.SerializeToString, + response_deserializer=PreCheckRegisterExperimentReply.FromString, + ) self.DeleteExperiment = channel.unary_unary( '/api.v1.alpha2.Manager/DeleteExperiment', request_serializer=DeleteExperimentRequest.SerializeToString, @@ -3050,6 +3103,14 @@ def RegisterExperiment(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def PreCheckRegisterExperiment(self, request, context): + """* + PreCheck to register a Experiment to DB. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def DeleteExperiment(self, request, context): """* Delete a Experiment from DB by name. @@ -3185,6 +3246,11 @@ def add_ManagerServicer_to_server(servicer, server): request_deserializer=RegisterExperimentRequest.FromString, response_serializer=RegisterExperimentReply.SerializeToString, ), + 'PreCheckRegisterExperiment': grpc.unary_unary_rpc_method_handler( + servicer.PreCheckRegisterExperiment, + request_deserializer=RegisterExperimentRequest.FromString, + response_serializer=PreCheckRegisterExperimentReply.SerializeToString, + ), 'DeleteExperiment': grpc.unary_unary_rpc_method_handler( servicer.DeleteExperiment, request_deserializer=DeleteExperimentRequest.FromString, @@ -3367,6 +3433,11 @@ def RegisterExperiment(self, request, context): Register a Experiment to DB. """ context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def PreCheckRegisterExperiment(self, request, context): + """* + PreCheck to register a Experiment to DB. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) def DeleteExperiment(self, request, context): """* Delete a Experiment from DB by name. @@ -3469,6 +3540,12 @@ def RegisterExperiment(self, request, timeout, metadata=None, with_call=False, p """ raise NotImplementedError() RegisterExperiment.future = None + def PreCheckRegisterExperiment(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """* + PreCheck to register a Experiment to DB. + """ + raise NotImplementedError() + PreCheckRegisterExperiment.future = None def DeleteExperiment(self, request, timeout, metadata=None, with_call=False, protocol_options=None): """* Delete a Experiment from DB by name. @@ -3584,6 +3661,7 @@ def beta_create_Manager_server(servicer, pool=None, pool_size=None, default_time ('api.v1.alpha2.Manager', 'GetSuggestions'): GetSuggestionsRequest.FromString, ('api.v1.alpha2.Manager', 'GetTrial'): GetTrialRequest.FromString, ('api.v1.alpha2.Manager', 'GetTrialList'): GetTrialListRequest.FromString, + ('api.v1.alpha2.Manager', 'PreCheckRegisterExperiment'): RegisterExperimentRequest.FromString, ('api.v1.alpha2.Manager', 'RegisterExperiment'): RegisterExperimentRequest.FromString, ('api.v1.alpha2.Manager', 'RegisterTrial'): RegisterTrialRequest.FromString, ('api.v1.alpha2.Manager', 'ReportObservationLog'): ReportObservationLogRequest.FromString, @@ -3602,6 +3680,7 @@ def beta_create_Manager_server(servicer, pool=None, pool_size=None, default_time ('api.v1.alpha2.Manager', 'GetSuggestions'): GetSuggestionsReply.SerializeToString, ('api.v1.alpha2.Manager', 'GetTrial'): GetTrialReply.SerializeToString, ('api.v1.alpha2.Manager', 'GetTrialList'): GetTrialListReply.SerializeToString, + ('api.v1.alpha2.Manager', 'PreCheckRegisterExperiment'): PreCheckRegisterExperimentReply.SerializeToString, ('api.v1.alpha2.Manager', 'RegisterExperiment'): RegisterExperimentReply.SerializeToString, ('api.v1.alpha2.Manager', 'RegisterTrial'): RegisterTrialReply.SerializeToString, ('api.v1.alpha2.Manager', 'ReportObservationLog'): ReportObservationLogReply.SerializeToString, @@ -3620,6 +3699,7 @@ def beta_create_Manager_server(servicer, pool=None, pool_size=None, default_time ('api.v1.alpha2.Manager', 'GetSuggestions'): face_utilities.unary_unary_inline(servicer.GetSuggestions), ('api.v1.alpha2.Manager', 'GetTrial'): face_utilities.unary_unary_inline(servicer.GetTrial), ('api.v1.alpha2.Manager', 'GetTrialList'): face_utilities.unary_unary_inline(servicer.GetTrialList), + ('api.v1.alpha2.Manager', 'PreCheckRegisterExperiment'): face_utilities.unary_unary_inline(servicer.PreCheckRegisterExperiment), ('api.v1.alpha2.Manager', 'RegisterExperiment'): face_utilities.unary_unary_inline(servicer.RegisterExperiment), ('api.v1.alpha2.Manager', 'RegisterTrial'): face_utilities.unary_unary_inline(servicer.RegisterTrial), ('api.v1.alpha2.Manager', 'ReportObservationLog'): face_utilities.unary_unary_inline(servicer.ReportObservationLog), @@ -3648,6 +3728,7 @@ def beta_create_Manager_stub(channel, host=None, metadata_transformer=None, pool ('api.v1.alpha2.Manager', 'GetSuggestions'): GetSuggestionsRequest.SerializeToString, ('api.v1.alpha2.Manager', 'GetTrial'): GetTrialRequest.SerializeToString, ('api.v1.alpha2.Manager', 'GetTrialList'): GetTrialListRequest.SerializeToString, + ('api.v1.alpha2.Manager', 'PreCheckRegisterExperiment'): RegisterExperimentRequest.SerializeToString, ('api.v1.alpha2.Manager', 'RegisterExperiment'): RegisterExperimentRequest.SerializeToString, ('api.v1.alpha2.Manager', 'RegisterTrial'): RegisterTrialRequest.SerializeToString, ('api.v1.alpha2.Manager', 'ReportObservationLog'): ReportObservationLogRequest.SerializeToString, @@ -3666,6 +3747,7 @@ def beta_create_Manager_stub(channel, host=None, metadata_transformer=None, pool ('api.v1.alpha2.Manager', 'GetSuggestions'): GetSuggestionsReply.FromString, ('api.v1.alpha2.Manager', 'GetTrial'): GetTrialReply.FromString, ('api.v1.alpha2.Manager', 'GetTrialList'): GetTrialListReply.FromString, + ('api.v1.alpha2.Manager', 'PreCheckRegisterExperiment'): PreCheckRegisterExperimentReply.FromString, ('api.v1.alpha2.Manager', 'RegisterExperiment'): RegisterExperimentReply.FromString, ('api.v1.alpha2.Manager', 'RegisterTrial'): RegisterTrialReply.FromString, ('api.v1.alpha2.Manager', 'ReportObservationLog'): ReportObservationLogReply.FromString, @@ -3684,6 +3766,7 @@ def beta_create_Manager_stub(channel, host=None, metadata_transformer=None, pool 'GetSuggestions': cardinality.Cardinality.UNARY_UNARY, 'GetTrial': cardinality.Cardinality.UNARY_UNARY, 'GetTrialList': cardinality.Cardinality.UNARY_UNARY, + 'PreCheckRegisterExperiment': cardinality.Cardinality.UNARY_UNARY, 'RegisterExperiment': cardinality.Cardinality.UNARY_UNARY, 'RegisterTrial': cardinality.Cardinality.UNARY_UNARY, 'ReportObservationLog': cardinality.Cardinality.UNARY_UNARY, diff --git a/pkg/api/v1alpha2/python/api_pb2_grpc.py b/pkg/api/v1alpha2/python/api_pb2_grpc.py index 7129574b3c9..ea61b19b29a 100644 --- a/pkg/api/v1alpha2/python/api_pb2_grpc.py +++ b/pkg/api/v1alpha2/python/api_pb2_grpc.py @@ -23,6 +23,11 @@ def __init__(self, channel): request_serializer=api__pb2.RegisterExperimentRequest.SerializeToString, response_deserializer=api__pb2.RegisterExperimentReply.FromString, ) + self.PreCheckRegisterExperiment = channel.unary_unary( + '/api.v1.alpha2.Manager/PreCheckRegisterExperiment', + request_serializer=api__pb2.RegisterExperimentRequest.SerializeToString, + response_deserializer=api__pb2.PreCheckRegisterExperimentReply.FromString, + ) self.DeleteExperiment = channel.unary_unary( '/api.v1.alpha2.Manager/DeleteExperiment', request_serializer=api__pb2.DeleteExperimentRequest.SerializeToString, @@ -116,6 +121,14 @@ def RegisterExperiment(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def PreCheckRegisterExperiment(self, request, context): + """* + PreCheck to register a Experiment to DB. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def DeleteExperiment(self, request, context): """* Delete a Experiment from DB by name. @@ -251,6 +264,11 @@ def add_ManagerServicer_to_server(servicer, server): request_deserializer=api__pb2.RegisterExperimentRequest.FromString, response_serializer=api__pb2.RegisterExperimentReply.SerializeToString, ), + 'PreCheckRegisterExperiment': grpc.unary_unary_rpc_method_handler( + servicer.PreCheckRegisterExperiment, + request_deserializer=api__pb2.RegisterExperimentRequest.FromString, + response_serializer=api__pb2.PreCheckRegisterExperimentReply.SerializeToString, + ), 'DeleteExperiment': grpc.unary_unary_rpc_method_handler( servicer.DeleteExperiment, request_deserializer=api__pb2.DeleteExperimentRequest.FromString, diff --git a/pkg/common/v1alpha2/katib_manager_util.go b/pkg/common/v1alpha2/katib_manager_util.go index c4a49f52566..107a73f570e 100644 --- a/pkg/common/v1alpha2/katib_manager_util.go +++ b/pkg/common/v1alpha2/katib_manager_util.go @@ -136,15 +136,15 @@ func GetSuggestions(request *api_pb.GetSuggestionsRequest) (*api_pb.GetSuggestio return kc.GetSuggestions(ctx, request) } -func GetExperiment(request *api_pb.GetExperimentRequest) (*api_pb.GetExperimentReply, error) { +func PreCheckRegisterExperiment(request *api_pb.RegisterExperimentRequest) (*api_pb.PreCheckRegisterExperimentReply, error) { ctx := context.Background() - kcc, err := getKatibManagerClientAndConn() - if err != nil { - return nil, err - } - defer closeKatibManagerConnection(kcc) - kc := kcc.KatibManagerClient - return kc.GetExperiment(ctx, request) + kcc, err := getKatibManagerClientAndConn() + if err != nil { + return nil, err + } + defer closeKatibManagerConnection(kcc) + kc := kcc.KatibManagerClient + return kc.PreCheckRegisterExperiment(ctx, request) } func GetObservationLog(request *api_pb.GetObservationLogRequest) (*api_pb.GetObservationLogReply, error) { diff --git a/pkg/controller/v1alpha2/experiment/managerclient/managerclient.go b/pkg/controller/v1alpha2/experiment/managerclient/managerclient.go index df8b57b1ca3..801f03f2911 100644 --- a/pkg/controller/v1alpha2/experiment/managerclient/managerclient.go +++ b/pkg/controller/v1alpha2/experiment/managerclient/managerclient.go @@ -13,8 +13,7 @@ type ManagerClient interface { CreateExperimentInDB(instance *experimentsv1alpha2.Experiment) error DeleteExperimentInDB(instance *experimentsv1alpha2.Experiment) error UpdateExperimentStatusInDB(instance *experimentsv1alpha2.Experiment) error - GetExperimentFromDB(instance *experimentsv1alpha2.Experiment) ( - *api_pb.GetExperimentReply, error) + PreCheckRegisterExperimentInDB(inst *experimentsv1alpha2.Experiment) (*api_pb.PreCheckRegisterExperimentReply, error) } // DefaultClient implements the Client interface. @@ -63,15 +62,12 @@ func (d *DefaultClient) UpdateExperimentStatusInDB(instance *experimentsv1alpha2 return nil } -func (d *DefaultClient) GetExperimentFromDB(instance *experimentsv1alpha2.Experiment) (*api_pb.GetExperimentReply, error) { - request := &api_pb.GetExperimentRequest{ - ExperimentName: instance.Name, - } - if exp, err := commonv1alpha2.GetExperiment(request); err != nil { - return nil, err - } else { - return exp, nil +func (d *DefaultClient) PreCheckRegisterExperimentInDB(inst *experimentsv1alpha2.Experiment) (*api_pb.PreCheckRegisterExperimentReply, error) { + experiment := getExperimentConf(inst) + request := &api_pb.RegisterExperimentRequest{ + Experiment: experiment, } + return commonv1alpha2.PreCheckRegisterExperiment(request) } func getExperimentConf(instance *experimentsv1alpha2.Experiment) *api_pb.Experiment { diff --git a/pkg/controller/v1alpha2/experiment/validator/validator.go b/pkg/controller/v1alpha2/experiment/validator/validator.go index 14f042df00a..d0b4d8bbde9 100644 --- a/pkg/controller/v1alpha2/experiment/validator/validator.go +++ b/pkg/controller/v1alpha2/experiment/validator/validator.go @@ -2,9 +2,7 @@ package validator import ( "bytes" - "database/sql" "fmt" - "strings" batchv1beta "k8s.io/api/batch/v1beta1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -147,18 +145,13 @@ func (g *DefaultValidator) validateSupportedJob(job *unstructured.Unstructured) } func (g *DefaultValidator) validateForCreate(inst *experimentsv1alpha2.Experiment) error { - isErrNoRows := func (e error) bool { - errorStr := fmt.Sprintf("%v", e) - noRows := fmt.Sprintf("%v", sql.ErrNoRows) - return strings.Index(errorStr, noRows) != -1 - } - if _, err := g.GetExperimentFromDB(inst); err != nil { - if !isErrNoRows(err) { - return fmt.Errorf("Fail to check record for the experiment in DB: %v", err) - } - return nil - } else { + reply, err := g.PreCheckRegisterExperimentInDB(inst) + if err != nil { + return fmt.Errorf("Fail to check record for the experiment in DB: %v", err) + } else if !reply.CanRegister { return fmt.Errorf("Record for the experiment has existed in DB; Please try to rename the experiment") + } else { + return nil } } diff --git a/pkg/controller/v1alpha2/experiment/validator/validator_test.go b/pkg/controller/v1alpha2/experiment/validator/validator_test.go index dec12cd32fb..8dfad5f514a 100644 --- a/pkg/controller/v1alpha2/experiment/validator/validator_test.go +++ b/pkg/controller/v1alpha2/experiment/validator/validator_test.go @@ -42,7 +42,10 @@ spec: g := New(p, mc) p.EXPECT().GetRunSpec(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(trialTFJobTemplate, nil) - mc.EXPECT().GetExperimentFromDB(gomock.Any()).Return(nil, sql.ErrNoRows).AnyTimes() + mc.EXPECT().PreCheckRegisterExperimentInDB(gomock.Any()).Return( + &api_pb.PreCheckRegisterExperimentReply{ + CanRegister: true, + }, nil).AnyTimes() instance := newFakeInstance() if err := g.(*DefaultValidator).validateTrialTemplate(instance); err == nil { @@ -67,7 +70,10 @@ metadata: g := New(p, mc) p.EXPECT().GetRunSpec(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(trialJobTemplate, nil) - mc.EXPECT().GetExperimentFromDB(gomock.Any()).Return(nil, sql.ErrNoRows).AnyTimes() + mc.EXPECT().PreCheckRegisterExperimentInDB(gomock.Any()).Return( + &api_pb.PreCheckRegisterExperimentReply{ + CanRegister: true, + }, nil).AnyTimes() instance := newFakeInstance() if err := g.(*DefaultValidator).validateTrialTemplate(instance); err != nil { @@ -104,7 +110,10 @@ spec: gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Return(metricsCollectorTemplate, nil).AnyTimes() - mc.EXPECT().GetExperimentFromDB(gomock.Any()).Return(nil, sql.ErrNoRows).AnyTimes() + mc.EXPECT().PreCheckRegisterExperimentInDB(gomock.Any()).Return( + &api_pb.PreCheckRegisterExperimentReply{ + CanRegister: true, + }, nil).AnyTimes() tcs := []struct { Instance *experimentsv1alpha2.Experiment diff --git a/pkg/db/v1alpha2/interface.go b/pkg/db/v1alpha2/interface.go index 63add7f476b..5b8fc5bca4e 100644 --- a/pkg/db/v1alpha2/interface.go +++ b/pkg/db/v1alpha2/interface.go @@ -44,6 +44,7 @@ type KatibDBInterface interface { SelectOne() error RegisterExperiment(experiment *v1alpha2.Experiment) error + PreCheckRegisterExperiment(experiment *v1alpha2.Experiment) (bool, error) DeleteExperiment(experimentName string) error GetExperiment(experimentName string) (*v1alpha2.Experiment, error) GetExperimentList() ([]*v1alpha2.ExperimentSummary, error) @@ -213,6 +214,19 @@ func (d *dbConn) DeleteExperiment(experimentName string) error { _, err := d.db.Exec("DELETE FROM experiments WHERE name = ?", experimentName) return err } + +func (d *dbConn) PreCheckRegisterExperiment(experiment *v1alpha2.Experiment) (bool, error) { + _, err := d.GetExperiment(experiment.Name) + if err != nil { + if err == sql.ErrNoRows { + return true, nil + } + return false, err + } else { + return false, nil + } +} + func (d *dbConn) GetExperiment(experimentName string) (*v1alpha2.Experiment, error) { var id string var paramSpecs string diff --git a/pkg/mock/v1alpha2/api/manager.go b/pkg/mock/v1alpha2/api/manager.go index 63a012153db..243b001b6f2 100644 --- a/pkg/mock/v1alpha2/api/manager.go +++ b/pkg/mock/v1alpha2/api/manager.go @@ -215,6 +215,26 @@ func (mr *MockManagerClientMockRecorder) GetTrialList(arg0, arg1 interface{}, ar return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTrialList", reflect.TypeOf((*MockManagerClient)(nil).GetTrialList), varargs...) } +// PreCheckRegisterExperiment mocks base method +func (m *MockManagerClient) PreCheckRegisterExperiment(arg0 context.Context, arg1 *v1alpha2.RegisterExperimentRequest, arg2 ...grpc.CallOption) (*v1alpha2.PreCheckRegisterExperimentReply, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "PreCheckRegisterExperiment", varargs...) + ret0, _ := ret[0].(*v1alpha2.PreCheckRegisterExperimentReply) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// PreCheckRegisterExperiment indicates an expected call of PreCheckRegisterExperiment +func (mr *MockManagerClientMockRecorder) PreCheckRegisterExperiment(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreCheckRegisterExperiment", reflect.TypeOf((*MockManagerClient)(nil).PreCheckRegisterExperiment), varargs...) +} + // RegisterExperiment mocks base method func (m *MockManagerClient) RegisterExperiment(arg0 context.Context, arg1 *v1alpha2.RegisterExperimentRequest, arg2 ...grpc.CallOption) (*v1alpha2.RegisterExperimentReply, error) { m.ctrl.T.Helper() diff --git a/pkg/mock/v1alpha2/db/db.go b/pkg/mock/v1alpha2/db/db.go index 1cec11f2bec..545c55287fd 100644 --- a/pkg/mock/v1alpha2/db/db.go +++ b/pkg/mock/v1alpha2/db/db.go @@ -163,6 +163,21 @@ func (mr *MockKatibDBInterfaceMockRecorder) GetTrialList(arg0, arg1 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTrialList", reflect.TypeOf((*MockKatibDBInterface)(nil).GetTrialList), arg0, arg1) } +// PreCheckRegisterExperiment mocks base method +func (m *MockKatibDBInterface) PreCheckRegisterExperiment(arg0 *v1alpha2.Experiment) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PreCheckRegisterExperiment", arg0) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// PreCheckRegisterExperiment indicates an expected call of PreCheckRegisterExperiment +func (mr *MockKatibDBInterfaceMockRecorder) PreCheckRegisterExperiment(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreCheckRegisterExperiment", reflect.TypeOf((*MockKatibDBInterface)(nil).PreCheckRegisterExperiment), arg0) +} + // RegisterExperiment mocks base method func (m *MockKatibDBInterface) RegisterExperiment(arg0 *v1alpha2.Experiment) error { m.ctrl.T.Helper() diff --git a/pkg/mock/v1alpha2/experiment/managerclient/managerclient.go b/pkg/mock/v1alpha2/experiment/managerclient/managerclient.go index 41c67fe13e9..4a69cd49347 100644 --- a/pkg/mock/v1alpha2/experiment/managerclient/managerclient.go +++ b/pkg/mock/v1alpha2/experiment/managerclient/managerclient.go @@ -62,19 +62,19 @@ func (mr *MockManagerClientMockRecorder) DeleteExperimentInDB(arg0 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExperimentInDB", reflect.TypeOf((*MockManagerClient)(nil).DeleteExperimentInDB), arg0) } -// GetExperimentFromDB mocks base method -func (m *MockManagerClient) GetExperimentFromDB(arg0 *v1alpha2.Experiment) (*v1alpha20.GetExperimentReply, error) { +// PreCheckRegisterExperimentInDB mocks base method +func (m *MockManagerClient) PreCheckRegisterExperimentInDB(arg0 *v1alpha2.Experiment) (*v1alpha20.PreCheckRegisterExperimentReply, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetExperimentFromDB", arg0) - ret0, _ := ret[0].(*v1alpha20.GetExperimentReply) + ret := m.ctrl.Call(m, "PreCheckRegisterExperimentInDB", arg0) + ret0, _ := ret[0].(*v1alpha20.PreCheckRegisterExperimentReply) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetExperimentFromDB indicates an expected call of GetExperimentFromDB -func (mr *MockManagerClientMockRecorder) GetExperimentFromDB(arg0 interface{}) *gomock.Call { +// PreCheckRegisterExperimentInDB indicates an expected call of PreCheckRegisterExperimentInDB +func (mr *MockManagerClientMockRecorder) PreCheckRegisterExperimentInDB(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExperimentFromDB", reflect.TypeOf((*MockManagerClient)(nil).GetExperimentFromDB), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreCheckRegisterExperimentInDB", reflect.TypeOf((*MockManagerClient)(nil).PreCheckRegisterExperimentInDB), arg0) } // UpdateExperimentStatusInDB mocks base method