Closed
Description
Noticed in #29431 (comment)
In yield_namespace_device_dtype_combinations
, for array_api_strict
we yield CPU_DEVICE
first, then device1
. This results in the confusing pytest parametrization IDs:
array_api_strict-device2-float32
- where 'device2' actually refers toDevice("device1")
and notDevice("device2")
array_api_strict-device1-float64
- where 'device1' actually refers toDevice("CPU_DEVICE")
and notDevice("device1")
Not sure if there is an good fix for this / or if a fix is needed.
We could yield Device("device1")
first but then the id "device2" would refer to Device("CPU_DEVICE")
and not Device("device2")
The only way to completely avoid confusion would be to write a function that takes a params and amends the names e.g.,
@pytest.mark.parametrize(
"namespace,device,dtype",
list(yield_namespace_device_dtype_combinations()),
ids=_get_namespace_device_dtype_test_ids
)
The BUT I am not sure if this is an over complicated solution to a trivial problem...
(Edit: We could just make a note in the yield_namespace_device_dtype_combinations
docstring - this seems like a reasonable solution...)
Metadata
Metadata
Assignees
Labels
No labels