Skip to content

Commit

Permalink
update rm -rf /opt/hostedtoolcache avoid change the python version (P…
Browse files Browse the repository at this point in the history
…roject-MONAI#7424)

Fixes Project-MONAI#7416

### Description

update `rm -rf /opt/hostedtoolcache` avoid change the python version

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: YunLiu <[email protected]>
  • Loading branch information
KumoLiu committed Feb 1, 2024
1 parent df4cf92 commit cd36c1c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: docker_build
shell: bash
run: |
rm -rf /opt/hostedtoolcache
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
docker --version
# get tag info for versioning
cat _version.py
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
python -m pip install --user --upgrade setuptools wheel
- name: Build and test source archive and wheel file
run: |
rm -rf /opt/hostedtoolcache
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
root_dir=$PWD
echo "$root_dir"
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
python-version: '3.9'
- shell: bash
run: |
rm -rf /opt/hostedtoolcache
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
git describe
python -m pip install --user --upgrade setuptools wheel
python setup.py build
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
RELEASE_VERSION: ${{ steps.versioning.outputs.tag }}
shell: bash
run: |
rm -rf /opt/hostedtoolcache
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
# get tag info for versioning
mv _version.py monai/
# version checks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/setupapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
rm -rf /opt/hostedtoolcache
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
- name: Run quick tests CPU ubuntu
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: Install the default branch with build (dev branch only)
if: github.ref == 'refs/heads/dev'
run: |
rm -rf /opt/hostedtoolcache
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
BUILD_MONAI=1 pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
python -c 'import monai; monai.config.print_config()'
- name: Get the test cases (dev branch only)
Expand Down
2 changes: 1 addition & 1 deletion monai/transforms/smooth_field/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(
self.set_spatial_size(spatial_size)

def randomize(self, data: Any | None = None) -> None:
self.field[self.rand_slices] = torch.from_numpy(self.R.uniform(self.low, self.high, self.crand_size))
self.field[self.rand_slices] = torch.from_numpy(self.R.uniform(self.low, self.high, self.crand_size)) # type: ignore[index]

def set_spatial_size(self, spatial_size: Sequence[int] | None) -> None:
"""
Expand Down

0 comments on commit cd36c1c

Please sign in to comment.