@@ -13354,6 +13354,119 @@ extension Clarifai_Api_WorkflowVersionEvaluationTemplate.TaskType: CaseIterable
13354
13354
13355
13355
#endif // swift(>=4.2)
13356
13356
13357
+ /// ComputePlaneMetrics captures the compute plane metrics to send back to the control plane.
13358
+ /// Each message should have the meta filled and one or more of the other fields.
13359
+ public struct Clarifai_Api_ComputePlaneMetrics {
13360
+ // SwiftProtobuf.Message conformance is added in an extension below. See the
13361
+ // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
13362
+ // methods supported on all messages.
13363
+
13364
+ /// Who and where the metrics are from.
13365
+ public var meta: Clarifai_Api_ComputeSourceMetadata {
13366
+ get {return _storage._meta ?? Clarifai_Api_ComputeSourceMetadata()}
13367
+ set {_uniqueStorage()._meta = newValue}
13368
+ }
13369
+ /// Returns true if `meta` has been explicitly set.
13370
+ public var hasMeta: Bool {return _storage._meta != nil}
13371
+ /// Clears the value of `meta`. Subsequent reads from it will return its default value.
13372
+ public mutating func clearMeta() {_uniqueStorage()._meta = nil}
13373
+
13374
+ /// e.g. aws, azure, on-prem.
13375
+ public var cloud: String {
13376
+ get {return _storage._cloud}
13377
+ set {_uniqueStorage()._cloud = newValue}
13378
+ }
13379
+
13380
+ /// e.g. us-east, us-west.
13381
+ public var region: String {
13382
+ get {return _storage._region}
13383
+ set {_uniqueStorage()._region = newValue}
13384
+ }
13385
+
13386
+ /// e.g. t3a.medium, g5.xlarge.
13387
+ public var instanceType: String {
13388
+ get {return _storage._instanceType}
13389
+ set {_uniqueStorage()._instanceType = newValue}
13390
+ }
13391
+
13392
+ /// e.g. spot, on-demand.
13393
+ public var reservationType: String {
13394
+ get {return _storage._reservationType}
13395
+ set {_uniqueStorage()._reservationType = newValue}
13396
+ }
13397
+
13398
+ /// Metrics billing
13399
+ public var reservationPrice: Float {
13400
+ get {return _storage._reservationPrice}
13401
+ set {_uniqueStorage()._reservationPrice = newValue}
13402
+ }
13403
+
13404
+ /// Runtime in seconds.
13405
+ public var runtimeS: Int32 {
13406
+ get {return _storage._runtimeS}
13407
+ set {_uniqueStorage()._runtimeS = newValue}
13408
+ }
13409
+
13410
+ /// Metrics for latency.
13411
+ public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp {
13412
+ get {return _storage._timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()}
13413
+ set {_uniqueStorage()._timestamp = newValue}
13414
+ }
13415
+ /// Returns true if `timestamp` has been explicitly set.
13416
+ public var hasTimestamp: Bool {return _storage._timestamp != nil}
13417
+ /// Clears the value of `timestamp`. Subsequent reads from it will return its default value.
13418
+ public mutating func clearTimestamp() {_uniqueStorage()._timestamp = nil}
13419
+
13420
+ /// e.g. NodeProvisioned, NodeTerminated, ModelDeployed, ModelScheduled, ModelReady.
13421
+ public var eventType: String {
13422
+ get {return _storage._eventType}
13423
+ set {_uniqueStorage()._eventType = newValue}
13424
+ }
13425
+
13426
+ /// GPU metrics.
13427
+ public var gpuMetrics: [Clarifai_Api_GpuMetrics] {
13428
+ get {return _storage._gpuMetrics}
13429
+ set {_uniqueStorage()._gpuMetrics = newValue}
13430
+ }
13431
+
13432
+ /// Hostname of the node.
13433
+ public var hostname: String {
13434
+ get {return _storage._hostname}
13435
+ set {_uniqueStorage()._hostname = newValue}
13436
+ }
13437
+
13438
+ public var unknownFields = SwiftProtobuf.UnknownStorage()
13439
+
13440
+ public init() {}
13441
+
13442
+ fileprivate var _storage = _StorageClass.defaultInstance
13443
+ }
13444
+
13445
+ public struct Clarifai_Api_GpuMetrics {
13446
+ // SwiftProtobuf.Message conformance is added in an extension below. See the
13447
+ // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
13448
+ // methods supported on all messages.
13449
+
13450
+ /// GPU UUID.
13451
+ public var uuid: String = String()
13452
+
13453
+ /// GPU model name. e.g. NVIDIA_A10G
13454
+ public var modelName: String = String()
13455
+
13456
+ /// GPU utilization. e.g. DCGM_FI_DEV_GPU_UTIL
13457
+ public var utilizationPct: Float = 0
13458
+
13459
+ /// Tensor utilization. e.g. DCGM_FI_PROF_PIPE_TENSOR_ACTIVE
13460
+ public var tensorUtilizationPct: Float = 0
13461
+
13462
+ /// Memory utilization. e.g. DCGM_FI_PROF_DRAM_ACTIVE
13463
+ public var memoryUtilizationPct: Float = 0
13464
+
13465
+ public var unknownFields = SwiftProtobuf.UnknownStorage()
13466
+
13467
+ public init() {}
13468
+ }
13469
+
13357
13470
/// LogEntry is a single technical log entry (e.g. service log, stack traces, etc).
13358
13471
public struct Clarifai_Api_LogEntry {
13359
13472
// SwiftProtobuf.Message conformance is added in an extension below. See the
@@ -29463,6 +29576,210 @@ extension Clarifai_Api_WorkflowVersionEvaluationTemplate.TaskType: SwiftProtobuf
29463
29576
]
29464
29577
}
29465
29578
29579
+ extension Clarifai_Api_ComputePlaneMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
29580
+ public static let protoMessageName: String = _protobuf_package + ".ComputePlaneMetrics"
29581
+ public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
29582
+ 1: .same(proto: "meta"),
29583
+ 2: .same(proto: "cloud"),
29584
+ 3: .same(proto: "region"),
29585
+ 4: .standard(proto: "instance_type"),
29586
+ 5: .standard(proto: "reservation_type"),
29587
+ 6: .standard(proto: "reservation_price"),
29588
+ 7: .standard(proto: "runtime_s"),
29589
+ 8: .same(proto: "timestamp"),
29590
+ 9: .standard(proto: "event_type"),
29591
+ 10: .standard(proto: "gpu_metrics"),
29592
+ 11: .same(proto: "hostname"),
29593
+ ]
29594
+
29595
+ fileprivate class _StorageClass {
29596
+ var _meta: Clarifai_Api_ComputeSourceMetadata? = nil
29597
+ var _cloud: String = String()
29598
+ var _region: String = String()
29599
+ var _instanceType: String = String()
29600
+ var _reservationType: String = String()
29601
+ var _reservationPrice: Float = 0
29602
+ var _runtimeS: Int32 = 0
29603
+ var _timestamp: SwiftProtobuf.Google_Protobuf_Timestamp? = nil
29604
+ var _eventType: String = String()
29605
+ var _gpuMetrics: [Clarifai_Api_GpuMetrics] = []
29606
+ var _hostname: String = String()
29607
+
29608
+ static let defaultInstance = _StorageClass()
29609
+
29610
+ private init() {}
29611
+
29612
+ init(copying source: _StorageClass) {
29613
+ _meta = source._meta
29614
+ _cloud = source._cloud
29615
+ _region = source._region
29616
+ _instanceType = source._instanceType
29617
+ _reservationType = source._reservationType
29618
+ _reservationPrice = source._reservationPrice
29619
+ _runtimeS = source._runtimeS
29620
+ _timestamp = source._timestamp
29621
+ _eventType = source._eventType
29622
+ _gpuMetrics = source._gpuMetrics
29623
+ _hostname = source._hostname
29624
+ }
29625
+ }
29626
+
29627
+ fileprivate mutating func _uniqueStorage() -> _StorageClass {
29628
+ if !isKnownUniquelyReferenced(&_storage) {
29629
+ _storage = _StorageClass(copying: _storage)
29630
+ }
29631
+ return _storage
29632
+ }
29633
+
29634
+ public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
29635
+ _ = _uniqueStorage()
29636
+ try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
29637
+ while let fieldNumber = try decoder.nextFieldNumber() {
29638
+ // The use of inline closures is to circumvent an issue where the compiler
29639
+ // allocates stack space for every case branch when no optimizations are
29640
+ // enabled. https://github.com/apple/swift-protobuf/issues/1034
29641
+ switch fieldNumber {
29642
+ case 1: try { try decoder.decodeSingularMessageField(value: &_storage._meta) }()
29643
+ case 2: try { try decoder.decodeSingularStringField(value: &_storage._cloud) }()
29644
+ case 3: try { try decoder.decodeSingularStringField(value: &_storage._region) }()
29645
+ case 4: try { try decoder.decodeSingularStringField(value: &_storage._instanceType) }()
29646
+ case 5: try { try decoder.decodeSingularStringField(value: &_storage._reservationType) }()
29647
+ case 6: try { try decoder.decodeSingularFloatField(value: &_storage._reservationPrice) }()
29648
+ case 7: try { try decoder.decodeSingularInt32Field(value: &_storage._runtimeS) }()
29649
+ case 8: try { try decoder.decodeSingularMessageField(value: &_storage._timestamp) }()
29650
+ case 9: try { try decoder.decodeSingularStringField(value: &_storage._eventType) }()
29651
+ case 10: try { try decoder.decodeRepeatedMessageField(value: &_storage._gpuMetrics) }()
29652
+ case 11: try { try decoder.decodeSingularStringField(value: &_storage._hostname) }()
29653
+ default: break
29654
+ }
29655
+ }
29656
+ }
29657
+ }
29658
+
29659
+ public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
29660
+ try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
29661
+ // The use of inline closures is to circumvent an issue where the compiler
29662
+ // allocates stack space for every if/case branch local when no optimizations
29663
+ // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
29664
+ // https://github.com/apple/swift-protobuf/issues/1182
29665
+ try { if let v = _storage._meta {
29666
+ try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
29667
+ } }()
29668
+ if !_storage._cloud.isEmpty {
29669
+ try visitor.visitSingularStringField(value: _storage._cloud, fieldNumber: 2)
29670
+ }
29671
+ if !_storage._region.isEmpty {
29672
+ try visitor.visitSingularStringField(value: _storage._region, fieldNumber: 3)
29673
+ }
29674
+ if !_storage._instanceType.isEmpty {
29675
+ try visitor.visitSingularStringField(value: _storage._instanceType, fieldNumber: 4)
29676
+ }
29677
+ if !_storage._reservationType.isEmpty {
29678
+ try visitor.visitSingularStringField(value: _storage._reservationType, fieldNumber: 5)
29679
+ }
29680
+ if _storage._reservationPrice != 0 {
29681
+ try visitor.visitSingularFloatField(value: _storage._reservationPrice, fieldNumber: 6)
29682
+ }
29683
+ if _storage._runtimeS != 0 {
29684
+ try visitor.visitSingularInt32Field(value: _storage._runtimeS, fieldNumber: 7)
29685
+ }
29686
+ try { if let v = _storage._timestamp {
29687
+ try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
29688
+ } }()
29689
+ if !_storage._eventType.isEmpty {
29690
+ try visitor.visitSingularStringField(value: _storage._eventType, fieldNumber: 9)
29691
+ }
29692
+ if !_storage._gpuMetrics.isEmpty {
29693
+ try visitor.visitRepeatedMessageField(value: _storage._gpuMetrics, fieldNumber: 10)
29694
+ }
29695
+ if !_storage._hostname.isEmpty {
29696
+ try visitor.visitSingularStringField(value: _storage._hostname, fieldNumber: 11)
29697
+ }
29698
+ }
29699
+ try unknownFields.traverse(visitor: &visitor)
29700
+ }
29701
+
29702
+ public static func ==(lhs: Clarifai_Api_ComputePlaneMetrics, rhs: Clarifai_Api_ComputePlaneMetrics) -> Bool {
29703
+ if lhs._storage !== rhs._storage {
29704
+ let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
29705
+ let _storage = _args.0
29706
+ let rhs_storage = _args.1
29707
+ if _storage._meta != rhs_storage._meta {return false}
29708
+ if _storage._cloud != rhs_storage._cloud {return false}
29709
+ if _storage._region != rhs_storage._region {return false}
29710
+ if _storage._instanceType != rhs_storage._instanceType {return false}
29711
+ if _storage._reservationType != rhs_storage._reservationType {return false}
29712
+ if _storage._reservationPrice != rhs_storage._reservationPrice {return false}
29713
+ if _storage._runtimeS != rhs_storage._runtimeS {return false}
29714
+ if _storage._timestamp != rhs_storage._timestamp {return false}
29715
+ if _storage._eventType != rhs_storage._eventType {return false}
29716
+ if _storage._gpuMetrics != rhs_storage._gpuMetrics {return false}
29717
+ if _storage._hostname != rhs_storage._hostname {return false}
29718
+ return true
29719
+ }
29720
+ if !storagesAreEqual {return false}
29721
+ }
29722
+ if lhs.unknownFields != rhs.unknownFields {return false}
29723
+ return true
29724
+ }
29725
+ }
29726
+
29727
+ extension Clarifai_Api_GpuMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
29728
+ public static let protoMessageName: String = _protobuf_package + ".GpuMetrics"
29729
+ public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
29730
+ 1: .same(proto: "uuid"),
29731
+ 2: .standard(proto: "model_name"),
29732
+ 3: .standard(proto: "utilization_pct"),
29733
+ 4: .standard(proto: "tensor_utilization_pct"),
29734
+ 5: .standard(proto: "memory_utilization_pct"),
29735
+ ]
29736
+
29737
+ public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
29738
+ while let fieldNumber = try decoder.nextFieldNumber() {
29739
+ // The use of inline closures is to circumvent an issue where the compiler
29740
+ // allocates stack space for every case branch when no optimizations are
29741
+ // enabled. https://github.com/apple/swift-protobuf/issues/1034
29742
+ switch fieldNumber {
29743
+ case 1: try { try decoder.decodeSingularStringField(value: &self.uuid) }()
29744
+ case 2: try { try decoder.decodeSingularStringField(value: &self.modelName) }()
29745
+ case 3: try { try decoder.decodeSingularFloatField(value: &self.utilizationPct) }()
29746
+ case 4: try { try decoder.decodeSingularFloatField(value: &self.tensorUtilizationPct) }()
29747
+ case 5: try { try decoder.decodeSingularFloatField(value: &self.memoryUtilizationPct) }()
29748
+ default: break
29749
+ }
29750
+ }
29751
+ }
29752
+
29753
+ public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
29754
+ if !self.uuid.isEmpty {
29755
+ try visitor.visitSingularStringField(value: self.uuid, fieldNumber: 1)
29756
+ }
29757
+ if !self.modelName.isEmpty {
29758
+ try visitor.visitSingularStringField(value: self.modelName, fieldNumber: 2)
29759
+ }
29760
+ if self.utilizationPct != 0 {
29761
+ try visitor.visitSingularFloatField(value: self.utilizationPct, fieldNumber: 3)
29762
+ }
29763
+ if self.tensorUtilizationPct != 0 {
29764
+ try visitor.visitSingularFloatField(value: self.tensorUtilizationPct, fieldNumber: 4)
29765
+ }
29766
+ if self.memoryUtilizationPct != 0 {
29767
+ try visitor.visitSingularFloatField(value: self.memoryUtilizationPct, fieldNumber: 5)
29768
+ }
29769
+ try unknownFields.traverse(visitor: &visitor)
29770
+ }
29771
+
29772
+ public static func ==(lhs: Clarifai_Api_GpuMetrics, rhs: Clarifai_Api_GpuMetrics) -> Bool {
29773
+ if lhs.uuid != rhs.uuid {return false}
29774
+ if lhs.modelName != rhs.modelName {return false}
29775
+ if lhs.utilizationPct != rhs.utilizationPct {return false}
29776
+ if lhs.tensorUtilizationPct != rhs.tensorUtilizationPct {return false}
29777
+ if lhs.memoryUtilizationPct != rhs.memoryUtilizationPct {return false}
29778
+ if lhs.unknownFields != rhs.unknownFields {return false}
29779
+ return true
29780
+ }
29781
+ }
29782
+
29466
29783
extension Clarifai_Api_LogEntry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
29467
29784
public static let protoMessageName: String = _protobuf_package + ".LogEntry"
29468
29785
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0 commit comments