Skip to content

Commit 91f9ada

Browse files
Add FailedCategoryCount to ModelSizeStats (#4813) (#4825)
Relates: elastic/elasticsearch#55716, #4803 This commit adds FailedCategoryCount to ModelSizeStats and adds other missing fields to JobStats Co-authored-by: Russ Cam <russ.cam@elastic.co>
1 parent 7205e58 commit 91f9ada

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

src/Nest/XPack/MachineLearning/Job/Config/JobStats.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ public class JobStats
2626
[DataMember(Name = "data_counts")]
2727
public DataCounts DataCounts { get; internal set; }
2828

29+
/// <summary>
30+
/// Indicates that the process of deleting the job is in progress but not yet completed.
31+
/// It is only reported when true.
32+
/// </summary>
33+
[DataMember(Name = "deleting")]
34+
public bool? Deleting { get; internal set; }
35+
2936
/// <summary>
3037
/// Contains job statistics if job contains a forecast.
3138
/// </summary>
@@ -109,10 +116,23 @@ public class TimingStats
109116
/// <remarks>Valid in Elasticsearch 7.4.0+</remarks>
110117
[DataMember(Name = "exponential_average_bucket_processing_time_per_hour_ms")]
111118
public double ExponentialAverageBucketProcessingTimePerHourMilliseconds { get; internal set; }
119+
120+
/// <summary>
121+
/// Sum of all bucket processing times, in milliseconds.
122+
/// </summary>
123+
[DataMember(Name = "total_bucket_processing_time_ms")]
124+
public double TotalBucketProcessingTimeMilliseconds { get; internal set; }
112125
}
113126

114127
public class JobForecastStatistics
115128
{
129+
/// <summary>
130+
/// A value of 0 indicates that forecasts do not exist for this job.
131+
/// A value of 1 indicates that at least one forecast exists.
132+
/// </summary>
133+
[DataMember(Name = "forecasted_jobs")]
134+
public long ForecastedJobs { get; internal set; }
135+
116136
/// <summary>
117137
/// Statistics about the memory usage: minimum, maximum, average and total.
118138
/// </summary>

src/Nest/XPack/MachineLearning/Job/Process/ModelSizeStats.cs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,42 @@ public class ModelSizeStats
2121
[DataMember(Name = "bucket_allocation_failures_count")]
2222
public long BucketAllocationFailuresCount { get; internal set; }
2323

24+
/// <summary>
25+
/// The number of documents that have had a field categorized.
26+
/// </summary>
27+
[DataMember(Name = "categorized_doc_count")]
28+
public long CategorizedDocCount { get; internal set; }
29+
30+
/// <summary>
31+
/// The status of categorization for the job.
32+
/// </summary>
33+
[DataMember(Name = "categorization_status")]
34+
public ModelCategorizationStatus CategorizationStatus { get; internal set; }
35+
36+
/// <summary>
37+
/// The number of categories created by categorization that will never be assigned again because another
38+
/// category's definition makes it a superset of the dead category.
39+
/// (Dead categories are a side effect of the way categorization has no prior training.)
40+
/// </summary>
41+
[DataMember(Name = "dead_category_count")]
42+
public long DeadCategoryCount { get; internal set; }
43+
44+
/// <summary>
45+
/// The number of times that categorization wanted to create a new category but couldn't because the job had hit its model_memory_limit.
46+
/// This count does not track which specific categories failed to be created. Therefore you cannot use this value to determine
47+
/// the number of unique categories that were missed.
48+
/// <para />
49+
/// Available in Elasticsearch 7.8.0+
50+
/// </summary>
51+
[DataMember(Name = "failed_category_count")]
52+
public long FailedCategoryCount { get; internal set; }
53+
54+
/// <summary>
55+
/// The number of categories that match more than 1% of categorized documents.
56+
/// </summary>
57+
[DataMember(Name = "frequent_category_count")]
58+
public long FrequentCategoryCount { get; internal set; }
59+
2460
/// <summary>
2561
/// A unique identifier for the job.
2662
/// </summary>
@@ -47,6 +83,24 @@ public class ModelSizeStats
4783
[DataMember(Name = "model_bytes")]
4884
public long ModelBytes { get; internal set; }
4985

86+
/// <summary>
87+
/// The number of bytes over the high limit for memory usage at the last allocation failure.
88+
/// </summary>
89+
[DataMember(Name = "model_bytes_exceeded")]
90+
public long ModelBytesExceeded { get; internal set; }
91+
92+
/// <summary>
93+
/// The upper limit for model memory usage, checked on increasing values.
94+
/// </summary>
95+
[DataMember(Name = "model_bytes_memory_limit")]
96+
public long ModelBytesMemoryLimit { get; internal set; }
97+
98+
/// <summary>
99+
/// The number of categories that match just one categorized document.
100+
/// </summary>
101+
[DataMember(Name = "rare_category_count")]
102+
public long RareCategoryCount { get; internal set; }
103+
50104
/// <summary>
51105
/// For internal use. The type of result.
52106
/// </summary>
@@ -66,6 +120,12 @@ public class ModelSizeStats
66120
[DataMember(Name = "total_by_field_count")]
67121
public long TotalByFieldCount { get; internal set; }
68122

123+
/// <summary>
124+
/// The number of categories created by categorization.
125+
/// </summary>
126+
[DataMember(Name = "total_category_count")]
127+
public long TotalCategoryCount { get; internal set; }
128+
69129
/// <summary>
70130
/// The number of over field values that were analyzed by the models.
71131
/// </summary>

0 commit comments

Comments
 (0)