@@ -331,8 +331,14 @@ def _check_problem_definition_sample_features(
331331 """Instantiate and validate one problem-definition sample view.
332332
333333 The sample is instantiated with the exact feature subset requested by the
334- problem definition, then each requested feature is read back and checked for
335- invalid content (None, NaN, Inf, empty arrays, object arrays containing None).
334+ problem definition, then each requested feature is read back to validate
335+ that the requested feature paths can actually be resolved.
336+
337+ Numeric content (NaN, Inf, None, empty arrays, ...) is intentionally not
338+ re-checked here: the per-split loop in :func:`check_dataset` already walks
339+ every sample's globals and fields and reports such issues with the
340+ ``INVALID_DATA_VALUE A`` code. Re-checking them in this loop would only
341+ produce duplicate warnings under a different code/location.
336342
337343 Args:
338344 pb_name: Problem-definition name.
@@ -358,24 +364,14 @@ def _check_problem_definition_sample_features(
358364
359365 for feature in features :
360366 try :
361- value = sample .get_feature_by_path (feature )
367+ sample .get_feature_by_path (feature )
362368 except Exception as exc :
363369 report .add (
364370 "error" ,
365371 "PB_DEF_FEATURE_READ_ERROR" ,
366372 f"{ location } { feature } " ,
367373 str (exc ),
368374 )
369- continue
370-
371- issue = _check_numeric_content (value )
372- if issue is not None :
373- report .add (
374- "warning" ,
375- "PB_DEF_INVALID_FEATURE_VALUE" ,
376- f"{ location } { feature } " ,
377- issue ,
378- )
379375
380376
381377def compute_checksum (sample : Any ) -> str :
0 commit comments