Skip to content

Commit c9b065c

Browse files
feat: reduce ray logging (#126)
* feat: reduce ray logging * fix: reduce duplicate configs --------- Co-authored-by: chenzihong-gavin <[email protected]>
1 parent 658397d commit c9b065c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

graphgen/engine.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import ray
88
import ray.data
9+
from ray.data import DataContext
910

1011
from graphgen.bases import Config, Node
1112
from graphgen.utils import logger
@@ -20,6 +21,14 @@ def __init__(
2021
self.functions = functions
2122
self.datasets: Dict[str, ray.data.Dataset] = {}
2223

24+
ctx = DataContext.get_current()
25+
ctx.enable_rich_progress_bars = False
26+
ctx.use_ray_tqdm = False
27+
# Disable tensor extension casting to avoid conversion errors with complex types
28+
# (e.g., gene_synonyms, gene_names which are lists/arrays)
29+
ctx.enable_tensor_extension_casting = False
30+
ctx._metrics_export_port = 0 # Disable metrics exporter to avoid RpcError
31+
2332
if not ray.is_initialized():
2433
context = ray.init(
2534
ignore_reinit_error=True,

0 commit comments

Comments
 (0)