Skip to content

[Placement group] Update the old placement group API usage to the new scheduling_strategy based API - #24544

Merged
rkooo567 merged 14 commits into
ray-project:masterfrom
rkooo567:pg-doc-with-new-api
May 18, 2022
Merged

rkooo567 merged 14 commits into
ray-project:masterfrom
rkooo567:pg-doc-with-new-api

Conversation

@rkooo567

@rkooo567 rkooo567 commented May 6, 2022 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Documentation should use the new API, not the old one that will be deprecated

Related issue number

Checks

@rkooo567 rkooo567 changed the title [Placement group] Update the old placement group API usage to the new scheduling_strategy based API [WIP][Placement group] Update the old placement group API usage to the new scheduling_strategy based API May 6, 2022
@rkooo567 rkooo567 changed the title [WIP][Placement group] Update the old placement group API usage to the new scheduling_strategy based API [Placement group] Update the old placement group API usage to the new scheduling_strategy based API May 10, 2022
Comment thread doc/source/ray-core/placement-group.rst Resolved
Comment thread doc/source/ray-core/placement-group.rst Resolved
Comment thread doc/source/ray-core/placement-group.rst Resolved
@rkooo567

Copy link
Copy Markdown
Contributor Author

Hmm @jjyao It seems like PlacementGroupStrategy class itself is not documented. Is this correct? Or do you know where I can find the API reference? (If not, I think I should update that API reference here too).

@rkooo567 rkooo567 closed this May 16, 2022
@rkooo567 rkooo567 reopened this May 16, 2022
@jjyao

jjyao commented May 17, 2022

Copy link
Copy Markdown
Contributor

PlacementGroupStrategy has class level documentation if that's what you are asking.

Comment thread doc/source/ray-core/placement-group.rst Resolved
@rkooo567

Copy link
Copy Markdown
Contributor Author

@jjyao where is it documented though? I failed to find the documentation from the doc. (I searched the class, and there was no result). I am asking it because I'd like to add a link to the API reference.

@jjyao jjyao left a comment

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.

Let's fix PlacementGroupSchedulingStrategy docstring

@rkooo567
rkooo567 merged commit f228245 into ray-project:master May 18, 2022
dstrodtman added a commit that referenced this pull request Oct 13, 2026
## Why are these changes needed?

Some files under `doc/source/core/` aren't shown on any docs page, and
nothing else in the repo references them. Docs example code should
either appear on a page, be a test wrapper for content that does, or be
deleted. This PR applies that rule to Ray Core:

| File | Status before | Change |
| --- | --- | --- |
| `doc_code/original_resource_unavailable_example.py` | Run by the
`source/core/doc_code/*.py` catch-all in `doc/BUILD.bazel`. #24544 added
it as a `literalinclude` on the placement group page, and a later
rewrite of that page dropped the include. It demonstrates scheduling a
task into a placement group's reserved CPUs, not a regression check, so
it isn't worth moving into `python/ray/tests/`. | Deleted |
| `examples/lm/` (`ray_train.py`, `ray_train.sh`, `preprocess.sh`,
`lm-cluster.yaml`) | Not tested. Referenced only by each other. Pins
`fairseq==0.8.0` and is what's left of a removed fairseq language-model
example. Its only recent edits are repo-wide sweeps such as the IPv6
work in #55281, #56147, and #58304. | Deleted |
| `examples/rdt/grpo_contextual_bandits.py` | Not tested. No page
includes it. #57961 added it as the companion script for the [Ray Direct
Transport blog
post](https://anyscale.com/blog/ray-direct-transport-rdma-support-in-ray-core),
which links to it by commit permalink
(`blob/c4f0c24.../doc/source/ray-core/examples/rdt/...`), so the blog
link keeps working after this deletion. | Deleted |

The catch-all's `exclude` list doesn't change. Deleting
`original_resource_unavailable_example.py` only removes the one test
target the glob generated for it.

### Questions for Ray Core maintainers

Please confirm or push back per file:

- `original_resource_unavailable_example.py`: if you'd rather keep this
behavior under test, I can move it to `python/ray/tests/` instead of
deleting it.
- `examples/rdt/grpo_contextual_bandits.py`: was a docs page planned for
it? If so, I can keep the script and add a page with a `literalinclude`
and a test instead. If the RDT team wants it kept as a standalone
example, say where it should live.

## Related issue number

None. I searched open PRs for each filename and found no overlap.

## Checks

- [x] I've signed off every commit (DCO).
- [x] `pre-commit run --files <changed files>`: passed, including the
master-link check.
- [x] `git grep` for `examples/lm`, `examples/rdt`,
`original_resource_unavailable`, and `grpo_contextual`: no remaining
references.
- [ ] I didn't run a local Sphinx build. No page referenced these files.

AI assistance (Claude Code) was used to prepare this PR. I reviewed
every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants