Skip to content
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
8 changes: 6 additions & 2 deletions .github/workflows/weekly-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches:
- dev


env:
PYTHON_VER: '3.10'
PYTORCH_VER: '2.8.0'
Expand Down Expand Up @@ -66,10 +67,12 @@ jobs:
cache: 'pip'
- name: Install tools
run: |
python -m pip install -U pip build
python -m pip install -U pip build twine
- name: Build distribution
run: |
export HEAD_COMMIT_ID=$(git rev-parse HEAD)
# remove git clone dependencies, see https://github.com/Project-MONAI/MONAI/issues/5882
sed -i /git+/d pyproject.toml
sed -i 's/name\ =\ "monai"$/name\ =\ "monai-weekly"/g' pyproject.toml
echo "__commit_id__ = \"$HEAD_COMMIT_ID\"" >> monai/__init__.py
git diff pyproject.toml monai/__init__.py
Expand All @@ -87,11 +90,12 @@ jobs:
ls -lh dist
- name: Test Installation
run: |
twine check --strict dist/*
pip install dist/*.whl
pip list
(cd "$(mktemp -d)" && python -c 'import monai; print(monai.__version__)')
- name: Publish to PyPI
if: github.event_name == 'schedule' # only publish on cron run
if: github.event_name == 'schedule' # only publish on cron run
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down
4 changes: 2 additions & 2 deletions monai/utils/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def torch_profiler_full(func):

@wraps(func)
def wrapper(*args, **kwargs):
with torch.autograd.profiler.profile() as prof:
with torch.autograd.profiler.profile(use_device="cuda") as prof:
result = func(*args, **kwargs)

print(prof, flush=True)
Expand All @@ -76,7 +76,7 @@ def torch_profiler_time_cpu_gpu(func):

@wraps(func)
def wrapper(*args, **kwargs):
with torch.autograd.profiler.profile() as prof:
with torch.autograd.profiler.profile(use_device="cuda") as prof:
result = func(*args, **kwargs)

cpu_time = prof.self_cpu_time_total
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jsonschema = ["jsonschema"]
lmdb = ["lmdb"]
lpips = ["lpips==0.1.4"]
matplotlib = ["matplotlib>=3.6.3"]
# per #5882 this requirement must be on one line to get removed by sed in weekly-preview.yml
metrics_reloaded = ["MetricsReloaded @ git+https://github.com/Project-MONAI/MetricsReloaded@monai-support"]
mlflow = ["mlflow>=3.15.2"]
nibabel = ["nibabel"]
Expand All @@ -147,6 +148,7 @@ pynrrd = ["pynrrd"]
pynvml = ["nvidia-ml-py"]
pyyaml = ["pyyaml"]
requests = ["requests"]
# per #5882 this requirement must be on one line to get removed by sed in weekly-preview.yml
segment_anything = ["segment_anything @ git+https://github.com/facebookresearch/segment-anything.git@6fdee8f2727f4506cfbbe553e23b895e27956588"]
scipy = ["scipy>=1.12.0"]
skimage = ["scikit-image>=0.19.0"]
Expand Down
Loading