Skip to content

Commit 9281181

Browse files
committed
fix: disable metrics exporter to prevent RpcError
1 parent dab4f1e commit 9281181

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graphgen/engine.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def __init__(
2424

2525
# Disable Ray Data progress bars and verbose output
2626
os.environ.setdefault("RAY_DATA_DISABLE_PROGRESS_BARS", "1")
27+
# Disable metrics exporter to avoid RpcError
28+
os.environ.setdefault("RAY_DISABLE_IMPORTANT_WARNING", "1")
2729
try:
2830
from ray.data import DataContext
2931
ctx = DataContext.get_current()
@@ -33,6 +35,8 @@ def __init__(
3335
pass # Ray Data context might not be available
3436

3537
if not ray.is_initialized():
38+
# Disable metrics exporter to avoid RpcError
39+
ray_init_kwargs.setdefault("_metrics_export_port", 0)
3640
context = ray.init(
3741
ignore_reinit_error=True,
3842
logging_level=logging.ERROR,

0 commit comments

Comments
 (0)