-
Notifications
You must be signed in to change notification settings - Fork 706
Use pinned commit PyTorch on CI instead of nightly #6564
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
Changes from 8 commits
38bf48e
364d3be
d45886d
3260158
a4c3188
6a1753e
2a8b480
3d41e75
f3ce7ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| bd5482c7c3e1197e10c46ff739027f917d9c1fcc | ||
| 23d590e518688f96e1d1947a08e9ca27df3e67e4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,7 @@ def python_is_compatible(): | |
| EXECUTORCH_BUILD_PYBIND = "OFF" | ||
| CMAKE_ARGS = os.getenv("CMAKE_ARGS", "") | ||
| CMAKE_BUILD_ARGS = os.getenv("CMAKE_BUILD_ARGS", "") | ||
| USE_PYTORCH_NIGHTLY = True | ||
|
|
||
| for arg in sys.argv[1:]: | ||
| if arg == "--pybind": | ||
|
|
@@ -90,6 +91,11 @@ def python_is_compatible(): | |
| shutil.rmtree(d, ignore_errors=True) | ||
| print("Done cleaning build artifacts.") | ||
| sys.exit(0) | ||
| elif arg == "--use-pt-pinned-commit": | ||
| # This option is used in CI to make sure that PyTorch build from the pinned commit | ||
| # is used instead of nightly. CI jobs wouldn't be able to catch regression from the | ||
| # latest PT commit otherwise | ||
| USE_PYTORCH_NIGHTLY = False | ||
| else: | ||
| print(f"Error: Unknown option {arg}") | ||
| sys.exit(1) | ||
|
|
@@ -113,11 +119,24 @@ def python_is_compatible(): | |
|
|
||
| # pip packages needed by exir. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| EXIR_REQUIREMENTS = [ | ||
| f"torch==2.6.0.{NIGHTLY_VERSION}", | ||
| f"torchvision==0.20.0.{NIGHTLY_VERSION}", # For testing. | ||
| f"torch==2.6.0.{NIGHTLY_VERSION}" if USE_PYTORCH_NIGHTLY else "torch", | ||
| ( | ||
| f"torchvision==0.20.0.{NIGHTLY_VERSION}" | ||
| if USE_PYTORCH_NIGHTLY | ||
| else "torchvision" | ||
| ), # For testing. | ||
| "typing-extensions", | ||
| ] | ||
|
|
||
| # pip packages needed to run examples. | ||
| # TODO: Make each example publish its own requirements.txt | ||
| EXAMPLES_REQUIREMENTS = [ | ||
| "timm==1.0.7", | ||
| f"torchaudio==2.5.0.{NIGHTLY_VERSION}" if USE_PYTORCH_NIGHTLY else "torchaudio", | ||
| "torchsr==1.0.4", | ||
| "transformers==4.42.4", | ||
| ] | ||
|
|
||
| # pip packages needed for development. | ||
| DEVEL_REQUIREMENTS = [ | ||
| "cmake", # For building binary targets. | ||
|
|
@@ -129,15 +148,6 @@ def python_is_compatible(): | |
| "zstd", # Imported by resolve_buck.py. | ||
| ] | ||
|
|
||
| # pip packages needed to run examples. | ||
| # TODO: Make each example publish its own requirements.txt | ||
| EXAMPLES_REQUIREMENTS = [ | ||
| "timm==1.0.7", | ||
| f"torchaudio==2.5.0.{NIGHTLY_VERSION}", | ||
| "torchsr==1.0.4", | ||
| "transformers==4.42.4", | ||
| ] | ||
|
|
||
| # Assemble the list of requirements to actually install. | ||
| # TODO: Add options for reducing the number of requirements. | ||
| REQUIREMENTS_TO_INSTALL = EXIR_REQUIREMENTS + DEVEL_REQUIREMENTS + EXAMPLES_REQUIREMENTS | ||
|
|
||
There was a problem hiding this comment.
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