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,25 @@
import sys
import unittest
class TestSoftImports(unittest.TestCase):
"""Tests whether it's possible to use Ray Tune without soft dependencies"""
def testSoftImports(self):
import ray.tune.schedulers # noqa: F401
from ray.tune.search import SEARCH_ALG_IMPORT
for name, import_func in SEARCH_ALG_IMPORT.items():
print(f"testing searcher {name}")
searcher = import_func()
# ensure that the dependencies aren't actually installed
if searcher and name not in ("variant_generator", "random"):
with self.assertRaises((AssertionError, ImportError)):
searcher()
if __name__ == "__main__":
import pytest
sys.exit(pytest.main(["-v", __file__]))