Skip to content
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

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

Merged
merged 5 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {} \;
KumoLiu marked this conversation as resolved.
Show resolved Hide resolved
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
Loading