chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:17:40 +08:00
commit f1825c8ceb
10096 changed files with 2364182 additions and 0 deletions
@@ -0,0 +1,22 @@
import sys
import pytest
from ray.util import accelerators
from ray.util.annotations import RayDeprecationWarning
def test_accelerators():
assert accelerators.NVIDIA_TESLA_K80 == "K80"
assert accelerators.NVIDIA_A100 == "A100"
with pytest.raises(
AttributeError,
match="module 'ray.util.accelerators' has no attribute 'NVIDIA_INVALID'",
):
_ = accelerators.NVIDIA_INVALID
with pytest.warns(RayDeprecationWarning):
assert accelerators.NVIDIA_TESLA_A100 == "A100"
if __name__ == "__main__":
sys.exit(pytest.main(["-sv", __file__]))