File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 branches :
1111 - dev
1212
13+
1314env :
1415 PYTHON_VER : ' 3.10'
1516 PYTORCH_VER : ' 2.8.0'
@@ -66,10 +67,12 @@ jobs:
6667 cache : ' pip'
6768 - name : Install tools
6869 run : |
69- python -m pip install -U pip build
70+ python -m pip install -U pip build twine
7071 - name : Build distribution
7172 run : |
7273 export HEAD_COMMIT_ID=$(git rev-parse HEAD)
74+ # remove git clone dependencies, see https://github.com/Project-MONAI/MONAI/issues/5882
75+ sed -i /git+/d pyproject.toml
7376 sed -i 's/name\ =\ "monai"$/name\ =\ "monai-weekly"/g' pyproject.toml
7477 echo "__commit_id__ = \"$HEAD_COMMIT_ID\"" >> monai/__init__.py
7578 git diff pyproject.toml monai/__init__.py
@@ -87,11 +90,12 @@ jobs:
8790 ls -lh dist
8891 - name : Test Installation
8992 run : |
93+ twine check --strict dist/*
9094 pip install dist/*.whl
9195 pip list
9296 (cd "$(mktemp -d)" && python -c 'import monai; print(monai.__version__)')
9397 - name : Publish to PyPI
94- if : github.event_name == 'schedule' # only publish on cron run
98+ if : github.event_name == 'schedule' # only publish on cron run
9599 uses : pypa/gh-action-pypi-publish@release/v1
96100 with :
97101 user : __token__
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ def torch_profiler_full(func):
5757
5858 @wraps (func )
5959 def wrapper (* args , ** kwargs ):
60- with torch .autograd .profiler .profile () as prof :
60+ with torch .autograd .profiler .profile (use_device = "cuda" ) as prof :
6161 result = func (* args , ** kwargs )
6262
6363 print (prof , flush = True )
@@ -76,7 +76,7 @@ def torch_profiler_time_cpu_gpu(func):
7676
7777 @wraps (func )
7878 def wrapper (* args , ** kwargs ):
79- with torch .autograd .profiler .profile () as prof :
79+ with torch .autograd .profiler .profile (use_device = "cuda" ) as prof :
8080 result = func (* args , ** kwargs )
8181
8282 cpu_time = prof .self_cpu_time_total
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ jsonschema = ["jsonschema"]
125125lmdb = [" lmdb" ]
126126lpips = [" lpips==0.1.4" ]
127127matplotlib = [" matplotlib>=3.6.3" ]
128+ # per #5882 this requirement must be on one line to get removed by sed in weekly-preview.yml
128129metrics_reloaded = [" MetricsReloaded @ git+https://github.com/Project-MONAI/MetricsReloaded@monai-support" ]
129130mlflow = [" mlflow>=3.15.2" ]
130131nibabel = [" nibabel" ]
@@ -147,6 +148,7 @@ pynrrd = ["pynrrd"]
147148pynvml = [" nvidia-ml-py" ]
148149pyyaml = [" pyyaml" ]
149150requests = [" requests" ]
151+ # per #5882 this requirement must be on one line to get removed by sed in weekly-preview.yml
150152segment_anything = [" segment_anything @ git+https://github.com/facebookresearch/segment-anything.git@6fdee8f2727f4506cfbbe553e23b895e27956588" ]
151153scipy = [" scipy>=1.12.0" ]
152154skimage = [" scikit-image>=0.19.0" ]
You can’t perform that action at this time.
0 commit comments