Skip to content

Commit 14b501a

Browse files
committed
🐛 fix enable_profiling which did not set RAY_task_events_report_interval_ms=0
1 parent 1b42e1b commit 14b501a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dagster_ray/_base/resources.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class BaseRayResource(ConfigurableResource, ABC):
4242
)
4343
enable_tracing: bool = Field(
4444
default=False,
45-
description="Enable tracing: inject `RAY_PROFILING=1` into the Ray cluster configuration. Learn more: https://docs.ray.io/en/latest/ray-core/api/doc/ray.timeline.html#ray-timeline",
45+
description="Enable tracing: inject `RAY_PROFILING=1` and `RAY_task_events_report_interval_ms=0` into the Ray cluster configuration. This allows using `ray.timeline()` to fetch recorded task events. Learn more: https://docs.ray.io/en/latest/ray-core/api/doc/ray.timeline.html#ray-timeline",
4646
)
4747
enable_actor_task_logging: bool = Field(
4848
default=False,
@@ -132,6 +132,7 @@ def get_env_vars_to_inject(self) -> dict[str, str]:
132132
vars["RAY_DEBUG_POST_MORTEM"] = "1"
133133
if self.enable_tracing:
134134
vars["RAY_PROFILING"] = "1"
135+
vars["RAY_task_events_report_interval_ms"] = "0"
135136
if self.enable_actor_task_logging:
136137
vars["RAY_ENABLE_RECORD_ACTOR_TASK_LOGGING"] = "1"
137138
return vars

0 commit comments

Comments
 (0)