Skip to content

Working setup with runnable PyTorch on Codex. #159968

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

Closed
wants to merge 4 commits into from

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Aug 6, 2025

Stack from ghstack (oldest at bottom):

Sample transcript: https://chatgpt.com/s/cd_68938effc1a88191ae78bc82a8cefe94

This makes use of #159965 to bypass doing an actual build and use nightly.

Things to improve:

  • Once USE_NIGHTLY is in main can remove the patching
  • We should just keep using the latest nightly, instead of a hard coded one

Signed-off-by: Edward Yang ezyang@meta.com

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Aug 6, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/159968

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit d87c7bc with merge base 79eca46 (image):

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

  • pull / linux-jammy-py3_9-clang9-xla / test (xla, 1, 1, lf.linux.12xlarge, unstable) (gh) (#158876)
    /var/lib/jenkins/workspace/xla/torch_xla/csrc/runtime/BUILD:476:14: Compiling torch_xla/csrc/runtime/xla_util_test.cpp failed: (Exit 1): gcc failed: error executing CppCompile command (from target //torch_xla/csrc/runtime:xla_util_test) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 229 arguments skipped)

This comment was automatically generated by Dr. CI and updates every 15 minutes.

ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 47d7105
Pull-Request: #159968
@ezyang ezyang requested review from seemethere, malfet and wdvr August 6, 2025 17:21
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 47d7105
Pull-Request: #159968
codex_setup.sh Outdated
Comment on lines 4 to 7
#COMMIT=$(curl -s https://api.github.com/repos/pytorch/pytorch/branches/nightly | jq ".commit.commit.message" | sed -E 's/.*\(([0-9a-f]{40})\).*/\1/')
git reset --hard 74a754aae98aabc2aca67e5edb41cc684fae9a82
curl https://patch-diff.githubusercontent.com/raw/pytorch/pytorch/pull/159965.diff | patch -p1
USE_NIGHTLY=2.9.0.dev20250806+cpu python setup.py develop
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not checkout the nightly branch and pull in the latest nightly? These two should give you matching versions (expect for ~1h in the middle of the night).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't checkout nightly branch, Codex does a very minimal git checkout that doesn't even have origin remote setup

ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 47d7105
Pull-Request: #159968
[ghstack-poisoned]
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 45b02bd
Pull-Request: #159968
[ghstack-poisoned]
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 5adda6c
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 5adda6c
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 5adda6c
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 5adda6c
Pull-Request: #159968
[ghstack-poisoned]
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 132668d
Pull-Request: #159968
ezyang added a commit that referenced this pull request Aug 6, 2025
Signed-off-by: Edward Yang <ezyang@meta.com>
ghstack-source-id: 132668d
Pull-Request: #159968
@ezyang
Copy link
Contributor Author

ezyang commented Aug 8, 2025

@pytorchbot merge -f "unrelated failure"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

hinriksnaer pushed a commit to hinriksnaer/pytorch that referenced this pull request Aug 8, 2025
Sample transcript: https://chatgpt.com/s/cd_68938effc1a88191ae78bc82a8cefe94

This makes use of pytorch#159965 to bypass doing an actual build and use nightly.

Things to improve:
- Once USE_NIGHTLY is in main can remove the patching
- We should just keep using the latest nightly, instead of a hard coded one

Signed-off-by: Edward Yang <ezyang@meta.com>
Pull Request resolved: pytorch#159968
Approved by: https://github.com/wdvr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants