idacy commited on
Commit
eab38f0
·
verified ·
1 Parent(s): c789799

Use plain-language live input warnings

Browse files
src/datacenter_verification_api/feature_completion.py CHANGED
@@ -285,10 +285,19 @@ def complete_features(
285
  capacity = number_or_none(out.get("o1_normalized_h100e_capacity"))
286
  fabric = number_or_none(out.get("o7_synchronized_fabric_footprint"))
287
  if capacity is not None and allocation is not None and allocation > capacity + 1:
288
- warnings.append("allocated GPUs exceed monitored H100e capacity")
 
 
 
289
  if capacity is not None and fabric is not None and fabric > capacity + 1:
290
- warnings.append("fabric footprint exceeds monitored H100e capacity")
 
 
 
291
  if allocation is not None and allocation > 0 and fabric is not None and fabric > allocation + 1:
292
- warnings.append("fabric footprint exceeds allocated GPUs")
 
 
 
293
 
294
  return out, warnings
 
285
  capacity = number_or_none(out.get("o1_normalized_h100e_capacity"))
286
  fabric = number_or_none(out.get("o7_synchronized_fabric_footprint"))
287
  if capacity is not None and allocation is not None and allocation > capacity + 1:
288
+ warnings.append(
289
+ "The allocated GPU count is higher than this site's monitored GPU capacity. "
290
+ "Lower allocated GPUs or choose a higher-capacity site."
291
+ )
292
  if capacity is not None and fabric is not None and fabric > capacity + 1:
293
+ warnings.append(
294
+ "The network fabric size is higher than this site's monitored GPU capacity. "
295
+ "Lower fabric footprint or choose a higher-capacity site."
296
+ )
297
  if allocation is not None and allocation > 0 and fabric is not None and fabric > allocation + 1:
298
+ warnings.append(
299
+ "The network fabric size is higher than the allocated GPU count. "
300
+ "Lower fabric footprint or raise allocated GPUs."
301
+ )
302
 
303
  return out, warnings
src/datacenter_verification_api/model_service.py CHANGED
@@ -177,7 +177,10 @@ class ModelService:
177
  if request.feature_row_id:
178
  base_row = self.feature_lookup.get(request.feature_row_id)
179
  if base_row is None:
180
- warnings.append(f"feature_row_id not found in base lookup: {request.feature_row_id}")
 
 
 
181
 
182
  row: dict[str, Any]
183
  has_base_row = base_row is not None
@@ -200,7 +203,7 @@ class ModelService:
200
  if key in KNOWN_NON_MODEL_METADATA_FIELDS:
201
  debug_warnings.append(f"{source_name} field is metadata-only and was not sent to the model: {key}")
202
  elif key not in self.feature_columns:
203
- warnings.append(f"{source_name} field is not a model feature and was kept only as metadata: {key}")
204
 
205
  for column in self.feature_columns:
206
  row.setdefault(column, None)
@@ -217,7 +220,8 @@ class ModelService:
217
  null_count = sum(1 for column in self.feature_columns if row.get(column) is None)
218
  if null_count > len(self.feature_columns) // 3:
219
  warnings.append(
220
- f"no base row supplied; {null_count} of {len(self.feature_columns)} model features are null"
 
221
  )
222
 
223
  return row, warnings, debug_warnings
 
177
  if request.feature_row_id:
178
  base_row = self.feature_lookup.get(request.feature_row_id)
179
  if base_row is None:
180
+ warnings.append(
181
+ "The selected datapoint was not found in the live API reference table. "
182
+ "Live scoring may be less reliable because many model inputs may be missing."
183
+ )
184
 
185
  row: dict[str, Any]
186
  has_base_row = base_row is not None
 
203
  if key in KNOWN_NON_MODEL_METADATA_FIELDS:
204
  debug_warnings.append(f"{source_name} field is metadata-only and was not sent to the model: {key}")
205
  elif key not in self.feature_columns:
206
+ warnings.append(f"The live API ignored an unrecognized input field: {key}")
207
 
208
  for column in self.feature_columns:
209
  row.setdefault(column, None)
 
220
  null_count = sum(1 for column in self.feature_columns if row.get(column) is None)
221
  if null_count > len(self.feature_columns) // 3:
222
  warnings.append(
223
+ f"The live API is missing {null_count} of {len(self.feature_columns)} model inputs. "
224
+ "Choose a sampled datapoint before editing controls for a more reliable live score."
225
  )
226
 
227
  return row, warnings, debug_warnings