Skip to content

Studio tests: pin the host machine in the torch ceiling freeze test - #19772

Merged
danielhanchen merged 1 commit into
mainfrom
fix-ceiling-test-host-machine
Nov 26, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-ceiling-test-host-machine

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

On Apple Silicon macOS runners, studio/backend/tests/test_cu130_repair_torch_specs.py::test_core_update_freezes_only_torch_past_the_released_ceiling[darwin-2.13.0-False] fails. For example, the macos-26 leg of the cross-platform staging run for #19762:

    assert mod._TORCH_FREEZE_ACTIVE is pinned
E   AssertionError: assert True is False

The test passes on Linux, which is why the normal CI shards never show it.

Cause

  • Studio: keep an Apple Silicon install's torch through studio update #18659 made _FreezeNewTorchForCoreUpdate keep an Apple Silicon install's torch at any release: sys.platform == "darwin" and platform.machine() == "arm64".
  • This test fakes sys.platform per row but read the real platform.machine(). Its darwin row expects no freeze, so the row really means Intel macOS.
  • On an x64 Linux runner the machine is x86_64 and the row passes. On an arm64 macOS runner it is arm64, the freeze engages, and the row fails.

The code is correct, and Apple Silicon's freeze is already covered by test_macos_core_update_torch_freeze.py. The test is host-dependent.

Fix

Pin platform.machine() to x86_64 in this test, so every row describes an x64 host and the darwin row is Intel macOS on any runner. No product code changes.

Verification

To reproduce an Apple Silicon host on Linux, a small plugin sets platform.machine = lambda: "arm64" before the session:

Arm Simulated arm64 host Native x86_64 host
main 6a3a230 1 failed, 57 passed: the same darwin-2.13.0-False row as the macos-26 job 58 passed
this branch 58 passed 58 passed

Sabotage: making the freeze apply to every macOS machine (dropping the platform.machine() == "arm64" check in studio/install_python_stack.py) fails the darwin row on this branch. The row therefore still guards that Intel macOS is not frozen.

#19762 edits the same parametrize list. Its own macOS failure is this one, so it will pass once this lands.

The darwin row stands for Intel macOS, but the test read the real
platform.machine(). Since #18659 Apple Silicon keeps its torch at any
release, so on an arm64 macOS runner the row froze and failed.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T14:20:09.904457Z 41399eb Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 41399ebc2b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit c34af03 into main Nov 26, 2026
@danielhanchen
danielhanchen deleted the fix-ceiling-test-host-machine branch November 26, 2026 14:22
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.

1 participant