How severe does this issue affect your experience of using Ray?
- Low: It annoys or frustrates me for a moment.
mypy gives the following error when I create an actor:
"type[Counter]" has no attribute "remote" [attr-defined]
Sample code (from Actors — Ray 2.5.1):
import ray
@ray.remote
class Counter:
def __init__(self):
self.value = 0
def increment(self):
self.value += 1
return self.value
def get_counter(self):
return self.value
# Create an actor from this class.
counter = Counter.remote() # <-- mypy error occurs here
I’m using mypy 1.4.1 with ray[default] 2.5.1 in a Linux dev container based on mcr.microsoft.com/devcontainers/python:1-3.10-bookworm
. Using VS Code with the ms-python.mypy-type-checker
extension.
Any suggestions on how to resolve this?