Mypy issue with actor implementation

HI team,

I have an actor named CheckpointingActor which I have defined as as below

@ray.remote(num_cpus=0)
class CheckPointingActor:
  
    def __init__(self, local_checkpoint_path: str, hdfs_checkpoint_path: str):
        self._local_checkpoint_path = local_checkpoint_path
        self._hdfs_checkpoint_path = hdfs_checkpoint_path

I am trying to create an instance with options as below

actor: ActorHandle = CheckPointingActor.options(
  scheduling_strategy=ray.util.scheduling_strategies.NodeAffinitySchedulingStrategy(node_id=node_id, soft=False)
        ).remote(local_checkpoint_path=local_checkpoint_path, hdfs_checkpoint_path=local_checkpoint_path)

But I am getting below error during project build. Can someone please help?

 > mypy has found issues:
     "type[CheckPointingActor]" has no attribute "options"  [attr-defined]
     Found 1 error in 1 file (checked 17 source files)

Hi there! I think this is a known issue when you try to combine mypy, remote and options. You can read more about the discussion here:

I think you can try doing something like this to help?

What version of Ray are you running?

Hi. I am running 2.43.0

I know it’s not ideal but have you tried doing the #ignore option I linked above to suppress the warnings for now? I feel like since we merged in the PR recently it should hypothetically be fixed. What version of Python / mypy are you using?