Repository navigation
[doc][DOC-897] probe: remove obsolete RAY_TRAIN_V2_ENABLED=1 force in conf.py - #63196
Merged
matthewdeng merged 1 commit intoMay 7, 2026
Merged
Conversation
Train v2 has been the default since ray-project#57857 (Oct 2025). The conf.py force at the bottom of the module was added when v2 was opt-in and predates that switch — likely vestigial. This is a docs-team probe PR to validate the hypothesis that the line is no longer load-bearing for the doc build. Surfaced by an audit of conf.py settings against current Ray state in the docs-team strategy work (anyscale/docs#2064). Validation surface: the RtD preview build on this PR plus the api_policy_check premerge step (which runs make -C doc/ html) will exercise the doc build under fail_on_warning. If neither flips red, the line is safe to drop. Marking as draft. Not requesting merge until a Ray maintainer weighs in on whether there is a non-obvious reason to keep this. Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman
marked this pull request as ready for review
May 7, 2026 16:47
dstrodtman
marked this pull request as draft
May 7, 2026 16:50
dstrodtman
marked this pull request as ready for review
May 7, 2026 16:54
matthewdeng
approved these changes
May 7, 2026
matthewdeng
enabled auto-merge (squash)
May 7, 2026 17:32
Lucas61000
pushed a commit
to Lucas61000/ray
that referenced
this pull request
May 15, 2026
…ay-project#63196) ## Why The Anyscale docs team is auditing `doc/source/conf.py` against current Ray state as part of strategy work tracked in [anyscale/docs#2064](anyscale/docs#2064). One finding: the last two lines of conf.py force two env vars unconditionally: ```python os.environ["RAY_TRAIN_V2_ENABLED"] = "1" os.environ["RAY_DOC_BUILD"] = "1" ``` `RAY_TRAIN_V2_ENABLED=1` was added when Train v2 was opt-in. Justin Yu's [ray-project#57857](ray-project#57857) (Oct 2025) made Train v2 the default. The conf.py force should now be vestigial. `RAY_DOC_BUILD=1` is intentional and stays — it switches Ray-internal code paths during doc generation. ## What this PR does Drops the `os.environ["RAY_TRAIN_V2_ENABLED"] = "1"` line from `doc/source/conf.py`. ## How to validate This is a probe, not a request-for-merge. The validation surfaces are: 1. **RtD PR preview build** — runs against this branch. With `fail_on_warning: true` set in `.readthedocs.yaml`, any new Sphinx warning means the line was still load-bearing. 2. **`doc: check API doc consistency`** — premerge step that runs `make -C doc/ html` internally. Same fail-on-warning gate. 3. **Visual diff of API ref pages** for any class previously rendered through Train v2 codepaths. If the build is clean and the API ref renders identically, this line can be dropped. ## What happens if I'm wrong If `RAY_TRAIN_V2_ENABLED=1` is still load-bearing, the doc build will surface the dependency (likely as a missing-reference or autosummary failure). I revert and document the actual reason it's still needed. ## Status **Draft.** Posting for visibility and validation, not for merge. Looking for confirmation from a Ray maintainer (Justin Yu @justinvyu would be the natural reviewer given Train v2 ownership) that there's no non-obvious reason to keep this. Happy to close if there is. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <[email protected]>
elliot-barn
pushed a commit
that referenced
this pull request
May 18, 2026
## Why Add `sphinxext-opengraph` — per-page Open Graph metadata. `ogp_site_url` is pinned to `html_baseurl` so the `og:url` tag stays aligned with Sphinx's `<link rel="canonical">`. Improves rich-link previews when docs pages get shared and tightens SEO signal. Low-effort additive change called out as a Bucket 1 quick win in the Anyscale docs team's agent-friendliness assessment. ## What - `doc/requirements-doc.txt`: add `sphinxext-opengraph==0.13.0`. - `doc/source/conf.py`: append `"sphinxext.opengraph"` to `extensions`; set `ogp_site_url = html_baseurl`. - `python/deplocks/docs/docbuild_depset_py3.10.lock`: package entry plus via-comment addition on `sphinx` (the only runtime dep, already pinned, so no further transitives). Matches the manual-lock-edit pattern used in [#63130](#63130). ## Verification After this lands and `latest` rebuilds: - A representative doc page's `<head>` includes `<meta property="og:*">` tags reflecting page title, description, and the site URL. - No new warnings in the RtD build log (`fail_on_warning: true`). ## Extension diligence [`sphinxext-opengraph`](https://github.com/sphinx-doc/sphinxext-opengraph) — official `sphinx-doc` org project, BSD-2-Clause. Latest release 0.13.0 (March 2026). Pure-Python, depends only on Sphinx (already pinned to 7.3.7), no system-level requirements. ## What changed in the force-push This PR originally also bundled [`sphinx-notfound-page`](https://github.com/readthedocs/sphinx-notfound-page) to give the Ray docs a 404 page with absolute URLs. Dropped on 2026-05-15 because the RtD PR preview build surfaced a sitewide regression: 732 of 756 `<a class="reference internal">` sidebar hrefs were emitted with a `.//en/<ver>/...` prefix that doubles when the browser resolves them against the build's `/en/<ver>/` deploy path. Production docs.ray.io (which doesn't have the extension) was unaffected (0/747 hrefs). The cause is sphinx-notfound-page's `html-page-context` hook: it overrides `pathto`/`toctree` for **every** page in the build, prepending a URL prefix derived from `READTHEDOCS_CANONICAL_URL`. The extension docs imply this is "for the 404 page only," but the override fires on every page-context event. On a PR preview where the canonical URL differs from `html_baseurl`, this produces the doubled-prefix anti-pattern across the entire sidebar. The 404-page-with-absolute-URLs goal is tracked separately so it can be re-attempted with a config or extension that doesn't break sitewide navigation. Options to revisit: `notfound_urls_prefix = None`, a custom 404 template that bypasses the global `pathto` override, or `html_extra_path` with a static 404. ## Context Part of the [DOC-932](https://anyscale1.atlassian.net/browse/DOC-932) campaign: Ray docs dependency upgrades. Pattern mirrors the merged [DOC-898](https://anyscale1.atlassian.net/browse/DOC-898) probe ([#63197](#63197)) and the obsolete-env-var removal in [#63196](#63196). Strategy context: `anyscale/docs:strategy/ray-docs/sphinx-rtd-viability.md` "Low effort" section. This is the bottom of a stacked series: 1. **#63343 — sphinxext-opengraph (this PR)** 2. [#63344](#63344) — pydata-sphinx-theme bump 3. [#63359](#63359) — notebook `language_info.name` fix 4. [#63360](#63360) — myst-nb 1.4.0 bump [DOC-933](https://anyscale1.atlassian.net/browse/DOC-933) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
TruongQuangPhat
pushed a commit
to cyhapun/ray-fix-issue
that referenced
this pull request
May 27, 2026
## Why Add `sphinxext-opengraph` — per-page Open Graph metadata. `ogp_site_url` is pinned to `html_baseurl` so the `og:url` tag stays aligned with Sphinx's `<link rel="canonical">`. Improves rich-link previews when docs pages get shared and tightens SEO signal. Low-effort additive change called out as a Bucket 1 quick win in the Anyscale docs team's agent-friendliness assessment. ## What - `doc/requirements-doc.txt`: add `sphinxext-opengraph==0.13.0`. - `doc/source/conf.py`: append `"sphinxext.opengraph"` to `extensions`; set `ogp_site_url = html_baseurl`. - `python/deplocks/docs/docbuild_depset_py3.10.lock`: package entry plus via-comment addition on `sphinx` (the only runtime dep, already pinned, so no further transitives). Matches the manual-lock-edit pattern used in [ray-project#63130](ray-project#63130). ## Verification After this lands and `latest` rebuilds: - A representative doc page's `<head>` includes `<meta property="og:*">` tags reflecting page title, description, and the site URL. - No new warnings in the RtD build log (`fail_on_warning: true`). ## Extension diligence [`sphinxext-opengraph`](https://github.com/sphinx-doc/sphinxext-opengraph) — official `sphinx-doc` org project, BSD-2-Clause. Latest release 0.13.0 (March 2026). Pure-Python, depends only on Sphinx (already pinned to 7.3.7), no system-level requirements. ## What changed in the force-push This PR originally also bundled [`sphinx-notfound-page`](https://github.com/readthedocs/sphinx-notfound-page) to give the Ray docs a 404 page with absolute URLs. Dropped on 2026-05-15 because the RtD PR preview build surfaced a sitewide regression: 732 of 756 `<a class="reference internal">` sidebar hrefs were emitted with a `.//en/<ver>/...` prefix that doubles when the browser resolves them against the build's `/en/<ver>/` deploy path. Production docs.ray.io (which doesn't have the extension) was unaffected (0/747 hrefs). The cause is sphinx-notfound-page's `html-page-context` hook: it overrides `pathto`/`toctree` for **every** page in the build, prepending a URL prefix derived from `READTHEDOCS_CANONICAL_URL`. The extension docs imply this is "for the 404 page only," but the override fires on every page-context event. On a PR preview where the canonical URL differs from `html_baseurl`, this produces the doubled-prefix anti-pattern across the entire sidebar. The 404-page-with-absolute-URLs goal is tracked separately so it can be re-attempted with a config or extension that doesn't break sitewide navigation. Options to revisit: `notfound_urls_prefix = None`, a custom 404 template that bypasses the global `pathto` override, or `html_extra_path` with a static 404. ## Context Part of the [DOC-932](https://anyscale1.atlassian.net/browse/DOC-932) campaign: Ray docs dependency upgrades. Pattern mirrors the merged [DOC-898](https://anyscale1.atlassian.net/browse/DOC-898) probe ([ray-project#63197](ray-project#63197)) and the obsolete-env-var removal in [ray-project#63196](ray-project#63196). Strategy context: `anyscale/docs:strategy/ray-docs/sphinx-rtd-viability.md` "Low effort" section. This is the bottom of a stacked series: 1. **ray-project#63343 — sphinxext-opengraph (this PR)** 2. [ray-project#63344](ray-project#63344) — pydata-sphinx-theme bump 3. [ray-project#63359](ray-project#63359) — notebook `language_info.name` fix 4. [ray-project#63360](ray-project#63360) — myst-nb 1.4.0 bump [DOC-933](https://anyscale1.atlassian.net/browse/DOC-933) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: phattruong <[email protected]>
alexandrplashchinsky
pushed a commit
to alexandrplashchinsky/ray-alex
that referenced
this pull request
May 29, 2026
…ay-project#63196) ## Why The Anyscale docs team is auditing `doc/source/conf.py` against current Ray state as part of strategy work tracked in [anyscale/docs#2064](anyscale/docs#2064). One finding: the last two lines of conf.py force two env vars unconditionally: ```python os.environ["RAY_TRAIN_V2_ENABLED"] = "1" os.environ["RAY_DOC_BUILD"] = "1" ``` `RAY_TRAIN_V2_ENABLED=1` was added when Train v2 was opt-in. Justin Yu's [ray-project#57857](ray-project#57857) (Oct 2025) made Train v2 the default. The conf.py force should now be vestigial. `RAY_DOC_BUILD=1` is intentional and stays — it switches Ray-internal code paths during doc generation. ## What this PR does Drops the `os.environ["RAY_TRAIN_V2_ENABLED"] = "1"` line from `doc/source/conf.py`. ## How to validate This is a probe, not a request-for-merge. The validation surfaces are: 1. **RtD PR preview build** — runs against this branch. With `fail_on_warning: true` set in `.readthedocs.yaml`, any new Sphinx warning means the line was still load-bearing. 2. **`doc: check API doc consistency`** — premerge step that runs `make -C doc/ html` internally. Same fail-on-warning gate. 3. **Visual diff of API ref pages** for any class previously rendered through Train v2 codepaths. If the build is clean and the API ref renders identically, this line can be dropped. ## What happens if I'm wrong If `RAY_TRAIN_V2_ENABLED=1` is still load-bearing, the doc build will surface the dependency (likely as a missing-reference or autosummary failure). I revert and document the actual reason it's still needed. ## Status **Draft.** Posting for visibility and validation, not for merge. Looking for confirmation from a Ray maintainer (Justin Yu @justinvyu would be the natural reviewer given Train v2 ownership) that there's no non-obvious reason to keep this. Happy to close if there is. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: Alexandr Plashchinsky <[email protected]>
alexandrplashchinsky
pushed a commit
to alexandrplashchinsky/ray-alex
that referenced
this pull request
May 29, 2026
## Why Add `sphinxext-opengraph` — per-page Open Graph metadata. `ogp_site_url` is pinned to `html_baseurl` so the `og:url` tag stays aligned with Sphinx's `<link rel="canonical">`. Improves rich-link previews when docs pages get shared and tightens SEO signal. Low-effort additive change called out as a Bucket 1 quick win in the Anyscale docs team's agent-friendliness assessment. ## What - `doc/requirements-doc.txt`: add `sphinxext-opengraph==0.13.0`. - `doc/source/conf.py`: append `"sphinxext.opengraph"` to `extensions`; set `ogp_site_url = html_baseurl`. - `python/deplocks/docs/docbuild_depset_py3.10.lock`: package entry plus via-comment addition on `sphinx` (the only runtime dep, already pinned, so no further transitives). Matches the manual-lock-edit pattern used in [ray-project#63130](ray-project#63130). ## Verification After this lands and `latest` rebuilds: - A representative doc page's `<head>` includes `<meta property="og:*">` tags reflecting page title, description, and the site URL. - No new warnings in the RtD build log (`fail_on_warning: true`). ## Extension diligence [`sphinxext-opengraph`](https://github.com/sphinx-doc/sphinxext-opengraph) — official `sphinx-doc` org project, BSD-2-Clause. Latest release 0.13.0 (March 2026). Pure-Python, depends only on Sphinx (already pinned to 7.3.7), no system-level requirements. ## What changed in the force-push This PR originally also bundled [`sphinx-notfound-page`](https://github.com/readthedocs/sphinx-notfound-page) to give the Ray docs a 404 page with absolute URLs. Dropped on 2026-05-15 because the RtD PR preview build surfaced a sitewide regression: 732 of 756 `<a class="reference internal">` sidebar hrefs were emitted with a `.//en/<ver>/...` prefix that doubles when the browser resolves them against the build's `/en/<ver>/` deploy path. Production docs.ray.io (which doesn't have the extension) was unaffected (0/747 hrefs). The cause is sphinx-notfound-page's `html-page-context` hook: it overrides `pathto`/`toctree` for **every** page in the build, prepending a URL prefix derived from `READTHEDOCS_CANONICAL_URL`. The extension docs imply this is "for the 404 page only," but the override fires on every page-context event. On a PR preview where the canonical URL differs from `html_baseurl`, this produces the doubled-prefix anti-pattern across the entire sidebar. The 404-page-with-absolute-URLs goal is tracked separately so it can be re-attempted with a config or extension that doesn't break sitewide navigation. Options to revisit: `notfound_urls_prefix = None`, a custom 404 template that bypasses the global `pathto` override, or `html_extra_path` with a static 404. ## Context Part of the [DOC-932](https://anyscale1.atlassian.net/browse/DOC-932) campaign: Ray docs dependency upgrades. Pattern mirrors the merged [DOC-898](https://anyscale1.atlassian.net/browse/DOC-898) probe ([ray-project#63197](ray-project#63197)) and the obsolete-env-var removal in [ray-project#63196](ray-project#63196). Strategy context: `anyscale/docs:strategy/ray-docs/sphinx-rtd-viability.md` "Low effort" section. This is the bottom of a stacked series: 1. **ray-project#63343 — sphinxext-opengraph (this PR)** 2. [ray-project#63344](ray-project#63344) — pydata-sphinx-theme bump 3. [ray-project#63359](ray-project#63359) — notebook `language_info.name` fix 4. [ray-project#63360](ray-project#63360) — myst-nb 1.4.0 bump [DOC-933](https://anyscale1.atlassian.net/browse/DOC-933) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: Alexandr Plashchinsky <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
## Why Add `sphinxext-opengraph` — per-page Open Graph metadata. `ogp_site_url` is pinned to `html_baseurl` so the `og:url` tag stays aligned with Sphinx's `<link rel="canonical">`. Improves rich-link previews when docs pages get shared and tightens SEO signal. Low-effort additive change called out as a Bucket 1 quick win in the Anyscale docs team's agent-friendliness assessment. ## What - `doc/requirements-doc.txt`: add `sphinxext-opengraph==0.13.0`. - `doc/source/conf.py`: append `"sphinxext.opengraph"` to `extensions`; set `ogp_site_url = html_baseurl`. - `python/deplocks/docs/docbuild_depset_py3.10.lock`: package entry plus via-comment addition on `sphinx` (the only runtime dep, already pinned, so no further transitives). Matches the manual-lock-edit pattern used in [ray-project#63130](ray-project#63130). ## Verification After this lands and `latest` rebuilds: - A representative doc page's `<head>` includes `<meta property="og:*">` tags reflecting page title, description, and the site URL. - No new warnings in the RtD build log (`fail_on_warning: true`). ## Extension diligence [`sphinxext-opengraph`](https://github.com/sphinx-doc/sphinxext-opengraph) — official `sphinx-doc` org project, BSD-2-Clause. Latest release 0.13.0 (March 2026). Pure-Python, depends only on Sphinx (already pinned to 7.3.7), no system-level requirements. ## What changed in the force-push This PR originally also bundled [`sphinx-notfound-page`](https://github.com/readthedocs/sphinx-notfound-page) to give the Ray docs a 404 page with absolute URLs. Dropped on 2026-05-15 because the RtD PR preview build surfaced a sitewide regression: 732 of 756 `<a class="reference internal">` sidebar hrefs were emitted with a `.//en/<ver>/...` prefix that doubles when the browser resolves them against the build's `/en/<ver>/` deploy path. Production docs.ray.io (which doesn't have the extension) was unaffected (0/747 hrefs). The cause is sphinx-notfound-page's `html-page-context` hook: it overrides `pathto`/`toctree` for **every** page in the build, prepending a URL prefix derived from `READTHEDOCS_CANONICAL_URL`. The extension docs imply this is "for the 404 page only," but the override fires on every page-context event. On a PR preview where the canonical URL differs from `html_baseurl`, this produces the doubled-prefix anti-pattern across the entire sidebar. The 404-page-with-absolute-URLs goal is tracked separately so it can be re-attempted with a config or extension that doesn't break sitewide navigation. Options to revisit: `notfound_urls_prefix = None`, a custom 404 template that bypasses the global `pathto` override, or `html_extra_path` with a static 404. ## Context Part of the [DOC-932](https://anyscale1.atlassian.net/browse/DOC-932) campaign: Ray docs dependency upgrades. Pattern mirrors the merged [DOC-898](https://anyscale1.atlassian.net/browse/DOC-898) probe ([ray-project#63197](ray-project#63197)) and the obsolete-env-var removal in [ray-project#63196](ray-project#63196). Strategy context: `anyscale/docs:strategy/ray-docs/sphinx-rtd-viability.md` "Low effort" section. This is the bottom of a stacked series: 1. **ray-project#63343 — sphinxext-opengraph (this PR)** 2. [ray-project#63344](ray-project#63344) — pydata-sphinx-theme bump 3. [ray-project#63359](ray-project#63359) — notebook `language_info.name` fix 4. [ray-project#63360](ray-project#63360) — myst-nb 1.4.0 bump [DOC-933](https://anyscale1.atlassian.net/browse/DOC-933) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: 400Ping <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Anyscale docs team is auditing
doc/source/conf.pyagainst current Ray state as part of strategy work tracked in anyscale/docs#2064. One finding: the last two lines of conf.py force two env vars unconditionally:RAY_TRAIN_V2_ENABLED=1was added when Train v2 was opt-in. Justin Yu's #57857 (Oct 2025) made Train v2 the default. The conf.py force should now be vestigial.RAY_DOC_BUILD=1is intentional and stays — it switches Ray-internal code paths during doc generation.What this PR does
Drops the
os.environ["RAY_TRAIN_V2_ENABLED"] = "1"line fromdoc/source/conf.py.How to validate
This is a probe, not a request-for-merge. The validation surfaces are:
fail_on_warning: trueset in.readthedocs.yaml, any new Sphinx warning means the line was still load-bearing.doc: check API doc consistency— premerge step that runsmake -C doc/ htmlinternally. Same fail-on-warning gate.If the build is clean and the API ref renders identically, this line can be dropped.
What happens if I'm wrong
If
RAY_TRAIN_V2_ENABLED=1is still load-bearing, the doc build will surface the dependency (likely as a missing-reference or autosummary failure). I revert and document the actual reason it's still needed.Status
Draft. Posting for visibility and validation, not for merge. Looking for confirmation from a Ray maintainer (Justin Yu @justinvyu would be the natural reviewer given Train v2 ownership) that there's no non-obvious reason to keep this. Happy to close if there is.
🤖 Generated with Claude Code