Skip to content

Conversation

@huydhn
Copy link
Contributor

@huydhn huydhn commented Oct 29, 2024

I think this is a regression. CI needs to use PyTorch built from the pinned commit instead of installing nightly (using install_requirements.sh). Otherwise, both PT and ET CI won't be able to catch regression against their latest commits.

Various examples:

I attempt to fix the issue by instroducing --use-pt-pinned-commit to install_requirements.sh, so that it can keep the current behavior of installing pinned PT nightly when running locally while use pinned PT commit on CI. Note that the Docker image only has the pinned PT commit installed.

Testing

The correct PyTorch built from the pinned commit (23d590e518688f96e1d1947a08e9ca27df3e67e4) is used https://github.com/pytorch/executorch/actions/runs/11601294150/job/32303693643#step:12:6496

On the other hand, using nightly looks like https://github.com/pytorch/executorch/actions/runs/11600922135/job/32302497353#step:12:6552

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 29, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit f3ce7ef with merge base 1f38016 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 29, 2024
@huydhn huydhn marked this pull request as draft October 29, 2024 22:35
@huydhn huydhn marked this pull request as ready for review October 30, 2024 21:43
@@ -1,5 +1,5 @@
mpmath==1.3.0
numpy==1.22.0; python_version == '3.10'
numpy==1.21.3; python_version == '3.10'
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. Thanks for making it match pyproject.toml https://github.com/pytorch/executorch/blob/main/pyproject.toml#L58-L60

Copy link
Contributor

@guangy10 guangy10 left a comment

Choose a reason for hiding this comment

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

Thanks for the CI improvement!

if USE_PYTORCH_NIGHTLY:
# pip packages needed by exir.
EXIR_REQUIREMENTS = [
f"torch==2.6.0.{NIGHTLY_VERSION}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
f"torch==2.6.0.{NIGHTLY_VERSION}",
f"torch==2.6.0.{NIGHTLY_VERSION}" if USE_PYTORCH_NIGHTLY else "torch",

Maybe this is cleaner, so you don't have to specify other packages in both branches?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good idea, that looks nicer indeed

# The pip repository that hosts nightly torch packages.
TORCH_NIGHTLY_URL = "https://download.pytorch.org/whl/nightly/cpu"

# pip packages needed by exir.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you keep the comment for why the version is not needed when fetching nightly here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I thought that I have mention it in the argument section above. But I could add the comment back if you think it's closed to the code

@huydhn huydhn merged commit a6328f0 into main Nov 1, 2024
77 checks passed
@huydhn huydhn deleted the do-not-use-nightly-in-ci branch November 1, 2024 03:53
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Nov 6, 2024
After landing pytorch/executorch#6564, we need to update the pinned ExecuTorch commit on PyTorch is fix the regression on PyTorch side.  The change to `.ci/docker/common/install_executorch.sh` is needed because it's how the dependencies are setup on ExecuTorch CI now.
Pull Request resolved: #139700
Approved by: https://github.com/larryliu0820, https://github.com/malfet
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
After landing pytorch/executorch#6564, we need to update the pinned ExecuTorch commit on PyTorch is fix the regression on PyTorch side.  The change to `.ci/docker/common/install_executorch.sh` is needed because it's how the dependencies are setup on ExecuTorch CI now.
Pull Request resolved: pytorch#139700
Approved by: https://github.com/larryliu0820, https://github.com/malfet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants