Skip to content

[Docs] Document name parameter for task.options() (#33061)#63450

Open
dstrodtman wants to merge 1 commit into
ray-project:masterfrom
dstrodtman:doc-985-task-options-name-param
Open

[Docs] Document name parameter for task.options() (#33061)#63450
dstrodtman wants to merge 1 commit into
ray-project:masterfrom
dstrodtman:doc-985-task-options-name-param

Conversation

@dstrodtman
Copy link
Copy Markdown
Contributor

Description

task.options(name=...).remote() accepts a name keyword that sets a human-readable display name for the task (visible in the Ray Dashboard, logs, and the State API), but it was missing from the RemoteFunction.options docstring and therefore from the Ray Core API reference. Add a Google-style entry describing the parameter, matching the format of adjacent params like num_cpus / num_gpus. Also update the pydoclint baseline to reflect the new documented argument.

Related issues

Closes #33061

[DOC-985]

Additional information

  • Edited file: python/ray/remote_function.py (docstring of RemoteFunction.options)
  • Baseline updated: ci/lint/pydoclint-baseline.txt
  • The API ref page doc/source/ray-core/api/core.rst already autodocs ray.remote_function.RemoteFunction.options, so the new parameter description flows through automatically — no separate ref-page edit needed.

Generated with Claude Code

The `name` keyword for `task.options(name=...).remote()` was accepted but
undocumented in `RemoteFunction.options`. Add a Google-style parameter
entry to the docstring in `python/ray/remote_function.py`, mirroring the
documentation style of adjacent params, so the Ray Core API reference
surfaces this option alongside `num_cpus`, `num_gpus`, and friends.
Update `ci/lint/pydoclint-baseline.txt` to reflect the additional
documented argument.

Closes ray-project#33061

[DOC-985]

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
@dstrodtman dstrodtman requested a review from a team as a code owner May 18, 2026 16:04
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 adds documentation for the name parameter in the RemoteFunction.options docstring and updates the linting baseline file. A review comment suggests adding a type hint to the name parameter description to ensure consistency with the surrounding documentation.

Comment on lines +206 to +210
name: A human-readable name for the task. If set, the name appears
alongside the task in the Ray Dashboard, logs, and the State API
(for example, ``ray list tasks``), which is useful for debugging
and observability. Names don't need to be unique. Defaults to
the remote function's name.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To maintain consistency with the immediately adjacent parameters resources and label_selector, please include the type hint (str) for the name parameter. This follows the Google-style docstring convention used for other typed arguments in this method.

Suggested change
name: A human-readable name for the task. If set, the name appears
alongside the task in the Ray Dashboard, logs, and the State API
(for example, ``ray list tasks``), which is useful for debugging
and observability. Names don't need to be unique. Defaults to
the remote function's name.
name (str): A human-readable name for the task. If set, the name appears
alongside the task in the Ray Dashboard, logs, and the State API
(for example, ``ray list tasks``), which is useful for debugging
and observability. Names don't need to be unique. Defaults to
the remote function's name.

@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels May 18, 2026
@edoakes edoakes added the go add ONLY when ready to merge, run all tests label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[doc][core] Name option is not showing up for task options in doc

2 participants