-
Notifications
You must be signed in to change notification settings - Fork 20
/
job_service.pb.go
1822 lines (1658 loc) · 68.7 KB
/
job_service.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/ml/v1/job_service.proto
/*
Package ml is a generated protocol buffer package.
It is generated from these files:
google/cloud/ml/v1/job_service.proto
google/cloud/ml/v1/model_service.proto
google/cloud/ml/v1/operation_metadata.proto
google/cloud/ml/v1/prediction_service.proto
google/cloud/ml/v1/project_service.proto
It has these top-level messages:
TrainingInput
HyperparameterSpec
ParameterSpec
HyperparameterOutput
TrainingOutput
PredictionInput
PredictionOutput
Job
CreateJobRequest
ListJobsRequest
ListJobsResponse
GetJobRequest
CancelJobRequest
Model
Version
ManualScaling
CreateModelRequest
ListModelsRequest
ListModelsResponse
GetModelRequest
DeleteModelRequest
CreateVersionRequest
ListVersionsRequest
ListVersionsResponse
GetVersionRequest
DeleteVersionRequest
SetDefaultVersionRequest
OperationMetadata
PredictRequest
GetConfigRequest
GetConfigResponse
*/
package ml
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import _ "google.golang.org/genproto/googleapis/api/serviceconfig"
import google_protobuf1 "github.com/golang/protobuf/ptypes/empty"
import google_protobuf2 "github.com/golang/protobuf/ptypes/timestamp"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// A scale tier is an abstract representation of the resources Cloud ML
// will allocate to a training job. When selecting a scale tier for your
// training job, you should consider the size of your training dataset and
// the complexity of your model. As the tiers increase, virtual machines are
// added to handle your job, and the individual machines in the cluster
// generally have more memory and greater processing power than they do at
// lower tiers. The number of training units charged per hour of processing
// increases as tiers get more advanced. Refer to the
// [pricing guide](/ml/pricing) for more details. Note that in addition to
// incurring costs, your use of training resources is constrained by the
// [quota policy](/ml/quota).
type TrainingInput_ScaleTier int32
const (
// A single worker instance. This tier is suitable for learning how to use
// Cloud ML, and for experimenting with new models using small datasets.
TrainingInput_BASIC TrainingInput_ScaleTier = 0
// Many workers and a few parameter servers.
TrainingInput_STANDARD_1 TrainingInput_ScaleTier = 1
// A large number of workers with many parameter servers.
TrainingInput_PREMIUM_1 TrainingInput_ScaleTier = 3
// A single worker instance [with a GPU](ml/docs/how-tos/using-gpus).
TrainingInput_BASIC_GPU TrainingInput_ScaleTier = 6
// The CUSTOM tier is not a set tier, but rather enables you to use your
// own cluster specification. When you use this tier, set values to
// configure your processing cluster according to these guidelines:
//
// * You _must_ set `TrainingInput.masterType` to specify the type
// of machine to use for your master node. This is the only required
// setting.
//
// * You _may_ set `TrainingInput.workerCount` to specify the number of
// workers to use. If you specify one or more workers, you _must_ also
// set `TrainingInput.workerType` to specify the type of machine to use
// for your worker nodes.
//
// * You _may_ set `TrainingInput.parameterServerCount` to specify the
// number of parameter servers to use. If you specify one or more
// parameter servers, you _must_ also set
// `TrainingInput.parameterServerType` to specify the type of machine to
// use for your parameter servers.
//
// Note that all of your workers must use the same machine type, which can
// be different from your parameter server type and master type. Your
// parameter servers must likewise use the same machine type, which can be
// different from your worker type and master type.
TrainingInput_CUSTOM TrainingInput_ScaleTier = 5
)
var TrainingInput_ScaleTier_name = map[int32]string{
0: "BASIC",
1: "STANDARD_1",
3: "PREMIUM_1",
6: "BASIC_GPU",
5: "CUSTOM",
}
var TrainingInput_ScaleTier_value = map[string]int32{
"BASIC": 0,
"STANDARD_1": 1,
"PREMIUM_1": 3,
"BASIC_GPU": 6,
"CUSTOM": 5,
}
func (x TrainingInput_ScaleTier) String() string {
return proto.EnumName(TrainingInput_ScaleTier_name, int32(x))
}
func (TrainingInput_ScaleTier) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
// The available types of optimization goals.
type HyperparameterSpec_GoalType int32
const (
// Goal Type will default to maximize.
HyperparameterSpec_GOAL_TYPE_UNSPECIFIED HyperparameterSpec_GoalType = 0
// Maximize the goal metric.
HyperparameterSpec_MAXIMIZE HyperparameterSpec_GoalType = 1
// Minimize the goal metric.
HyperparameterSpec_MINIMIZE HyperparameterSpec_GoalType = 2
)
var HyperparameterSpec_GoalType_name = map[int32]string{
0: "GOAL_TYPE_UNSPECIFIED",
1: "MAXIMIZE",
2: "MINIMIZE",
}
var HyperparameterSpec_GoalType_value = map[string]int32{
"GOAL_TYPE_UNSPECIFIED": 0,
"MAXIMIZE": 1,
"MINIMIZE": 2,
}
func (x HyperparameterSpec_GoalType) String() string {
return proto.EnumName(HyperparameterSpec_GoalType_name, int32(x))
}
func (HyperparameterSpec_GoalType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{1, 0}
}
// The type of the parameter.
type ParameterSpec_ParameterType int32
const (
// You must specify a valid type. Using this unspecified type will result in
// an error.
ParameterSpec_PARAMETER_TYPE_UNSPECIFIED ParameterSpec_ParameterType = 0
// Type for real-valued parameters.
ParameterSpec_DOUBLE ParameterSpec_ParameterType = 1
// Type for integral parameters.
ParameterSpec_INTEGER ParameterSpec_ParameterType = 2
// The parameter is categorical, with a value chosen from the categories
// field.
ParameterSpec_CATEGORICAL ParameterSpec_ParameterType = 3
// The parameter is real valued, with a fixed set of feasible points. If
// `type==DISCRETE`, feasible_points must be provided, and
// {`min_value`, `max_value`} will be ignored.
ParameterSpec_DISCRETE ParameterSpec_ParameterType = 4
)
var ParameterSpec_ParameterType_name = map[int32]string{
0: "PARAMETER_TYPE_UNSPECIFIED",
1: "DOUBLE",
2: "INTEGER",
3: "CATEGORICAL",
4: "DISCRETE",
}
var ParameterSpec_ParameterType_value = map[string]int32{
"PARAMETER_TYPE_UNSPECIFIED": 0,
"DOUBLE": 1,
"INTEGER": 2,
"CATEGORICAL": 3,
"DISCRETE": 4,
}
func (x ParameterSpec_ParameterType) String() string {
return proto.EnumName(ParameterSpec_ParameterType_name, int32(x))
}
func (ParameterSpec_ParameterType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{2, 0}
}
// The type of scaling that should be applied to this parameter.
type ParameterSpec_ScaleType int32
const (
// By default, no scaling is applied.
ParameterSpec_NONE ParameterSpec_ScaleType = 0
// Scales the feasible space to (0, 1) linearly.
ParameterSpec_UNIT_LINEAR_SCALE ParameterSpec_ScaleType = 1
// Scales the feasible space logarithmically to (0, 1). The entire feasible
// space must be strictly positive.
ParameterSpec_UNIT_LOG_SCALE ParameterSpec_ScaleType = 2
// Scales the feasible space "reverse" logarithmically to (0, 1). The result
// is that values close to the top of the feasible space are spread out more
// than points near the bottom. The entire feasible space must be strictly
// positive.
ParameterSpec_UNIT_REVERSE_LOG_SCALE ParameterSpec_ScaleType = 3
)
var ParameterSpec_ScaleType_name = map[int32]string{
0: "NONE",
1: "UNIT_LINEAR_SCALE",
2: "UNIT_LOG_SCALE",
3: "UNIT_REVERSE_LOG_SCALE",
}
var ParameterSpec_ScaleType_value = map[string]int32{
"NONE": 0,
"UNIT_LINEAR_SCALE": 1,
"UNIT_LOG_SCALE": 2,
"UNIT_REVERSE_LOG_SCALE": 3,
}
func (x ParameterSpec_ScaleType) String() string {
return proto.EnumName(ParameterSpec_ScaleType_name, int32(x))
}
func (ParameterSpec_ScaleType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 1} }
// The format used to separate data instances in the source files.
type PredictionInput_DataFormat int32
const (
// Unspecified format.
PredictionInput_DATA_FORMAT_UNSPECIFIED PredictionInput_DataFormat = 0
// The source file is a text file with instances separated by the
// new-line character.
PredictionInput_TEXT PredictionInput_DataFormat = 1
// The source file is a TFRecord file.
PredictionInput_TF_RECORD PredictionInput_DataFormat = 2
// The source file is a GZIP-compressed TFRecord file.
PredictionInput_TF_RECORD_GZIP PredictionInput_DataFormat = 3
)
var PredictionInput_DataFormat_name = map[int32]string{
0: "DATA_FORMAT_UNSPECIFIED",
1: "TEXT",
2: "TF_RECORD",
3: "TF_RECORD_GZIP",
}
var PredictionInput_DataFormat_value = map[string]int32{
"DATA_FORMAT_UNSPECIFIED": 0,
"TEXT": 1,
"TF_RECORD": 2,
"TF_RECORD_GZIP": 3,
}
func (x PredictionInput_DataFormat) String() string {
return proto.EnumName(PredictionInput_DataFormat_name, int32(x))
}
func (PredictionInput_DataFormat) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{5, 0}
}
// Describes the job state.
type Job_State int32
const (
// The job state is unspecified.
Job_STATE_UNSPECIFIED Job_State = 0
// The job has been just created and processing has not yet begun.
Job_QUEUED Job_State = 1
// The service is preparing to run the job.
Job_PREPARING Job_State = 2
// The job is in progress.
Job_RUNNING Job_State = 3
// The job completed successfully.
Job_SUCCEEDED Job_State = 4
// The job failed.
// `error_message` should contain the details of the failure.
Job_FAILED Job_State = 5
// The job is being cancelled.
// `error_message` should describe the reason for the cancellation.
Job_CANCELLING Job_State = 6
// The job has been cancelled.
// `error_message` should describe the reason for the cancellation.
Job_CANCELLED Job_State = 7
)
var Job_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "QUEUED",
2: "PREPARING",
3: "RUNNING",
4: "SUCCEEDED",
5: "FAILED",
6: "CANCELLING",
7: "CANCELLED",
}
var Job_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"QUEUED": 1,
"PREPARING": 2,
"RUNNING": 3,
"SUCCEEDED": 4,
"FAILED": 5,
"CANCELLING": 6,
"CANCELLED": 7,
}
func (x Job_State) String() string {
return proto.EnumName(Job_State_name, int32(x))
}
func (Job_State) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{7, 0} }
// Represents input parameters for a training job.
type TrainingInput struct {
// Required. Specifies the machine types, the number of replicas for workers
// and parameter servers.
ScaleTier TrainingInput_ScaleTier `protobuf:"varint,1,opt,name=scale_tier,json=scaleTier,enum=google.cloud.ml.v1.TrainingInput_ScaleTier" json:"scale_tier,omitempty"`
// Optional. Specifies the type of virtual machine to use for your training
// job's master worker.
//
// The following types are supported:
//
// <dl>
// <dt>standard</dt>
// <dd>
// A basic machine configuration suitable for training simple models with
// small to moderate datasets.
// </dd>
// <dt>large_model</dt>
// <dd>
// A machine with a lot of memory, specially suited for parameter servers
// when your model is large (having many hidden layers or layers with very
// large numbers of nodes).
// </dd>
// <dt>complex_model_s</dt>
// <dd>
// A machine suitable for the master and workers of the cluster when your
// model requires more computation than the standard machine can handle
// satisfactorily.
// </dd>
// <dt>complex_model_m</dt>
// <dd>
// A machine with roughly twice the number of cores and roughly double the
// memory of <code suppresswarning="true">complex_model_s</code>.
// </dd>
// <dt>complex_model_l</dt>
// <dd>
// A machine with roughly twice the number of cores and roughly double the
// memory of <code suppresswarning="true">complex_model_m</code>.
// </dd>
// <dt>standard_gpu</dt>
// <dd>
// A machine equivalent to <code suppresswarning="true">standard</code> that
// also includes a
// <a href="ml/docs/how-tos/using-gpus">
// GPU that you can use in your trainer</a>.
// </dd>
// <dt>complex_model_m_gpu</dt>
// <dd>
// A machine equivalent to
// <code suppresswarning="true">coplex_model_m</code> that also includes
// four GPUs.
// </dd>
// </dl>
//
// You must set this value when `scaleTier` is set to `CUSTOM`.
MasterType string `protobuf:"bytes,2,opt,name=master_type,json=masterType" json:"master_type,omitempty"`
// Optional. Specifies the type of virtual machine to use for your training
// job's worker nodes.
//
// The supported values are the same as those described in the entry for
// `masterType`.
//
// This value must be present when `scaleTier` is set to `CUSTOM` and
// `workerCount` is greater than zero.
WorkerType string `protobuf:"bytes,3,opt,name=worker_type,json=workerType" json:"worker_type,omitempty"`
// Optional. Specifies the type of virtual machine to use for your training
// job's parameter server.
//
// The supported values are the same as those described in the entry for
// `master_type`.
//
// This value must be present when `scaleTier` is set to `CUSTOM` and
// `parameter_server_count` is greater than zero.
ParameterServerType string `protobuf:"bytes,4,opt,name=parameter_server_type,json=parameterServerType" json:"parameter_server_type,omitempty"`
// Optional. The number of worker replicas to use for the training job. Each
// replica in the cluster will be of the type specified in `worker_type`.
//
// This value can only be used when `scale_tier` is set to `CUSTOM`. If you
// set this value, you must also set `worker_type`.
WorkerCount int64 `protobuf:"varint,5,opt,name=worker_count,json=workerCount" json:"worker_count,omitempty"`
// Optional. The number of parameter server replicas to use for the training
// job. Each replica in the cluster will be of the type specified in
// `parameter_server_type`.
//
// This value can only be used when `scale_tier` is set to `CUSTOM`.If you
// set this value, you must also set `parameter_server_type`.
ParameterServerCount int64 `protobuf:"varint,6,opt,name=parameter_server_count,json=parameterServerCount" json:"parameter_server_count,omitempty"`
// Required. The Google Cloud Storage location of the packages with
// the training program and any additional dependencies.
PackageUris []string `protobuf:"bytes,7,rep,name=package_uris,json=packageUris" json:"package_uris,omitempty"`
// Required. The Python module name to run after installing the packages.
PythonModule string `protobuf:"bytes,8,opt,name=python_module,json=pythonModule" json:"python_module,omitempty"`
// Optional. Command line arguments to pass to the program.
Args []string `protobuf:"bytes,10,rep,name=args" json:"args,omitempty"`
// Optional. The set of Hyperparameters to tune.
Hyperparameters *HyperparameterSpec `protobuf:"bytes,12,opt,name=hyperparameters" json:"hyperparameters,omitempty"`
// Required. The Google Compute Engine region to run the training job in.
Region string `protobuf:"bytes,14,opt,name=region" json:"region,omitempty"`
// Optional. A Google Cloud Storage path in which to store training outputs
// and other data needed for training. This path is passed to your TensorFlow
// program as the 'job_dir' command-line argument. The benefit of specifying
// this field is that Cloud ML validates the path for use in training.
JobDir string `protobuf:"bytes,16,opt,name=job_dir,json=jobDir" json:"job_dir,omitempty"`
// Optional. The Google Cloud ML runtime version to use for training. If not
// set, Google Cloud ML will choose the latest stable version.
RuntimeVersion string `protobuf:"bytes,15,opt,name=runtime_version,json=runtimeVersion" json:"runtime_version,omitempty"`
}
func (m *TrainingInput) Reset() { *m = TrainingInput{} }
func (m *TrainingInput) String() string { return proto.CompactTextString(m) }
func (*TrainingInput) ProtoMessage() {}
func (*TrainingInput) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *TrainingInput) GetScaleTier() TrainingInput_ScaleTier {
if m != nil {
return m.ScaleTier
}
return TrainingInput_BASIC
}
func (m *TrainingInput) GetMasterType() string {
if m != nil {
return m.MasterType
}
return ""
}
func (m *TrainingInput) GetWorkerType() string {
if m != nil {
return m.WorkerType
}
return ""
}
func (m *TrainingInput) GetParameterServerType() string {
if m != nil {
return m.ParameterServerType
}
return ""
}
func (m *TrainingInput) GetWorkerCount() int64 {
if m != nil {
return m.WorkerCount
}
return 0
}
func (m *TrainingInput) GetParameterServerCount() int64 {
if m != nil {
return m.ParameterServerCount
}
return 0
}
func (m *TrainingInput) GetPackageUris() []string {
if m != nil {
return m.PackageUris
}
return nil
}
func (m *TrainingInput) GetPythonModule() string {
if m != nil {
return m.PythonModule
}
return ""
}
func (m *TrainingInput) GetArgs() []string {
if m != nil {
return m.Args
}
return nil
}
func (m *TrainingInput) GetHyperparameters() *HyperparameterSpec {
if m != nil {
return m.Hyperparameters
}
return nil
}
func (m *TrainingInput) GetRegion() string {
if m != nil {
return m.Region
}
return ""
}
func (m *TrainingInput) GetJobDir() string {
if m != nil {
return m.JobDir
}
return ""
}
func (m *TrainingInput) GetRuntimeVersion() string {
if m != nil {
return m.RuntimeVersion
}
return ""
}
// Represents a set of hyperparameters to optimize.
type HyperparameterSpec struct {
// Required. The type of goal to use for tuning. Available types are
// `MAXIMIZE` and `MINIMIZE`.
//
// Defaults to `MAXIMIZE`.
Goal HyperparameterSpec_GoalType `protobuf:"varint,1,opt,name=goal,enum=google.cloud.ml.v1.HyperparameterSpec_GoalType" json:"goal,omitempty"`
// Required. The set of parameters to tune.
Params []*ParameterSpec `protobuf:"bytes,2,rep,name=params" json:"params,omitempty"`
// Optional. How many training trials should be attempted to optimize
// the specified hyperparameters.
//
// Defaults to one.
MaxTrials int32 `protobuf:"varint,3,opt,name=max_trials,json=maxTrials" json:"max_trials,omitempty"`
// Optional. The number of training trials to run concurrently.
// You can reduce the time it takes to perform hyperparameter tuning by adding
// trials in parallel. However, each trail only benefits from the information
// gained in completed trials. That means that a trial does not get access to
// the results of trials running at the same time, which could reduce the
// quality of the overall optimization.
//
// Each trial will use the same scale tier and machine types.
//
// Defaults to one.
MaxParallelTrials int32 `protobuf:"varint,4,opt,name=max_parallel_trials,json=maxParallelTrials" json:"max_parallel_trials,omitempty"`
// Optional. The Tensorflow summary tag name to use for optimizing trials. For
// current versions of Tensorflow, this tag name should exactly match what is
// shown in Tensorboard, including all scopes. For versions of Tensorflow
// prior to 0.12, this should be only the tag passed to tf.Summary.
// By default, "training/hptuning/metric" will be used.
HyperparameterMetricTag string `protobuf:"bytes,5,opt,name=hyperparameter_metric_tag,json=hyperparameterMetricTag" json:"hyperparameter_metric_tag,omitempty"`
}
func (m *HyperparameterSpec) Reset() { *m = HyperparameterSpec{} }
func (m *HyperparameterSpec) String() string { return proto.CompactTextString(m) }
func (*HyperparameterSpec) ProtoMessage() {}
func (*HyperparameterSpec) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *HyperparameterSpec) GetGoal() HyperparameterSpec_GoalType {
if m != nil {
return m.Goal
}
return HyperparameterSpec_GOAL_TYPE_UNSPECIFIED
}
func (m *HyperparameterSpec) GetParams() []*ParameterSpec {
if m != nil {
return m.Params
}
return nil
}
func (m *HyperparameterSpec) GetMaxTrials() int32 {
if m != nil {
return m.MaxTrials
}
return 0
}
func (m *HyperparameterSpec) GetMaxParallelTrials() int32 {
if m != nil {
return m.MaxParallelTrials
}
return 0
}
func (m *HyperparameterSpec) GetHyperparameterMetricTag() string {
if m != nil {
return m.HyperparameterMetricTag
}
return ""
}
// Represents a single hyperparameter to optimize.
type ParameterSpec struct {
// Required. The parameter name must be unique amongst all ParameterConfigs in
// a HyperparameterSpec message. E.g., "learning_rate".
ParameterName string `protobuf:"bytes,1,opt,name=parameter_name,json=parameterName" json:"parameter_name,omitempty"`
// Required. The type of the parameter.
Type ParameterSpec_ParameterType `protobuf:"varint,4,opt,name=type,enum=google.cloud.ml.v1.ParameterSpec_ParameterType" json:"type,omitempty"`
// Required if type is `DOUBLE` or `INTEGER`. This field
// should be unset if type is `CATEGORICAL`. This value should be integers if
// type is INTEGER.
MinValue float64 `protobuf:"fixed64,2,opt,name=min_value,json=minValue" json:"min_value,omitempty"`
// Required if typeis `DOUBLE` or `INTEGER`. This field
// should be unset if type is `CATEGORICAL`. This value should be integers if
// type is `INTEGER`.
MaxValue float64 `protobuf:"fixed64,3,opt,name=max_value,json=maxValue" json:"max_value,omitempty"`
// Required if type is `CATEGORICAL`. The list of possible categories.
CategoricalValues []string `protobuf:"bytes,5,rep,name=categorical_values,json=categoricalValues" json:"categorical_values,omitempty"`
// Required if type is `DISCRETE`.
// A list of feasible points.
// The list should be in strictly increasing order. For instance, this
// parameter might have possible settings of 1.5, 2.5, and 4.0. This list
// should not contain more than 1,000 values.
DiscreteValues []float64 `protobuf:"fixed64,6,rep,packed,name=discrete_values,json=discreteValues" json:"discrete_values,omitempty"`
// Optional. How the parameter should be scaled to the hypercube.
// Leave unset for categorical parameters.
// Some kind of scaling is strongly recommended for real or integral
// parameters (e.g., `UNIT_LINEAR_SCALE`).
ScaleType ParameterSpec_ScaleType `protobuf:"varint,7,opt,name=scale_type,json=scaleType,enum=google.cloud.ml.v1.ParameterSpec_ScaleType" json:"scale_type,omitempty"`
}
func (m *ParameterSpec) Reset() { *m = ParameterSpec{} }
func (m *ParameterSpec) String() string { return proto.CompactTextString(m) }
func (*ParameterSpec) ProtoMessage() {}
func (*ParameterSpec) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *ParameterSpec) GetParameterName() string {
if m != nil {
return m.ParameterName
}
return ""
}
func (m *ParameterSpec) GetType() ParameterSpec_ParameterType {
if m != nil {
return m.Type
}
return ParameterSpec_PARAMETER_TYPE_UNSPECIFIED
}
func (m *ParameterSpec) GetMinValue() float64 {
if m != nil {
return m.MinValue
}
return 0
}
func (m *ParameterSpec) GetMaxValue() float64 {
if m != nil {
return m.MaxValue
}
return 0
}
func (m *ParameterSpec) GetCategoricalValues() []string {
if m != nil {
return m.CategoricalValues
}
return nil
}
func (m *ParameterSpec) GetDiscreteValues() []float64 {
if m != nil {
return m.DiscreteValues
}
return nil
}
func (m *ParameterSpec) GetScaleType() ParameterSpec_ScaleType {
if m != nil {
return m.ScaleType
}
return ParameterSpec_NONE
}
// Represents the result of a single hyperparameter tuning trial from a
// training job. The TrainingOutput object that is returned on successful
// completion of a training job with hyperparameter tuning includes a list
// of HyperparameterOutput objects, one for each successful trial.
type HyperparameterOutput struct {
// The trial id for these results.
TrialId string `protobuf:"bytes,1,opt,name=trial_id,json=trialId" json:"trial_id,omitempty"`
// The hyperparameters given to this trial.
Hyperparameters map[string]string `protobuf:"bytes,2,rep,name=hyperparameters" json:"hyperparameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// The final objective metric seen for this trial.
FinalMetric *HyperparameterOutput_HyperparameterMetric `protobuf:"bytes,3,opt,name=final_metric,json=finalMetric" json:"final_metric,omitempty"`
// All recorded object metrics for this trial.
AllMetrics []*HyperparameterOutput_HyperparameterMetric `protobuf:"bytes,4,rep,name=all_metrics,json=allMetrics" json:"all_metrics,omitempty"`
}
func (m *HyperparameterOutput) Reset() { *m = HyperparameterOutput{} }
func (m *HyperparameterOutput) String() string { return proto.CompactTextString(m) }
func (*HyperparameterOutput) ProtoMessage() {}
func (*HyperparameterOutput) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *HyperparameterOutput) GetTrialId() string {
if m != nil {
return m.TrialId
}
return ""
}
func (m *HyperparameterOutput) GetHyperparameters() map[string]string {
if m != nil {
return m.Hyperparameters
}
return nil
}
func (m *HyperparameterOutput) GetFinalMetric() *HyperparameterOutput_HyperparameterMetric {
if m != nil {
return m.FinalMetric
}
return nil
}
func (m *HyperparameterOutput) GetAllMetrics() []*HyperparameterOutput_HyperparameterMetric {
if m != nil {
return m.AllMetrics
}
return nil
}
// An observed value of a metric.
type HyperparameterOutput_HyperparameterMetric struct {
// The global training step for this metric.
TrainingStep int64 `protobuf:"varint,1,opt,name=training_step,json=trainingStep" json:"training_step,omitempty"`
// The objective value at this training step.
ObjectiveValue float64 `protobuf:"fixed64,2,opt,name=objective_value,json=objectiveValue" json:"objective_value,omitempty"`
}
func (m *HyperparameterOutput_HyperparameterMetric) Reset() {
*m = HyperparameterOutput_HyperparameterMetric{}
}
func (m *HyperparameterOutput_HyperparameterMetric) String() string { return proto.CompactTextString(m) }
func (*HyperparameterOutput_HyperparameterMetric) ProtoMessage() {}
func (*HyperparameterOutput_HyperparameterMetric) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{3, 0}
}
func (m *HyperparameterOutput_HyperparameterMetric) GetTrainingStep() int64 {
if m != nil {
return m.TrainingStep
}
return 0
}
func (m *HyperparameterOutput_HyperparameterMetric) GetObjectiveValue() float64 {
if m != nil {
return m.ObjectiveValue
}
return 0
}
// Represents results of a training job. Output only.
type TrainingOutput struct {
// The number of hyperparameter tuning trials that completed successfully.
// Only set for hyperparameter tuning jobs.
CompletedTrialCount int64 `protobuf:"varint,1,opt,name=completed_trial_count,json=completedTrialCount" json:"completed_trial_count,omitempty"`
// Results for individual Hyperparameter trials.
// Only set for hyperparameter tuning jobs.
Trials []*HyperparameterOutput `protobuf:"bytes,2,rep,name=trials" json:"trials,omitempty"`
// The amount of ML units consumed by the job.
ConsumedMlUnits float64 `protobuf:"fixed64,3,opt,name=consumed_ml_units,json=consumedMlUnits" json:"consumed_ml_units,omitempty"`
// Whether this job is a hyperparameter tuning job.
IsHyperparameterTuningJob bool `protobuf:"varint,4,opt,name=is_hyperparameter_tuning_job,json=isHyperparameterTuningJob" json:"is_hyperparameter_tuning_job,omitempty"`
}
func (m *TrainingOutput) Reset() { *m = TrainingOutput{} }
func (m *TrainingOutput) String() string { return proto.CompactTextString(m) }
func (*TrainingOutput) ProtoMessage() {}
func (*TrainingOutput) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *TrainingOutput) GetCompletedTrialCount() int64 {
if m != nil {
return m.CompletedTrialCount
}
return 0
}
func (m *TrainingOutput) GetTrials() []*HyperparameterOutput {
if m != nil {
return m.Trials
}
return nil
}
func (m *TrainingOutput) GetConsumedMlUnits() float64 {
if m != nil {
return m.ConsumedMlUnits
}
return 0
}
func (m *TrainingOutput) GetIsHyperparameterTuningJob() bool {
if m != nil {
return m.IsHyperparameterTuningJob
}
return false
}
// Represents input parameters for a prediction job.
type PredictionInput struct {
// Required. The model or the version to use for prediction.
//
// Types that are valid to be assigned to ModelVersion:
// *PredictionInput_ModelName
// *PredictionInput_VersionName
// *PredictionInput_Uri
ModelVersion isPredictionInput_ModelVersion `protobuf_oneof:"model_version"`
// Required. The format of the input data files.
DataFormat PredictionInput_DataFormat `protobuf:"varint,3,opt,name=data_format,json=dataFormat,enum=google.cloud.ml.v1.PredictionInput_DataFormat" json:"data_format,omitempty"`
// Required. The Google Cloud Storage location of the input data files.
// May contain wildcards.
InputPaths []string `protobuf:"bytes,4,rep,name=input_paths,json=inputPaths" json:"input_paths,omitempty"`
// Required. The output Google Cloud Storage location.
OutputPath string `protobuf:"bytes,5,opt,name=output_path,json=outputPath" json:"output_path,omitempty"`
// Optional. The maximum number of workers to be used for parallel processing.
// Defaults to 10 if not specified.
MaxWorkerCount int64 `protobuf:"varint,6,opt,name=max_worker_count,json=maxWorkerCount" json:"max_worker_count,omitempty"`
// Required. The Google Compute Engine region to run the prediction job in.
Region string `protobuf:"bytes,7,opt,name=region" json:"region,omitempty"`
// Optional. The Google Cloud ML runtime version to use for this batch
// prediction. If not set, Google Cloud ML will pick the runtime version used
// during the CreateVersion request for this model version, or choose the
// latest stable version when model version information is not available
// such as when the model is specified by uri.
RuntimeVersion string `protobuf:"bytes,8,opt,name=runtime_version,json=runtimeVersion" json:"runtime_version,omitempty"`
}
func (m *PredictionInput) Reset() { *m = PredictionInput{} }
func (m *PredictionInput) String() string { return proto.CompactTextString(m) }
func (*PredictionInput) ProtoMessage() {}
func (*PredictionInput) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
type isPredictionInput_ModelVersion interface {
isPredictionInput_ModelVersion()
}
type PredictionInput_ModelName struct {
ModelName string `protobuf:"bytes,1,opt,name=model_name,json=modelName,oneof"`
}
type PredictionInput_VersionName struct {
VersionName string `protobuf:"bytes,2,opt,name=version_name,json=versionName,oneof"`
}
type PredictionInput_Uri struct {
Uri string `protobuf:"bytes,9,opt,name=uri,oneof"`
}
func (*PredictionInput_ModelName) isPredictionInput_ModelVersion() {}
func (*PredictionInput_VersionName) isPredictionInput_ModelVersion() {}
func (*PredictionInput_Uri) isPredictionInput_ModelVersion() {}
func (m *PredictionInput) GetModelVersion() isPredictionInput_ModelVersion {
if m != nil {
return m.ModelVersion
}
return nil
}
func (m *PredictionInput) GetModelName() string {
if x, ok := m.GetModelVersion().(*PredictionInput_ModelName); ok {
return x.ModelName
}
return ""
}
func (m *PredictionInput) GetVersionName() string {
if x, ok := m.GetModelVersion().(*PredictionInput_VersionName); ok {
return x.VersionName
}
return ""
}
func (m *PredictionInput) GetUri() string {
if x, ok := m.GetModelVersion().(*PredictionInput_Uri); ok {
return x.Uri
}
return ""
}
func (m *PredictionInput) GetDataFormat() PredictionInput_DataFormat {
if m != nil {
return m.DataFormat
}
return PredictionInput_DATA_FORMAT_UNSPECIFIED
}
func (m *PredictionInput) GetInputPaths() []string {
if m != nil {
return m.InputPaths
}
return nil
}
func (m *PredictionInput) GetOutputPath() string {
if m != nil {
return m.OutputPath
}
return ""
}
func (m *PredictionInput) GetMaxWorkerCount() int64 {
if m != nil {
return m.MaxWorkerCount
}
return 0
}
func (m *PredictionInput) GetRegion() string {
if m != nil {
return m.Region
}
return ""
}
func (m *PredictionInput) GetRuntimeVersion() string {
if m != nil {
return m.RuntimeVersion
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*PredictionInput) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _PredictionInput_OneofMarshaler, _PredictionInput_OneofUnmarshaler, _PredictionInput_OneofSizer, []interface{}{
(*PredictionInput_ModelName)(nil),
(*PredictionInput_VersionName)(nil),
(*PredictionInput_Uri)(nil),
}
}
func _PredictionInput_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*PredictionInput)
// model_version
switch x := m.ModelVersion.(type) {
case *PredictionInput_ModelName:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeStringBytes(x.ModelName)
case *PredictionInput_VersionName:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeStringBytes(x.VersionName)
case *PredictionInput_Uri:
b.EncodeVarint(9<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Uri)
case nil:
default:
return fmt.Errorf("PredictionInput.ModelVersion has unexpected type %T", x)
}
return nil
}
func _PredictionInput_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*PredictionInput)
switch tag {
case 1: // model_version.model_name
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.ModelVersion = &PredictionInput_ModelName{x}
return true, err
case 2: // model_version.version_name
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.ModelVersion = &PredictionInput_VersionName{x}
return true, err
case 9: // model_version.uri
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.ModelVersion = &PredictionInput_Uri{x}
return true, err
default:
return false, nil
}
}