mirror of
https://github.com/wassname/ray.git
synced 2026-08-08 11:25:28 +08:00
Add ray.util package and move libraries from experimental (#7100)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
import pytest
|
||||
|
||||
import ray
|
||||
from ray import serve
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def serve_instance():
|
||||
_, new_db_path = tempfile.mkstemp(suffix=".test.db")
|
||||
serve.init(
|
||||
kv_store_path=new_db_path,
|
||||
blocking=True,
|
||||
ray_init_kwargs={"num_cpus": 36})
|
||||
yield
|
||||
os.remove(new_db_path)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def ray_instance():
|
||||
ray_already_initialized = ray.is_initialized()
|
||||
if not ray_already_initialized:
|
||||
ray.init(object_store_memory=int(1e8))
|
||||
yield
|
||||
if not ray_already_initialized:
|
||||
ray.shutdown()
|
||||
Reference in New Issue
Block a user