Skip to content

Commit ac8e06a

Browse files
minkefusijijr-MS
andauthored
Update doc (#21748)
* Update doc * Remove suppress * Remove suppress * Remove suppress * Add ad openapi description * Update typo Co-authored-by: jr-MS <81400625+jr-MS@users.noreply.github.com>
1 parent 5dedb96 commit ac8e06a

File tree

5 files changed

+68
-13
lines changed

5 files changed

+68
-13
lines changed

specification/cognitiveservices/AnomalyDetector/multivariate/models.cadl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ model MultivariateBatchDetectionResultSummary {
7171

7272
@doc("Error message when detection is failed.")
7373
errors?: ErrorResponse[];
74+
@doc("Variable Status.")
7475
variableStates?: VariableState[];
7576

7677
@doc("""
@@ -80,6 +81,7 @@ will need another API to get detection results.
8081
setupInfo: MultivariateBatchDetectionOptions;
8182
}
8283

84+
@doc("ErrorResponse contains code and message that shows the error information.")
8385
@error
8486
model ErrorResponse {
8587

@@ -90,6 +92,7 @@ model ErrorResponse {
9092
message: string;
9193
}
9294

95+
@doc("Variable Status.")
9396
model VariableState {
9497
@doc("Variable name in variable states.")
9598
variable?: string;
@@ -142,15 +145,18 @@ be date-time of ISO 8601 format.
142145
endTime: zonedDateTime;
143146
}
144147

148+
@doc("Anomaly status and information.")
145149
model AnomalyState {
146150
@doc("The timestamp for this anomaly.")
147151
timestamp: zonedDateTime;
152+
@doc("The detailed value of this anomalous timestamp.")
148153
value?: AnomalyValue;
149154

150155
@doc("Error message for the current timestamp.")
151156
errors?: ErrorResponse[];
152157
}
153158

159+
@doc("Detailed information of the anomalous timestamp.")
154160
model AnomalyValue {
155161
@doc("True if an anomaly is detected at the current timestamp.")
156162
isAnomaly: boolean;
@@ -170,9 +176,11 @@ well.
170176
@minValue(0.0)
171177
@maxValue(2.0)
172178
score: float32;
179+
@doc("Interpretation of this anomalous timestamp.")
173180
interpretation?: AnomalyInterpretation[];
174181
}
175182

183+
@doc("Interpretation of the anomalous timestamp.")
176184
model AnomalyInterpretation {
177185
@doc("Variable.")
178186
variable?: string;
@@ -182,9 +190,11 @@ This score shows the percentage contributing to the anomalous timestamp. A
182190
number between 0 and 1.
183191
""")
184192
contributionScore?: float32;
193+
@doc("Correlation changes among the anomalous variables")
185194
correlationChanges?: CorrelationChanges;
186195
}
187196

197+
@doc("Correlation changes among the anomalous variables")
188198
model CorrelationChanges {
189199
@doc("The correlated variables that have correlation changes under an anomaly.")
190200
changedVariables?: string[];
@@ -267,10 +277,13 @@ Previous, Subsequent, Linear, Zero, Fixed.
267277

268278
@doc("Diagnostics information to help inspect the states of model or variable.")
269279
model DiagnosticsInfo {
280+
@doc("Model status.")
270281
modelState?: ModelState;
282+
@doc("Variable Status.")
271283
variableStates?: VariableState[];
272284
}
273285

286+
@doc("Model status.")
274287
model ModelState {
275288
@doc("""
276289
This indicates the number of passes of the entire training dataset the
@@ -333,6 +346,7 @@ model ModelList {
333346
nextLink?: string;
334347
}
335348

349+
@doc("Request of last detection.")
336350
model MultivariateLastDetectionOptions {
337351
@doc("""
338352
This contains the inference data, including the name, timestamps(ISO 8601) and
@@ -348,6 +362,7 @@ variables for one anomalous timestamp in the response. The default number is
348362
topContributorCount: int32;
349363
}
350364

365+
@doc("Variable values.")
351366
model VariableValues {
352367
@doc("Variable name of last detection request.")
353368
variable: string;
@@ -359,8 +374,12 @@ model VariableValues {
359374
values: float32[];
360375
}
361376

377+
378+
@doc("Results of last detection.")
362379
model MultivariateLastDetectionResult {
380+
@doc("Variable Status.")
363381
variableStates?: VariableState[];
382+
@doc("Anomaly status and information.")
364383
results?: AnomalyState[];
365384
}
366385

specification/cognitiveservices/AnomalyDetector/multivariate/routes.cadl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ resultId returned by the BatchDetectAnomaly api.
1717
// To improve CADL implementation apply: https://github.com/Azure/azure-rest-api-specs/issues/21527
1818
op GetMultivariateBatchDetectionResult(
1919
@format("uuid")
20+
@doc("ID of a batch detection result.")
2021
@path resultId: string,
2122
): MultivariateDetectionResult | ResponseError;
2223

@@ -35,6 +36,7 @@ timestamp column.
3536
""")
3637
// To improve CADL implementation apply: https://github.com/Azure/azure-rest-api-specs/issues/21527
3738
op TrainMultivariateModel(
39+
@doc("Model information.")
3840
@body modelInfo: ModelInfo,
3941
): {
4042
@statusCode statusCode: 201,
@@ -103,6 +105,7 @@ op DetectMultivariateBatchAnomaly(
103105
@doc("Model identifier.")
104106
@path
105107
modelId: string,
108+
@doc("Request of multivariate anomaly detection.")
106109
@body options: MultivariateBatchDetectionOptions,
107110
): {
108111
@statusCode statusCode: 202,
@@ -126,5 +129,6 @@ op DetectMultivariateLastAnomaly(
126129
@doc("Model identifier.")
127130
@path
128131
modelId: string,
132+
@doc("Request of last detection.")
129133
@body options: MultivariateLastDetectionOptions,
130134
): MultivariateLastDetectionResult | ResponseError;

specification/cognitiveservices/AnomalyDetector/univariate/models.cadl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ sever the anomaly is. For normal points, the \"severity\" is always 0.
178178
@error
179179
model AnomalyDetectorError {
180180
@header
181+
@doc("Error code.")
181182
"x-ms-error-code"?: string,
182183

183184
@doc("The error code.")

specification/cognitiveservices/AnomalyDetector/univariate/routes.cadl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ user an overall status of the time series.
1818
""")
1919
// To improve CADL implementation apply: https://github.com/Azure/azure-rest-api-specs/issues/21527
2020
op DetectUnivariateEntireSeries(
21+
@doc("Method of univariate anomaly detection.")
2122
@body options: UnivariateDetectionOptions,
2223
): UnivariateEntireDetectionResult | AnomalyDetectorError;
2324

@@ -30,6 +31,7 @@ and based on all data to determine whether the last point is anomalous.
3031
""")
3132
// To improve CADL implementation apply: https://github.com/Azure/azure-rest-api-specs/issues/21527
3233
op DetectUnivariateLastPoint(
34+
@doc("Method of univariate anomaly detection.")
3335
@body options: UnivariateDetectionOptions,
3436
): UnivariateLastDetectionResult | AnomalyDetectorError;
3537

@@ -39,5 +41,6 @@ op DetectUnivariateLastPoint(
3941
@doc("Evaluate change point score of every series point")
4042
// To improve CADL implementation apply: https://github.com/Azure/azure-rest-api-specs/issues/21527
4143
op DetectUnivariateChangePoint(
44+
@doc("Method of univariate anomaly detection.")
4245
@body options: UnivariateChangePointDetectionOptions,
4346
): UnivariateChangePointDetectionResult | AnomalyDetectorError;

0 commit comments

Comments
 (0)