sagemakermetrics.d.ts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import {Request} from '../lib/request';
  2. import {Response} from '../lib/response';
  3. import {AWSError} from '../lib/error';
  4. import {Service} from '../lib/service';
  5. import {ServiceConfigurationOptions} from '../lib/service';
  6. import {ConfigBase as Config} from '../lib/config-base';
  7. interface Blob {}
  8. declare class SageMakerMetrics extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: SageMakerMetrics.Types.ClientConfiguration)
  13. config: Config & SageMakerMetrics.Types.ClientConfiguration;
  14. /**
  15. * Used to ingest training metrics into SageMaker. These metrics can be visualized in SageMaker Studio and retrieved with the GetMetrics API.
  16. */
  17. batchPutMetrics(params: SageMakerMetrics.Types.BatchPutMetricsRequest, callback?: (err: AWSError, data: SageMakerMetrics.Types.BatchPutMetricsResponse) => void): Request<SageMakerMetrics.Types.BatchPutMetricsResponse, AWSError>;
  18. /**
  19. * Used to ingest training metrics into SageMaker. These metrics can be visualized in SageMaker Studio and retrieved with the GetMetrics API.
  20. */
  21. batchPutMetrics(callback?: (err: AWSError, data: SageMakerMetrics.Types.BatchPutMetricsResponse) => void): Request<SageMakerMetrics.Types.BatchPutMetricsResponse, AWSError>;
  22. }
  23. declare namespace SageMakerMetrics {
  24. export interface BatchPutMetricsError {
  25. /**
  26. * The error code of an error that occured when attempting to put metrics. METRIC_LIMIT_EXCEEDED: The maximum amount of metrics per resource is exceeded. INTERNAL_ERROR: An internal error occured. VALIDATION_ERROR: The metric data failed validation. CONFLICT_ERROR: Multiple requests attempted to modify the same data simultaneously.
  27. */
  28. Code?: PutMetricsErrorCode;
  29. /**
  30. * An index that corresponds to the metric in the request.
  31. */
  32. MetricIndex?: Integer;
  33. }
  34. export type BatchPutMetricsErrorList = BatchPutMetricsError[];
  35. export interface BatchPutMetricsRequest {
  36. /**
  37. * The name of the Trial Component to associate with the metrics.
  38. */
  39. TrialComponentName: ExperimentEntityName;
  40. /**
  41. * A list of raw metric values to put.
  42. */
  43. MetricData: RawMetricDataList;
  44. }
  45. export interface BatchPutMetricsResponse {
  46. /**
  47. * Lists any errors that occur when inserting metric data.
  48. */
  49. Errors?: BatchPutMetricsErrorList;
  50. }
  51. export type Double = number;
  52. export type ExperimentEntityName = string;
  53. export type Integer = number;
  54. export type MetricName = string;
  55. export type PutMetricsErrorCode = "METRIC_LIMIT_EXCEEDED"|"INTERNAL_ERROR"|"VALIDATION_ERROR"|"CONFLICT_ERROR"|string;
  56. export interface RawMetricData {
  57. /**
  58. * The name of the metric.
  59. */
  60. MetricName: MetricName;
  61. /**
  62. * The time that the metric was recorded.
  63. */
  64. Timestamp: Timestamp;
  65. /**
  66. * The metric step (epoch).
  67. */
  68. Step?: Step;
  69. /**
  70. * The metric value.
  71. */
  72. Value: Double;
  73. }
  74. export type RawMetricDataList = RawMetricData[];
  75. export type Step = number;
  76. export type Timestamp = Date;
  77. /**
  78. * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
  79. */
  80. export type apiVersion = "2022-09-30"|"latest"|string;
  81. export interface ClientApiVersions {
  82. /**
  83. * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
  84. */
  85. apiVersion?: apiVersion;
  86. }
  87. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  88. /**
  89. * Contains interfaces for use with the SageMakerMetrics client.
  90. */
  91. export import Types = SageMakerMetrics;
  92. }
  93. export = SageMakerMetrics;