Repository navigation
Conversation
pcmoritz
pushed a commit
that referenced
this pull request
Nov 19, 2016
Tuple keys in dicts can be serialized
richardliaw
referenced
this pull request
in richardliaw/ray
Oct 4, 2017
(redo of #4 which was dropped)
simon-mo
referenced
this pull request
in simon-mo/ray
Mar 16, 2018
* changes to min/max dataframes functions * max/min now return a Series - fixed tests to check equality in pandas series objects * added error checking for axis in min and max * updated error checking for axis in min/max
devin-petersohn
referenced
this pull request
in devin-petersohn/ray
Mar 28, 2018
* changes to min/max dataframes functions * max/min now return a Series - fixed tests to check equality in pandas series objects * added error checking for axis in min and max * updated error checking for axis in min/max
ericl
pushed a commit
that referenced
this pull request
Mar 29, 2019
romilbhardwaj
added a commit
to romilbhardwaj/ray
that referenced
this pull request
Apr 8, 2019
� This is the 1st commit message: Rounding error fixes, removing cpu addition in cython and test fixes. � This is the commit message ray-project#2: Plumbing and support for dynamic custom resources. � This is the commit message ray-project#3: update cluster utils to use EntryType. � This is the commit message ray-project#4: Update node_manager to use new zero resource == deletion semantics.
rkooo567
referenced
this pull request
in rkooo567/ray
Mar 24, 2020
[Hosted Dashboard] Persist data to S3
bentzinir
pushed a commit
to bentzinir/ray
that referenced
this pull request
Jul 29, 2020
1 of 2 tasks
kfstorm
added a commit
that referenced
this pull request
Jul 27, 2022
We encountered SIGSEGV when running Python test `python/ray/tests/test_failure_2.py::test_list_named_actors_timeout`. The stack is: ``` #0 0x00007fffed30f393 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /lib64/libstdc++.so.6 #1 0x00007fffee707649 in ray::RayLog::GetLoggerName() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so #2 0x00007fffee70aa90 in ray::SpdLogMessage::Flush() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so #3 0x00007fffee70af28 in ray::RayLog::~RayLog() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so #4 0x00007fffee2b570d in ray::asio::testing::(anonymous namespace)::DelayManager::Init() [clone .constprop.0] () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so #5 0x00007fffedd0d95a in _GLOBAL__sub_I_asio_chaos.cc () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so #6 0x00007ffff7fe282a in call_init.part () from /lib64/ld-linux-x86-64.so.2 #7 0x00007ffff7fe2931 in _dl_init () from /lib64/ld-linux-x86-64.so.2 #8 0x00007ffff7fe674c in dl_open_worker () from /lib64/ld-linux-x86-64.so.2 #9 0x00007ffff7b82e79 in _dl_catch_exception () from /lib64/libc.so.6 #10 0x00007ffff7fe5ffe in _dl_open () from /lib64/ld-linux-x86-64.so.2 #11 0x00007ffff7d5f39c in dlopen_doit () from /lib64/libdl.so.2 #12 0x00007ffff7b82e79 in _dl_catch_exception () from /lib64/libc.so.6 #13 0x00007ffff7b82f13 in _dl_catch_error () from /lib64/libc.so.6 #14 0x00007ffff7d5fb09 in _dlerror_run () from /lib64/libdl.so.2 #15 0x00007ffff7d5f42a in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2 #16 0x00007fffef04d330 in py_dl_open (self=<optimized out>, args=<optimized out>) at /tmp/python-build.20220507135524.257789/Python-3.7.11/Modules/_ctypes/callproc.c:1369 ``` The root cause is that when loading `_raylet.so`, `static DelayManager _delay_manager` is initialized and `RAY_LOG(ERROR) << "RAY_testing_asio_delay_us is set to " << delay_env;` is executed. However, the static variables declared in `logging.cc` are not initialized yet (in this case, `std::string RayLog::logger_name_ = "ray_log_sink"`). It's better not to rely on the initialization order of static variables in different compilation units because it's not guaranteed. I propose to change all `RAY_LOG`s to `std::cerr` in `DelayManager::Init()`. The crash happens in Ant's internal codebase. Not sure why this test case passes in the community version though. BTW, I've tried different approaches: 1. Using a static local variable in `get_delay_us` and remove the global variable. This doesn't work because `init()` needs to access the variable as well. 2. Defining the global variable as type `std::unique_ptr<DelayManager>` and initialize it in `get_delay_us`. This works but it requires a lock to be thread-safe.
Rohan138
pushed a commit
to Rohan138/ray
that referenced
this pull request
Jul 28, 2022
We encountered SIGSEGV when running Python test `python/ray/tests/test_failure_2.py::test_list_named_actors_timeout`. The stack is: ``` #0 0x00007fffed30f393 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /lib64/libstdc++.so.6 ray-project#1 0x00007fffee707649 in ray::RayLog::GetLoggerName() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#2 0x00007fffee70aa90 in ray::SpdLogMessage::Flush() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#3 0x00007fffee70af28 in ray::RayLog::~RayLog() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#4 0x00007fffee2b570d in ray::asio::testing::(anonymous namespace)::DelayManager::Init() [clone .constprop.0] () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#5 0x00007fffedd0d95a in _GLOBAL__sub_I_asio_chaos.cc () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#6 0x00007ffff7fe282a in call_init.part () from /lib64/ld-linux-x86-64.so.2 ray-project#7 0x00007ffff7fe2931 in _dl_init () from /lib64/ld-linux-x86-64.so.2 ray-project#8 0x00007ffff7fe674c in dl_open_worker () from /lib64/ld-linux-x86-64.so.2 ray-project#9 0x00007ffff7b82e79 in _dl_catch_exception () from /lib64/libc.so.6 ray-project#10 0x00007ffff7fe5ffe in _dl_open () from /lib64/ld-linux-x86-64.so.2 ray-project#11 0x00007ffff7d5f39c in dlopen_doit () from /lib64/libdl.so.2 ray-project#12 0x00007ffff7b82e79 in _dl_catch_exception () from /lib64/libc.so.6 ray-project#13 0x00007ffff7b82f13 in _dl_catch_error () from /lib64/libc.so.6 ray-project#14 0x00007ffff7d5fb09 in _dlerror_run () from /lib64/libdl.so.2 ray-project#15 0x00007ffff7d5f42a in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2 ray-project#16 0x00007fffef04d330 in py_dl_open (self=<optimized out>, args=<optimized out>) at /tmp/python-build.20220507135524.257789/Python-3.7.11/Modules/_ctypes/callproc.c:1369 ``` The root cause is that when loading `_raylet.so`, `static DelayManager _delay_manager` is initialized and `RAY_LOG(ERROR) << "RAY_testing_asio_delay_us is set to " << delay_env;` is executed. However, the static variables declared in `logging.cc` are not initialized yet (in this case, `std::string RayLog::logger_name_ = "ray_log_sink"`). It's better not to rely on the initialization order of static variables in different compilation units because it's not guaranteed. I propose to change all `RAY_LOG`s to `std::cerr` in `DelayManager::Init()`. The crash happens in Ant's internal codebase. Not sure why this test case passes in the community version though. BTW, I've tried different approaches: 1. Using a static local variable in `get_delay_us` and remove the global variable. This doesn't work because `init()` needs to access the variable as well. 2. Defining the global variable as type `std::unique_ptr<DelayManager>` and initialize it in `get_delay_us`. This works but it requires a lock to be thread-safe. Signed-off-by: Rohan138 <[email protected]>
Stefan-1313
pushed a commit
to Stefan-1313/ray_mod
that referenced
this pull request
Aug 18, 2022
We encountered SIGSEGV when running Python test `python/ray/tests/test_failure_2.py::test_list_named_actors_timeout`. The stack is: ``` #0 0x00007fffed30f393 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /lib64/libstdc++.so.6 ray-project#1 0x00007fffee707649 in ray::RayLog::GetLoggerName() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#2 0x00007fffee70aa90 in ray::SpdLogMessage::Flush() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#3 0x00007fffee70af28 in ray::RayLog::~RayLog() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#4 0x00007fffee2b570d in ray::asio::testing::(anonymous namespace)::DelayManager::Init() [clone .constprop.0] () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#5 0x00007fffedd0d95a in _GLOBAL__sub_I_asio_chaos.cc () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so ray-project#6 0x00007ffff7fe282a in call_init.part () from /lib64/ld-linux-x86-64.so.2 ray-project#7 0x00007ffff7fe2931 in _dl_init () from /lib64/ld-linux-x86-64.so.2 ray-project#8 0x00007ffff7fe674c in dl_open_worker () from /lib64/ld-linux-x86-64.so.2 ray-project#9 0x00007ffff7b82e79 in _dl_catch_exception () from /lib64/libc.so.6 ray-project#10 0x00007ffff7fe5ffe in _dl_open () from /lib64/ld-linux-x86-64.so.2 ray-project#11 0x00007ffff7d5f39c in dlopen_doit () from /lib64/libdl.so.2 ray-project#12 0x00007ffff7b82e79 in _dl_catch_exception () from /lib64/libc.so.6 ray-project#13 0x00007ffff7b82f13 in _dl_catch_error () from /lib64/libc.so.6 ray-project#14 0x00007ffff7d5fb09 in _dlerror_run () from /lib64/libdl.so.2 ray-project#15 0x00007ffff7d5f42a in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2 ray-project#16 0x00007fffef04d330 in py_dl_open (self=<optimized out>, args=<optimized out>) at /tmp/python-build.20220507135524.257789/Python-3.7.11/Modules/_ctypes/callproc.c:1369 ``` The root cause is that when loading `_raylet.so`, `static DelayManager _delay_manager` is initialized and `RAY_LOG(ERROR) << "RAY_testing_asio_delay_us is set to " << delay_env;` is executed. However, the static variables declared in `logging.cc` are not initialized yet (in this case, `std::string RayLog::logger_name_ = "ray_log_sink"`). It's better not to rely on the initialization order of static variables in different compilation units because it's not guaranteed. I propose to change all `RAY_LOG`s to `std::cerr` in `DelayManager::Init()`. The crash happens in Ant's internal codebase. Not sure why this test case passes in the community version though. BTW, I've tried different approaches: 1. Using a static local variable in `get_delay_us` and remove the global variable. This doesn't work because `init()` needs to access the variable as well. 2. Defining the global variable as type `std::unique_ptr<DelayManager>` and initialize it in `get_delay_us`. This works but it requires a lock to be thread-safe. Signed-off-by: Stefan van der Kleij <[email protected]>
jianoaix
added a commit
to jianoaix/ray
that referenced
this pull request
Feb 28, 2023
ericl
pushed a commit
that referenced
this pull request
Mar 1, 2023
ProjectsByJackHe
pushed a commit
to ProjectsByJackHe/ray
that referenced
this pull request
Mar 21, 2023
Signed-off-by: Jack He <[email protected]>
peytondmurray
referenced
this pull request
in peytondmurray/ray
Mar 22, 2023
elliottower
pushed a commit
to elliottower/ray
that referenced
this pull request
Apr 22, 2023
Signed-off-by: elliottower <[email protected]>
MengjinYan
pushed a commit
that referenced
this pull request
Feb 28, 2026
## Description
grpc 1.57.1 will call `GetEnv("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG")`
on every grpc channel establishment for parsing load-balancing policy.
This causes race conditions between user tasks as they are allowed to do
setenv at anytime. This PR upgrades the grpc lib to 1.58.0 to get rid of
the `GetEnv("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG")`.
```
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=11, threadid=129183804413504) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=11, threadid=129183804413504) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=129183804413504, signo=signo@entry=11) at ./nptl/pthread_kill.c:89
#3 0x00007580a7545476 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#4 <signal handler called>
#5 __pthread_kill_implementation (no_tid=0, signo=11, threadid=129183804413504) at ./nptl/pthread_kill.c:44
#6 __pthread_kill_internal (signo=11, threadid=129183804413504) at ./nptl/pthread_kill.c:78
#7 __GI___pthread_kill (threadid=129183804413504, signo=signo@entry=11) at ./nptl/pthread_kill.c:89
#8 0x00007580a7545476 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#9 <signal handler called>
#10 __GI_getenv (name=0x7580a6a078c2 "PC_EXPERIMENTAL_PICKFIRST_LB_CONFIG") at ./stdlib/getenv.c:84
#11 0x00007580a67e8b8a in grpc_core::GetEnv(char const*) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#12 0x00007580a649601f in grpc_core::ShufflePickFirstEnabled() () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#13 0x00007580a64960ed in grpc_core::json_detail::FinishedJsonObjectLoader<grpc_core::(anonymous namespace)::PickFirstConfig, 1ul, void>::LoadInto(grpc_core::experimental::Json const&, grpc_core::JsonArgs const&, void*, grpc_core::ValidationErrors*) const () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#14 0x00007580a6787384 in grpc_core::json_detail::LoadWrapped::LoadInto(grpc_core::experimental::Json const&, grpc_core::JsonArgs const&, void*, grpc_core::ValidationErrors*) const ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#15 0x00007580a6497b07 in grpc_core::(anonymous namespace)::PickFirstFactory::ParseLoadBalancingConfig(grpc_core::experimental::Json const&) const ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#16 0x00007580a67c18a7 in grpc_core::LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(grpc_core::experimental::Json const&) const ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#17 0x00007580a66ad9b8 in grpc_core::ClientChannel::OnResolverResultChangedLocked(grpc_core::Resolver::Result) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#18 0x00007580a66ae452 in grpc_core::ClientChannel::ResolverResultHandler::ReportResult(grpc_core::Resolver::Result) ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#19 0x00007580a63bc603 in grpc_core::PollingResolver::OnRequestCompleteLocked(grpc_core::Resolver::Result) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#20 0x00007580a63bcb2d in std::_Function_handler<void (), grpc_core::PollingResolver::OnRequestComplete(grpc_core::Resolver::Result)::{lambda()#1}>::_M_invoke(std::_Any_data const&)
() from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#21 0x00007580a67cbf46 in grpc_core::WorkSerializer::WorkSerializerImpl::Run(std::function<void ()>, grpc_core::DebugLocation const&) ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#22 0x00007580a67cc0ea in grpc_core::WorkSerializer::Run(std::function<void ()>, grpc_core::DebugLocation const&) ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#23 0x00007580a63bd117 in grpc_core::PollingResolver::OnRequestComplete(grpc_core::Resolver::Result) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#24 0x00007580a63b3f86 in grpc_core::(anonymous namespace)::AresClientChannelDNSResolver::AresRequestWrapper::OnHostnameResolved(void*, absl::lts_20230802::Status) ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#25 0x00007580a67c44c4 in grpc_core::ExecCtx::Flush() () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#26 0x00007580a63408a2 in grpc_core::ExecCtx::~ExecCtx() () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#27 0x00007580a6740343 in grpc_call_start_batch () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#28 0x00007580a5e281e9 in grpc::internal::CallOpSet<grpc::internal::CallOpSendInitialMetadata, grpc::internal::CallOpSendMessage, grpc::internal::CallOpRecvInitialMetadata, grpc::internal::CallOpRecvMessage<google::protobuf::MessageLite>, grpc::internal::CallOpClientSendClose, grpc::internal::CallOpClientRecvStatus>::ContinueFillOpsAfterInterception() ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#29 0x00007580a5e2d809 in grpc::internal::BlockingUnaryCallImpl<google::protobuf::MessageLite, google::protobuf::MessageLite>::BlockingUnaryCallImpl(grpc::ChannelInterface*, grpc::inte--Type <RET> for more, q to quit, c to continue without paging--c
rnal::RpcMethod const&, grpc::ClientContext*, google::protobuf::MessageLite const&, google::protobuf::MessageLite*) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#30 0x00007580a62d76ea in opentelemetry::proto::collector::metrics::v1::MetricsService::Stub::Export(grpc::ClientContext*, opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceRequest const&, opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceResponse*) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#31 0x00007580a62ca40c in opentelemetry::v1::exporter::otlp::OtlpGrpcClient::DelegateExport(opentelemetry::proto::collector::metrics::v1::MetricsService::StubInterface*, std::unique_ptr<grpc::ClientContext, std::default_delete<grpc::ClientContext> >&&, std::unique_ptr<google::protobuf::Arena, std::default_delete<google::protobuf::Arena> >&&, opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceRequest&&, opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceResponse*) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#32 0x00007580a62c23ed in opentelemetry::v1::exporter::otlp::OtlpGrpcMetricExporter::Export(opentelemetry::v1::sdk::metrics::ResourceMetrics const&) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#33 0x00007580a62c0334 in (anonymous namespace)::OpenTelemetryMetricExporter::Export(opentelemetry::v1::sdk::metrics::ResourceMetrics const&) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#34 0x00007580a62e5fdf in opentelemetry::v1::sdk::metrics::PeriodicExportingMetricReader::CollectAndExportOnce()::{lambda()#1}::operator()() const::{lambda(opentelemetry::v1::sdk::metrics::ResourceMetrics&)#1}::operator()(opentelemetry::v1::sdk::metrics::ResourceMetrics&) const () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#35 0x00007580a62ee7a6 in opentelemetry::v1::sdk::metrics::MetricReader::Collect(opentelemetry::v1::nostd::function_ref<bool (opentelemetry::v1::sdk::metrics::ResourceMetrics&)>) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#36 0x00007580a62e5085 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<opentelemetry::v1::sdk::metrics::PeriodicExportingMetricReader::CollectAndExportOnce()::{lambda()#1}> > >::_M_run() () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#37 0x00007580a6997be0 in execute_native_thread_routine () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#38 0x00007580a7597ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#39 0x00007580a76298d0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
```
Signed-off-by: Rueian Huang <[email protected]>
kamil-kaczmarek
pushed a commit
that referenced
this pull request
Mar 3, 2026
## Description
grpc 1.57.1 will call `GetEnv("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG")`
on every grpc channel establishment for parsing load-balancing policy.
This causes race conditions between user tasks as they are allowed to do
setenv at anytime. This PR upgrades the grpc lib to 1.58.0 to get rid of
the `GetEnv("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG")`.
```
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=11, threadid=129183804413504) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=11, threadid=129183804413504) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=129183804413504, signo=signo@entry=11) at ./nptl/pthread_kill.c:89
#3 0x00007580a7545476 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#4 <signal handler called>
#5 __pthread_kill_implementation (no_tid=0, signo=11, threadid=129183804413504) at ./nptl/pthread_kill.c:44
#6 __pthread_kill_internal (signo=11, threadid=129183804413504) at ./nptl/pthread_kill.c:78
#7 __GI___pthread_kill (threadid=129183804413504, signo=signo@entry=11) at ./nptl/pthread_kill.c:89
#8 0x00007580a7545476 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#9 <signal handler called>
#10 __GI_getenv (name=0x7580a6a078c2 "PC_EXPERIMENTAL_PICKFIRST_LB_CONFIG") at ./stdlib/getenv.c:84
#11 0x00007580a67e8b8a in grpc_core::GetEnv(char const*) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#12 0x00007580a649601f in grpc_core::ShufflePickFirstEnabled() () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#13 0x00007580a64960ed in grpc_core::json_detail::FinishedJsonObjectLoader<grpc_core::(anonymous namespace)::PickFirstConfig, 1ul, void>::LoadInto(grpc_core::experimental::Json const&, grpc_core::JsonArgs const&, void*, grpc_core::ValidationErrors*) const () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#14 0x00007580a6787384 in grpc_core::json_detail::LoadWrapped::LoadInto(grpc_core::experimental::Json const&, grpc_core::JsonArgs const&, void*, grpc_core::ValidationErrors*) const ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#15 0x00007580a6497b07 in grpc_core::(anonymous namespace)::PickFirstFactory::ParseLoadBalancingConfig(grpc_core::experimental::Json const&) const ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#16 0x00007580a67c18a7 in grpc_core::LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(grpc_core::experimental::Json const&) const ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#17 0x00007580a66ad9b8 in grpc_core::ClientChannel::OnResolverResultChangedLocked(grpc_core::Resolver::Result) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#18 0x00007580a66ae452 in grpc_core::ClientChannel::ResolverResultHandler::ReportResult(grpc_core::Resolver::Result) ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#19 0x00007580a63bc603 in grpc_core::PollingResolver::OnRequestCompleteLocked(grpc_core::Resolver::Result) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#20 0x00007580a63bcb2d in std::_Function_handler<void (), grpc_core::PollingResolver::OnRequestComplete(grpc_core::Resolver::Result)::{lambda()#1}>::_M_invoke(std::_Any_data const&)
() from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#21 0x00007580a67cbf46 in grpc_core::WorkSerializer::WorkSerializerImpl::Run(std::function<void ()>, grpc_core::DebugLocation const&) ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#22 0x00007580a67cc0ea in grpc_core::WorkSerializer::Run(std::function<void ()>, grpc_core::DebugLocation const&) ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#23 0x00007580a63bd117 in grpc_core::PollingResolver::OnRequestComplete(grpc_core::Resolver::Result) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#24 0x00007580a63b3f86 in grpc_core::(anonymous namespace)::AresClientChannelDNSResolver::AresRequestWrapper::OnHostnameResolved(void*, absl::lts_20230802::Status) ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#25 0x00007580a67c44c4 in grpc_core::ExecCtx::Flush() () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#26 0x00007580a63408a2 in grpc_core::ExecCtx::~ExecCtx() () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#27 0x00007580a6740343 in grpc_call_start_batch () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#28 0x00007580a5e281e9 in grpc::internal::CallOpSet<grpc::internal::CallOpSendInitialMetadata, grpc::internal::CallOpSendMessage, grpc::internal::CallOpRecvInitialMetadata, grpc::internal::CallOpRecvMessage<google::protobuf::MessageLite>, grpc::internal::CallOpClientSendClose, grpc::internal::CallOpClientRecvStatus>::ContinueFillOpsAfterInterception() ()
from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#29 0x00007580a5e2d809 in grpc::internal::BlockingUnaryCallImpl<google::protobuf::MessageLite, google::protobuf::MessageLite>::BlockingUnaryCallImpl(grpc::ChannelInterface*, grpc::inte--Type <RET> for more, q to quit, c to continue without paging--c
rnal::RpcMethod const&, grpc::ClientContext*, google::protobuf::MessageLite const&, google::protobuf::MessageLite*) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#30 0x00007580a62d76ea in opentelemetry::proto::collector::metrics::v1::MetricsService::Stub::Export(grpc::ClientContext*, opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceRequest const&, opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceResponse*) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#31 0x00007580a62ca40c in opentelemetry::v1::exporter::otlp::OtlpGrpcClient::DelegateExport(opentelemetry::proto::collector::metrics::v1::MetricsService::StubInterface*, std::unique_ptr<grpc::ClientContext, std::default_delete<grpc::ClientContext> >&&, std::unique_ptr<google::protobuf::Arena, std::default_delete<google::protobuf::Arena> >&&, opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceRequest&&, opentelemetry::proto::collector::metrics::v1::ExportMetricsServiceResponse*) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#32 0x00007580a62c23ed in opentelemetry::v1::exporter::otlp::OtlpGrpcMetricExporter::Export(opentelemetry::v1::sdk::metrics::ResourceMetrics const&) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#33 0x00007580a62c0334 in (anonymous namespace)::OpenTelemetryMetricExporter::Export(opentelemetry::v1::sdk::metrics::ResourceMetrics const&) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#34 0x00007580a62e5fdf in opentelemetry::v1::sdk::metrics::PeriodicExportingMetricReader::CollectAndExportOnce()::{lambda()#1}::operator()() const::{lambda(opentelemetry::v1::sdk::metrics::ResourceMetrics&)#1}::operator()(opentelemetry::v1::sdk::metrics::ResourceMetrics&) const () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#35 0x00007580a62ee7a6 in opentelemetry::v1::sdk::metrics::MetricReader::Collect(opentelemetry::v1::nostd::function_ref<bool (opentelemetry::v1::sdk::metrics::ResourceMetrics&)>) () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#36 0x00007580a62e5085 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<opentelemetry::v1::sdk::metrics::PeriodicExportingMetricReader::CollectAndExportOnce()::{lambda()#1}> > >::_M_run() () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#37 0x00007580a6997be0 in execute_native_thread_routine () from /home/ray/anaconda3/lib/python3.10/site-packages/ray/_raylet.so
#38 0x00007580a7597ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#39 0x00007580a76298d0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
```
Signed-off-by: Rueian Huang <[email protected]>
Signed-off-by: Kamil Kaczmarek <[email protected]>
jhasm
added a commit
to jhasm/ray
that referenced
this pull request
May 13, 2026
Adds a self-contained doc + patch pair so other macOS contributors can
reproduce the build/test workflow used for this branch:
rep-64-poc/MACOS_DEV_SETUP.md — narrative: what changed, why, how
to apply, how to verify
rep-64-poc/macos-dev.patch — git diff of the six local changes,
apply with `git apply`, revert
before pushing
The code changes themselves are intentionally not committed: Ray's
supported build target is Linux, and four of the six are general macOS
portability fixes that belong in a separate upstream-facing PR rather
than this POC branch.
Updates EVIDENCE.md (executive summary finding ray-project#4, substrate matrix,
follow-up ray-project#6) to reflect that the macOS dev workflow is now green —
build, editable install, and `pytest python/ray/tests/test_basic.py`
all succeed on macOS arm64. Substrate-evidence runs (Phases 1/4/7/8)
on APFS / F_FULLFSYNC remain pending; this work unblocks them but does
not perform them.
Signed-off-by: Santosh Jha <[email protected]>
jhasm
added a commit
to jhasm/ray
that referenced
this pull request
May 13, 2026
Specifies a two-tier (kind + external cluster) reproducible test harness covering COLLABORATORS.md items #1, ray-project#4, ray-project#5, ray-project#6, ray-project#8. All cluster-specific values live in env-file profiles; scripts are cluster-agnostic. Default remote image is the public ghcr.io/jhasm/ray-rocksdb-poc:rep-64-poc. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: Santosh Jha <[email protected]>
jhasm
added a commit
to jhasm/ray
that referenced
this pull request
May 13, 2026
Phases A-D in detail (kind tier, end-to-end on a developer machine); Phases E-F outlined as a follow-on plan once kind tier is green. Covers COLLABORATORS.md items #1, ray-project#4 (partial — fsync probe), ray-project#5 (with inmem baseline), ray-project#6. Item ray-project#8 stubbed pending image-bundling of storage_microbench. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: Santosh Jha <[email protected]>
ShockYoungCHN
pushed a commit
to ShockYoungCHN/ray
that referenced
this pull request
Jun 4, 2026
- Methodology: add the corrected throughput model — shuffle barrier makes it total ≈ T(read+map) + T(reduce+write) (not one overlapped min()); include WRITE as a stage; ceiling = current binding stage, so speeding up any binding stage raises GB/s by ~its time-share. 512GB shares: phase1 ~51% (read-bound), phase2 ~47% (reduce restore ~10-16% + write). - Methodology: add "Reduce restore path — inefficiencies & fixes" section (no fetch/decode overlap, batch=16 pull window, head-of-line blocking, max_io_workers=4, write/read fusing asymmetry, tiny shards) with file:line refs and the ray-project#1+ray-project#4 high-impact combo. - design plot: annotate shuffle barrier + PHASE 1/2 brackets and shares. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
ShockYoungCHN
pushed a commit
to ShockYoungCHN/ray
that referenced
this pull request
Jun 4, 2026
Confirmed this cluster (m5.2xlarge, root nvme0n1 = "Amazon Elastic Block Store", no instance store) spills to EBS. Measured ~600 MB/s/node = m5.2xlarge instance EBS bandwidth cap (~593 MB/s), not NVMe. So fix ray-project#4 "raise max_io_workers" does NOT apply here: 4 workers already saturate the EBS pipe. Make the reduce-restore fix backend-aware (NVMe = raise concurrency; EBS = bandwidth-capped, use instance-store NVMe / spill less; S3 = latency-bound, raise concurrency + batch restore). Note the page-cache spill_throughput_mb metric hides the real EBS rate. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
4 tasks
ArturNiederfahrenhorst
added a commit
to alexandrplashchinsky/ray-alex
that referenced
this pull request
Jun 19, 2026
Fix ray-project#2 (limit pushdown): the read fns now slice their batch to per_task_row_limit, so a downstream limit(K) reads ~K chunks instead of the whole batch's I/O. Previously ReadTask only truncated the already-built block (_iter_sliced_blocks), so every chunk in the batch was still fetched. Fix ray-project#4 (retries): chunk reads are wrapped in iterate_with_retry(match=DataContext.retried_io_errors) -- the same mechanism FileBasedDatasource uses -- so zarr reads now honor Ray Data's retry config. The underlying filesystem's own retry still applies underneath. Tests: per_task_row_limit caps the number of _read_chunk calls (not just the output row count); _read_chunk retries a transient error then succeeds. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Sparks0219
added a commit
that referenced
this pull request
Jun 23, 2026
## Why are these changes needed? Ray's NIXL tensor transport currently hardcodes the UCX backend (`nixl_agent_config(backends=["UCX"])`). On AWS EFA instances UCX cannot drive the EFA NICs (they are libfabric-only), so cross-node RDT transfers silently degrade to **software-emulated RMA over TCP (~0.3 GB/s)** — correct data, but ~600× slower than the hardware is capable of, with no warning emitted. NIXL itself logs a hint recommending LIBFABRIC. This change makes `NixlTensorTransport` select the **LIBFABRIC** backend on EFA hardware (falling back to UCX everywhere else), unlocking genuine GPUDirect RDMA over EFA. Builds on the initial draft (`joshlee/use-libfabric-nixl-backend`) and hardens it for the environments where naive device-presence selection fails: containers/K8s, hosts without GPUDirect, and CUDA VMM allocators. ### What's included 1. **Backend auto-selection** (`select_backend()`): `LIBFABRIC` when EFA is present, else `UCX`. `get_nixl_agent()` uses it instead of the hardcoded UCX. 2. **Container/K8s-aware EFA detection.** Device presence alone (`glob /sys/class/net/efa*`) is **empty inside pods** — netdevs are network- namespaced — so on K8s the naive check reports "no EFA" and silently selects the slow UCX/TCP path. Detection also accepts the rdma-verbs devices the EFA k8s device-plugin mounts (`/dev/infiniband/uverbs*` + `/sys/class/infiniband/*`). 3. **Validate before committing to LIBFABRIC.** EFA-present ≠ GPUDirect-works: on hosts/drivers without `nvidia-peermem`/dmabuf, LIBFABRIC instantiates and registers *small* CUDA buffers via EFA's ~32 MiB host bounce pool (looks healthy), but `fi_mr_reg` of a real-size buffer fails at transfer time with `NIXL_ERR_BACKEND`. We register/deregister a CUDA buffer **at realistic transfer size** before committing, and fall back to UCX on failure. Size is tunable via `RAY_NIXL_VALIDATE_BYTES`. 4. **VMM (`expandable_segments`) safety.** CUDA VMM memory (`PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`, standard in large-model training) cannot be RDMA-registered. The validation probe allocates non-expandable memory so it mirrors a real registrable buffer rather than false-failing on a VMM probe. 5. **`RAY_NIXL_BACKEND` override.** Per-process auto-detection can diverge between the two endpoints of a transfer when they run in different processes / Ray jobs with different allocator state (observed: sender → UCX, receiver → LIBFABRIC → every read fails `NIXL_ERR_BACKEND`). `RAY_NIXL_BACKEND=UCX| LIBFABRIC` lets an orchestrator pin both sides; the size-matched probe makes auto-selection deterministic across same-shaped hosts as the default. 6. **Per-transfer stats + backend-specific diagnostics** (`NixlTransferStats`: bytes, xfer time, throughput, backend) and backend-aware error hints (`FI_LOG_LEVEL=Debug` for LIBFABRIC, `UCX_LOG_LEVEL=debug` for UCX) on registration failure. ## Benchmark results Validated in a downstream RL trainer (miles) weight-sync workload (Megatron trainer → sglang rollout engines) on Anyscale, p5.48xlarge (8×H100-80GB, 32×EFA), Ray 2.55.1 + this change, cross-node (every transfer crosses the node boundary). This addresses the draft's "TODO: benchmarking". | Backend | path | effective bandwidth | |---|---|---| | **LIBFABRIC (this PR)** | GPUDirect RDMA over EFA | **~23–30 GiB/s per source** | | UCX (status quo on EFA) | software-emulated RMA over TCP | ~0.3 GB/s | End-to-end weight-sync time (`pull_wait` = pure transfer; full model bf16): | Model | size | shard/src | `pull_wait` (transfer) | full sync | |---|---|---|---|---| | Qwen3-30B-A3B | 57 GiB | 14.24 GiB | 0.61 s | 2.7 s | | GLM-4.7-Flash (MLA+MoE) | — | 14.13 GiB | 0.61 s | 1.9 s | | Moonlight-16B (MLA) | — | 7.48 GiB | 0.33 s | 1.0 s | - LIBFABRIC over EFA was **~8–9× faster than NCCL broadcast** for the same cross-node sync (~3 s vs ~26 s for the 57 GiB model). - Flat across 2→4 nodes (transfer is per-source-shard bound, not node-count bound). - All transfers byte-correct end-to-end (downstream `--check-weight-update-equal` byte-compares the received weights, incl. MLA and fused-MoE tensors). Without fix #2 (K8s detection) the change is a silent no-op on pods (stays on UCX/TCP). Without #3/#4 it selects LIBFABRIC and then fails at transfer time on no-GPUDirect/VMM hosts. With all of them, the LIBFABRIC path is correct and fast across dense, MoE, and MLA models. ## Related issue number Builds on / supersedes the draft on `joshlee/use-libfabric-nixl-backend`. ## Checks - Testing strategy: exercised via a real cross-node RDT weight-sync workload on EFA hardware (numbers above), plus the fallback paths — UCX selection on non-EFA, and LIBFABRIC→UCX fallback when the transfer-size CUDA registration fails (no-GPUDirect host). Suggested unit coverage: `select_backend()` honors `RAY_NIXL_BACKEND` and the EFA globs; `get_nixl_agent()` falls back to UCX when the validation registration raises. - [ ] Signed off commits - [ ] `scripts/format.sh` - [ ] Doc update (`doc/source/ray-core/direct-transport.rst` — backend selection section) - [ ] Tests passing ## Notes for reviewers - The `NixlTransferStats` backend field reads `list(nixl_agent.backends.keys())`; confirm `backends` is always a dict on the supported NIXL version (an earlier review flagged a possible `AttributeError`) and consider guarding it, since the stats path runs on the hot recv path. - Detection globs are cached (`functools.lru_cache`) — fine since hardware doesn't change within a process. --------- Signed-off-by: Joshua Lee <[email protected]> Signed-off-by: xyuzh <[email protected]> Co-authored-by: xyuzh <[email protected]>
limarkdcunha
pushed a commit
to limarkdcunha/ray
that referenced
this pull request
Jun 30, 2026
## Why are these changes needed? Ray's NIXL tensor transport currently hardcodes the UCX backend (`nixl_agent_config(backends=["UCX"])`). On AWS EFA instances UCX cannot drive the EFA NICs (they are libfabric-only), so cross-node RDT transfers silently degrade to **software-emulated RMA over TCP (~0.3 GB/s)** — correct data, but ~600× slower than the hardware is capable of, with no warning emitted. NIXL itself logs a hint recommending LIBFABRIC. This change makes `NixlTensorTransport` select the **LIBFABRIC** backend on EFA hardware (falling back to UCX everywhere else), unlocking genuine GPUDirect RDMA over EFA. Builds on the initial draft (`joshlee/use-libfabric-nixl-backend`) and hardens it for the environments where naive device-presence selection fails: containers/K8s, hosts without GPUDirect, and CUDA VMM allocators. ### What's included 1. **Backend auto-selection** (`select_backend()`): `LIBFABRIC` when EFA is present, else `UCX`. `get_nixl_agent()` uses it instead of the hardcoded UCX. 2. **Container/K8s-aware EFA detection.** Device presence alone (`glob /sys/class/net/efa*`) is **empty inside pods** — netdevs are network- namespaced — so on K8s the naive check reports "no EFA" and silently selects the slow UCX/TCP path. Detection also accepts the rdma-verbs devices the EFA k8s device-plugin mounts (`/dev/infiniband/uverbs*` + `/sys/class/infiniband/*`). 3. **Validate before committing to LIBFABRIC.** EFA-present ≠ GPUDirect-works: on hosts/drivers without `nvidia-peermem`/dmabuf, LIBFABRIC instantiates and registers *small* CUDA buffers via EFA's ~32 MiB host bounce pool (looks healthy), but `fi_mr_reg` of a real-size buffer fails at transfer time with `NIXL_ERR_BACKEND`. We register/deregister a CUDA buffer **at realistic transfer size** before committing, and fall back to UCX on failure. Size is tunable via `RAY_NIXL_VALIDATE_BYTES`. 4. **VMM (`expandable_segments`) safety.** CUDA VMM memory (`PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`, standard in large-model training) cannot be RDMA-registered. The validation probe allocates non-expandable memory so it mirrors a real registrable buffer rather than false-failing on a VMM probe. 5. **`RAY_NIXL_BACKEND` override.** Per-process auto-detection can diverge between the two endpoints of a transfer when they run in different processes / Ray jobs with different allocator state (observed: sender → UCX, receiver → LIBFABRIC → every read fails `NIXL_ERR_BACKEND`). `RAY_NIXL_BACKEND=UCX| LIBFABRIC` lets an orchestrator pin both sides; the size-matched probe makes auto-selection deterministic across same-shaped hosts as the default. 6. **Per-transfer stats + backend-specific diagnostics** (`NixlTransferStats`: bytes, xfer time, throughput, backend) and backend-aware error hints (`FI_LOG_LEVEL=Debug` for LIBFABRIC, `UCX_LOG_LEVEL=debug` for UCX) on registration failure. ## Benchmark results Validated in a downstream RL trainer (miles) weight-sync workload (Megatron trainer → sglang rollout engines) on Anyscale, p5.48xlarge (8×H100-80GB, 32×EFA), Ray 2.55.1 + this change, cross-node (every transfer crosses the node boundary). This addresses the draft's "TODO: benchmarking". | Backend | path | effective bandwidth | |---|---|---| | **LIBFABRIC (this PR)** | GPUDirect RDMA over EFA | **~23–30 GiB/s per source** | | UCX (status quo on EFA) | software-emulated RMA over TCP | ~0.3 GB/s | End-to-end weight-sync time (`pull_wait` = pure transfer; full model bf16): | Model | size | shard/src | `pull_wait` (transfer) | full sync | |---|---|---|---|---| | Qwen3-30B-A3B | 57 GiB | 14.24 GiB | 0.61 s | 2.7 s | | GLM-4.7-Flash (MLA+MoE) | — | 14.13 GiB | 0.61 s | 1.9 s | | Moonlight-16B (MLA) | — | 7.48 GiB | 0.33 s | 1.0 s | - LIBFABRIC over EFA was **~8–9× faster than NCCL broadcast** for the same cross-node sync (~3 s vs ~26 s for the 57 GiB model). - Flat across 2→4 nodes (transfer is per-source-shard bound, not node-count bound). - All transfers byte-correct end-to-end (downstream `--check-weight-update-equal` byte-compares the received weights, incl. MLA and fused-MoE tensors). Without fix ray-project#2 (K8s detection) the change is a silent no-op on pods (stays on UCX/TCP). Without ray-project#3/ray-project#4 it selects LIBFABRIC and then fails at transfer time on no-GPUDirect/VMM hosts. With all of them, the LIBFABRIC path is correct and fast across dense, MoE, and MLA models. ## Related issue number Builds on / supersedes the draft on `joshlee/use-libfabric-nixl-backend`. ## Checks - Testing strategy: exercised via a real cross-node RDT weight-sync workload on EFA hardware (numbers above), plus the fallback paths — UCX selection on non-EFA, and LIBFABRIC→UCX fallback when the transfer-size CUDA registration fails (no-GPUDirect host). Suggested unit coverage: `select_backend()` honors `RAY_NIXL_BACKEND` and the EFA globs; `get_nixl_agent()` falls back to UCX when the validation registration raises. - [ ] Signed off commits - [ ] `scripts/format.sh` - [ ] Doc update (`doc/source/ray-core/direct-transport.rst` — backend selection section) - [ ] Tests passing ## Notes for reviewers - The `NixlTransferStats` backend field reads `list(nixl_agent.backends.keys())`; confirm `backends` is always a dict on the supported NIXL version (an earlier review flagged a possible `AttributeError`) and consider guarding it, since the stats path runs on the hot recv path. - Detection globs are cached (`functools.lru_cache`) — fine since hardware doesn't change within a process. --------- Signed-off-by: Joshua Lee <[email protected]> Signed-off-by: xyuzh <[email protected]> Co-authored-by: xyuzh <[email protected]>
ShockYoungCHN
added a commit
to ShockYoungCHN/ray
that referenced
this pull request
Jul 3, 2026
Three real drifts (unrelated to v3's disk-transport design) closed:
1. Map input bundles were pinned across the entire shuffle, defeating
v3's whole point of reducing Plasma pressure. v2 destroys them the
moment a mapper task finishes (shuffle_map_operator.py:306); v3 now
does the same. FT limit drops to v2 parity (no retry after task
success), which is the accepted tradeoff already documented for v2.
* Drop ``_completed_input_bundles`` field + shutdown loop.
* ``_handle_map_done``: ``input_bundle.destroy_if_owned()`` in place
of the .append.
2. ShuffleReduceOpV3 lacked v2's ``fused_output_map_target_max_block_size_override``
equivalent. Downstream Write that wants a specific output block size
was silently ignored when fused.
* New ctor kwarg ``downstream_map_target_max_block_size_override``.
* v3_reduce_task takes it as a new trailing param and threads it
into the TaskContext it constructs around
``downstream_map_transformer``.
* operator_fusion._get_fused_map_into_shuffle_reduce_operator V3
branch propagates ``down_op.target_max_block_size_override`` into
it, matching the v2 branch semantics exactly.
3. ShuffleReduceOpV3 lacked v2's ``disallow_block_splitting`` kwarg.
Callers that want "N partitions -> N unsplit blocks" had no
op-level knob; ``coalesce_output=True`` only coalesces
post-reduce_fn, it doesn't drop the BlockOutputBuffer reshape.
* New ctor kwarg ``disallow_block_splitting``.
* ``_add_input_inner`` mirrors v2 (shuffle_reduce_operator.py:161-165):
when True, target_max_block_size becomes None so the reshape
step is a no-op.
* operator_fusion V3 branch propagates ``up_op._disallow_block_splitting``.
Not touched: DRIFT ray-project#4 (_emit_empty_partition) — v3_reduce_task already
emits a typed empty block from the handle-carried schema when a
partition has no jobs (hash_shuffle_v3.py:1501-1510), so the N-block
contract holds; v3 just pays a wasted task dispatch relative to v2's
driver-side short-circuit. Efficiency, not correctness.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Yuanzhuo Yang <[email protected]>
AarryaSaraf
added a commit
to AarryaSaraf/ray
that referenced
this pull request
Jul 21, 2026
…-stale §5/§6 - §3.5.1 (new): the Linux relapse — windowed-incremental USS rebuilt the import-ramp trap and produced one false 6.8x regression; three implementation hypotheses (per-group call overhead, allocator retention, lazy import) each killed by direct measurement; the metric itself was the cause (baseline subtraction flatters the reader that retains more warm heap). Defines the metric of record: per-task absolute USS over time vs E = 2 x target_max_block_size (Ray's own provisioning assumption, context.py:44), task windows via the FileReader.read hook; incremental metrics, peak bars and summary scalars retired. - §3.1: quote Ray's provisioning arithmetic that defines E. - §5: preamble marking §5.0-5.9 as macOS-era mechanism evidence; sweep-2 panel-1 allocator-release diagnosis corrected (disproven by the Ray-free probe: jemalloc inert, arrow-rs 2.3x less than pyarrow standalone on the same file). - §5.10 (new): Linux findings to date — big-fixture wins reproduce (0.40x budget sweep, 0.26x filter workload, 0.70x one_large_grp), small/many-group parity-to-better triple-confirmed, the 153/22 datapoint classified a metric artifact; whole-file-fragment subtlety for small files; pending full rerun + oom axis. - §6 retitled 'Optimizations and fixes, by phase'; Phase 2 entries: metric retirement (6.5) and the metric-of-record instrumentation (6.6). - §7: ray-project#1/ray-project#4/ray-project#8 refreshed (ray-project#8 allocator levers demoted from fix to knobs; mimalloc segfault warning retained). - §8/§9: task_mem.py, inspect_run.py, micro_alloc_probe.py documented. - §10 verdict rewritten around the new metric. - Also includes the previously uncommitted §7.9 expansion from the prior session (stats capability ladder, bloom filters, clustering inference). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Aarrya <[email protected]>
AarryaSaraf
added a commit
to AarryaSaraf/ray
that referenced
this pull request
Jul 28, 2026
ray-project#4) Some Anyscale workspace images inject the platform cgroup module as agent plugins (RAY_RUNTIME_ENV_PLUGINS) rather than a driver hook; the module is not in the OSS venv, the runtime-env agent dies on import, the raylet fate-shares, and ray.init() hangs forever. Pop the var in-process in bench_suite._fresh_session and setup.sh's verify (alongside the existing RAY_RUNTIME_ENV_HOOK scrub); document the pitfall + diagnosis pattern in the runbook. Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Aarrya <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
## Why are these changes needed? Ray's NIXL tensor transport currently hardcodes the UCX backend (`nixl_agent_config(backends=["UCX"])`). On AWS EFA instances UCX cannot drive the EFA NICs (they are libfabric-only), so cross-node RDT transfers silently degrade to **software-emulated RMA over TCP (~0.3 GB/s)** — correct data, but ~600× slower than the hardware is capable of, with no warning emitted. NIXL itself logs a hint recommending LIBFABRIC. This change makes `NixlTensorTransport` select the **LIBFABRIC** backend on EFA hardware (falling back to UCX everywhere else), unlocking genuine GPUDirect RDMA over EFA. Builds on the initial draft (`joshlee/use-libfabric-nixl-backend`) and hardens it for the environments where naive device-presence selection fails: containers/K8s, hosts without GPUDirect, and CUDA VMM allocators. ### What's included 1. **Backend auto-selection** (`select_backend()`): `LIBFABRIC` when EFA is present, else `UCX`. `get_nixl_agent()` uses it instead of the hardcoded UCX. 2. **Container/K8s-aware EFA detection.** Device presence alone (`glob /sys/class/net/efa*`) is **empty inside pods** — netdevs are network- namespaced — so on K8s the naive check reports "no EFA" and silently selects the slow UCX/TCP path. Detection also accepts the rdma-verbs devices the EFA k8s device-plugin mounts (`/dev/infiniband/uverbs*` + `/sys/class/infiniband/*`). 3. **Validate before committing to LIBFABRIC.** EFA-present ≠ GPUDirect-works: on hosts/drivers without `nvidia-peermem`/dmabuf, LIBFABRIC instantiates and registers *small* CUDA buffers via EFA's ~32 MiB host bounce pool (looks healthy), but `fi_mr_reg` of a real-size buffer fails at transfer time with `NIXL_ERR_BACKEND`. We register/deregister a CUDA buffer **at realistic transfer size** before committing, and fall back to UCX on failure. Size is tunable via `RAY_NIXL_VALIDATE_BYTES`. 4. **VMM (`expandable_segments`) safety.** CUDA VMM memory (`PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`, standard in large-model training) cannot be RDMA-registered. The validation probe allocates non-expandable memory so it mirrors a real registrable buffer rather than false-failing on a VMM probe. 5. **`RAY_NIXL_BACKEND` override.** Per-process auto-detection can diverge between the two endpoints of a transfer when they run in different processes / Ray jobs with different allocator state (observed: sender → UCX, receiver → LIBFABRIC → every read fails `NIXL_ERR_BACKEND`). `RAY_NIXL_BACKEND=UCX| LIBFABRIC` lets an orchestrator pin both sides; the size-matched probe makes auto-selection deterministic across same-shaped hosts as the default. 6. **Per-transfer stats + backend-specific diagnostics** (`NixlTransferStats`: bytes, xfer time, throughput, backend) and backend-aware error hints (`FI_LOG_LEVEL=Debug` for LIBFABRIC, `UCX_LOG_LEVEL=debug` for UCX) on registration failure. ## Benchmark results Validated in a downstream RL trainer (miles) weight-sync workload (Megatron trainer → sglang rollout engines) on Anyscale, p5.48xlarge (8×H100-80GB, 32×EFA), Ray 2.55.1 + this change, cross-node (every transfer crosses the node boundary). This addresses the draft's "TODO: benchmarking". | Backend | path | effective bandwidth | |---|---|---| | **LIBFABRIC (this PR)** | GPUDirect RDMA over EFA | **~23–30 GiB/s per source** | | UCX (status quo on EFA) | software-emulated RMA over TCP | ~0.3 GB/s | End-to-end weight-sync time (`pull_wait` = pure transfer; full model bf16): | Model | size | shard/src | `pull_wait` (transfer) | full sync | |---|---|---|---|---| | Qwen3-30B-A3B | 57 GiB | 14.24 GiB | 0.61 s | 2.7 s | | GLM-4.7-Flash (MLA+MoE) | — | 14.13 GiB | 0.61 s | 1.9 s | | Moonlight-16B (MLA) | — | 7.48 GiB | 0.33 s | 1.0 s | - LIBFABRIC over EFA was **~8–9× faster than NCCL broadcast** for the same cross-node sync (~3 s vs ~26 s for the 57 GiB model). - Flat across 2→4 nodes (transfer is per-source-shard bound, not node-count bound). - All transfers byte-correct end-to-end (downstream `--check-weight-update-equal` byte-compares the received weights, incl. MLA and fused-MoE tensors). Without fix ray-project#2 (K8s detection) the change is a silent no-op on pods (stays on UCX/TCP). Without ray-project#3/ray-project#4 it selects LIBFABRIC and then fails at transfer time on no-GPUDirect/VMM hosts. With all of them, the LIBFABRIC path is correct and fast across dense, MoE, and MLA models. ## Related issue number Builds on / supersedes the draft on `joshlee/use-libfabric-nixl-backend`. ## Checks - Testing strategy: exercised via a real cross-node RDT weight-sync workload on EFA hardware (numbers above), plus the fallback paths — UCX selection on non-EFA, and LIBFABRIC→UCX fallback when the transfer-size CUDA registration fails (no-GPUDirect host). Suggested unit coverage: `select_backend()` honors `RAY_NIXL_BACKEND` and the EFA globs; `get_nixl_agent()` falls back to UCX when the validation registration raises. - [ ] Signed off commits - [ ] `scripts/format.sh` - [ ] Doc update (`doc/source/ray-core/direct-transport.rst` — backend selection section) - [ ] Tests passing ## Notes for reviewers - The `NixlTransferStats` backend field reads `list(nixl_agent.backends.keys())`; confirm `backends` is always a dict on the supported NIXL version (an earlier review flagged a possible `AttributeError`) and consider guarding it, since the stats path runs on the hot recv path. - Detection globs are cached (`functools.lru_cache`) — fine since hardware doesn't change within a process. --------- Signed-off-by: Joshua Lee <[email protected]> Signed-off-by: xyuzh <[email protected]> Co-authored-by: xyuzh <[email protected]> Signed-off-by: 400Ping <[email protected]>
AarryaSaraf
added a commit
to AarryaSaraf/ray
that referenced
this pull request
Aug 18, 2026
…on variable From the A/B ray-project#4 appendix review (M46/M47): - read_probe: new --consume groupby (ds.groupby(key).count(), HashAggregate consume; read-op metrics resolve through the grouped dataset's stats) and per-run spilled_gb (raylet memory summary) in the result - loss_triage: new Ray-only 'agg' shape = projected read -> groupby -> count on auto_rg, guarding the aggregate-family per-task USS win (R 0.56-0.81, M47) that the 1y batch-sizing fix must not surrender; spill T/B column in the summary table - run_all.sh / run_loss_triage.sh default shapes include agg Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Aarrya <[email protected]>
suppagoddo
added a commit
to suppagoddo/ray
that referenced
this pull request
Sep 17, 2026
…troller Address review (ray-project#3/ray-project#4/ray-project#12 in the thread): - Do not checkpoint the tracing config on first start. Ray replays the controller's constructor arg on restart (max_restarts=-1), so persisting the initial config buys nothing, and a checkpoint written on start lets a controller killed without shutdown() shadow a later serve.start(tracing_config=...). Only a runtime change (serve deploy / reconfigure) is now checkpointed, which is the state that is *not* in the replayed constructor arg and so must survive recovery. - Extract `_apply_global_tracing_config(config, *, checkpoint)` shared by the constructor (checkpoint=False) and reconfigure (checkpoint=True), removing the duplicated store/broadcast/log block. This intentionally differs from the logging-config path, which still checkpoints on first start (same latent shadowing, out of scope here). - Add a test that a runtime change is checkpointed, deleted on shutdown, and does not shadow the next serve.start() in the same cluster (the checkpoint delete previously had no coverage). Signed-off-by: uditagrawal <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.