-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[Doc] Minor Fix for doc typos #58038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Shanshan Shen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly fixes invalid reStructuredText markup in the actors documentation. The change is valid, but I've suggested an alternative that could improve readability by removing the bold formatting from the list items, as the code literals are already highlighted, making the text cleaner.
| - **Prefer** ``ray.remote(MyClass)`` **over** ``@ray.remote`` **for actors**: Instead of decorating your class with ``@ray.remote``, use ``ActorClass = ray.remote(MyClass)``. This preserves the original class type and allows type checkers and IDEs to infer the correct types. | ||
| - **Use ``@ray.method`` for actor methods**: Decorate actor methods with ``@ray.method`` to enable type hints for remote method calls on actor handles. | ||
| - **Use** ``@ray.method`` **for actor methods**: Decorate actor methods with ``@ray.method`` to enable type hints for remote method calls on actor handles. | ||
| - **Use the ``ActorClass`` and ``ActorProxy`` types**: When you instantiate an actor, annotate the handle as ``ActorProxy[MyClass]`` to get type hints for remote methods. | ||
| - **Use the** ``ActorClass`` **and** ``ActorProxy`` **types**: When you instantiate an actor, annotate the handle as ``ActorProxy[MyClass]`` to get type hints for remote methods. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the invalid markup! While your change is correct, the resulting formatting with interspersed bold text can be a bit visually jarring. For better readability and a cleaner look, you might consider removing the bolding from these list items entirely. The code literals are already highlighted with backticks, which provides sufficient emphasis.
| - **Prefer** ``ray.remote(MyClass)`` **over** ``@ray.remote`` **for actors**: Instead of decorating your class with ``@ray.remote``, use ``ActorClass = ray.remote(MyClass)``. This preserves the original class type and allows type checkers and IDEs to infer the correct types. | |
| - **Use ``@ray.method`` for actor methods**: Decorate actor methods with ``@ray.method`` to enable type hints for remote method calls on actor handles. | |
| - **Use** ``@ray.method`` **for actor methods**: Decorate actor methods with ``@ray.method`` to enable type hints for remote method calls on actor handles. | |
| - **Use the ``ActorClass`` and ``ActorProxy`` types**: When you instantiate an actor, annotate the handle as ``ActorProxy[MyClass]`` to get type hints for remote methods. | |
| - **Use the** ``ActorClass`` **and** ``ActorProxy`` **types**: When you instantiate an actor, annotate the handle as ``ActorProxy[MyClass]`` to get type hints for remote methods. | |
| - Prefer ``ray.remote(MyClass)`` over ``@ray.remote`` for actors: Instead of decorating your class with ``@ray.remote``, use ``ActorClass = ray.remote(MyClass)``. This preserves the original class type and allows type checkers and IDEs to infer the correct types. | |
| - Use ``@ray.method`` for actor methods: Decorate actor methods with ``@ray.method`` to enable type hints for remote method calls on actor handles. | |
| - Use the ``ActorClass`` and ``ActorProxy`` types: When you instantiate an actor, annotate the handle as ``ActorProxy[MyClass]`` to get type hints for remote methods. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Description
Minor Fix for typos in https://docs.ray.io/en/latest/ray-core/actors.html#type-hints-and-static-typing-for-actors.
The ``...`` in **...** is invalid.
Related issues
Additional information