mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[client] fix ClientRemoteMethod error message (#17726)
Co-authored-by: hauntsaninja <>
This commit is contained in:
parent
9322f6aab5
commit
abc593561c
1 changed files with 3 additions and 2 deletions
|
@ -259,8 +259,9 @@ class ClientRemoteMethod(ClientStub):
|
|||
self._method_name = method_name
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
raise TypeError(f"Remote method cannot be called directly. "
|
||||
f"Use {self._name}.remote() instead")
|
||||
raise TypeError("Actor methods cannot be called directly. Instead "
|
||||
f"of running 'object.{self._method_name}()', try "
|
||||
f"'object.{self._method_name}.remote()'.")
|
||||
|
||||
def remote(self, *args, **kwargs):
|
||||
return return_refs(ray.call_remote(self, *args, **kwargs))
|
||||
|
|
Loading…
Add table
Reference in a new issue