mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[conda] Remove conda from lint-autoformat.yml (#152433)
Installs setuptools since I get https://github.com/pytorch/pytorch/actions/runs/14736804186/job/41364832984#step:5:60 ``` + python3 -m tools.generate_torch_version --is_debug=false Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/home/ec2-user/actions-runner/_work/pytorch/pytorch/tools/generate_torch_version.py", line 9, in <module> from setuptools import distutils # type: ignore[import] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'setuptools' ``` It should be a no op in the normal lint workflow since setuptools is in the docker image Switched from using python3.10 to system python, which should be python3.9 Use venv to put deps not in the base? Pull Request resolved: https://github.com/pytorch/pytorch/pull/152433 Approved by: https://github.com/huydhn
This commit is contained in:
parent
2cfc1faa27
commit
a04f4622e1
2
.github/scripts/lintrunner.sh
vendored
2
.github/scripts/lintrunner.sh
vendored
|
|
@ -2,7 +2,7 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# Use uv to speed up lintrunner init
|
# Use uv to speed up lintrunner init
|
||||||
python3 -m pip install uv==0.1.45
|
python3 -m pip install uv==0.1.45 setuptools
|
||||||
|
|
||||||
CACHE_DIRECTORY="/tmp/.lintbin"
|
CACHE_DIRECTORY="/tmp/.lintbin"
|
||||||
# Try to recover the cached binaries
|
# Try to recover the cached binaries
|
||||||
|
|
|
||||||
7
.github/workflows/lint-autoformat.yml
vendored
7
.github/workflows/lint-autoformat.yml
vendored
|
|
@ -19,14 +19,13 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup miniconda
|
|
||||||
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
- name: Run lintrunner (nonretryable)
|
- name: Run lintrunner (nonretryable)
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
# we can't run all files here because only changes around where the diff are shown in the PR UI
|
# we can't run all files here because only changes around where the diff are shown in the PR UI
|
||||||
run: |
|
run: |
|
||||||
|
set -ex
|
||||||
|
python3 -m venv /tmp/venv
|
||||||
|
source /tmp/venv/bin/activate
|
||||||
export ADDITIONAL_LINTRUNNER_ARGS="format"
|
export ADDITIONAL_LINTRUNNER_ARGS="format"
|
||||||
bash .github/scripts/lintrunner.sh
|
bash .github/scripts/lintrunner.sh
|
||||||
- name: Check for changes
|
- name: Check for changes
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user