.pyi: Python stub file,只有 _raylet.pyi,用來幫 Cython types 加上 generics
例如
class ObjectRef(Awaitable[R]):
如果沒有寫這個的話,Python 就會用 Cython 的 type
class ObjectRef(BaseID)
.pyx: Cython 的 implementation file,只有 _raylet.pyx
.pxd: Cython 的 definition file,相當於 C 的 header files,負責跟 C++ 界接
.pxi: Cython 的 include file,其他檔案可以使用 include "xxx.pxi" 的語法,等於是把 xxx.pxi 這個檔案的內容原地展開,如果 include statement 本身有縮排的話,被 include 進來的 pxi 檔案內容也會全部擁有同樣的 indentation level
Reference: https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#cython-file-types
rpc::XXXDebugString() 這個 method 來 debuglogger.infoRAY_LOG(INFO) << ""然後去 /tmp/ray/session_latest/logs 看 log
ray::StackTrace()
pytest 不同,Ray 是用 bazel 跑的,所以如果要加新檔案,必須要加 if __name__ == "__main__",並且加到 python/ray/tests/BUILD 裡面才行