Skip to content

Commit 2f0964c

Browse files
authored
Merge branch 'dev' into dev
2 parents d3317d0 + 1dc0e68 commit 2f0964c

36 files changed

+958
-1026
lines changed

.coderabbit.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
3+
# This file configures CodeRabbit with the various options described in https://docs.coderabbit.ai/configure-coderabbit.
4+
# CodeRabbit also has a set of commands here: https://docs.coderabbit.ai/guides/commands/
5+
6+
language: "en-US"
7+
early_access: false
8+
tone_instructions: "Be terse and to the point in all statements and commentary."
9+
reviews:
10+
# chill is less verbose, assertive is more verbose with more nitpick feedback
11+
profile: chill
12+
high_level_summary: false
13+
high_level_summary_placeholder: "@coderabbitai summary"
14+
sequence_diagrams: false
15+
auto_apply_labels: false
16+
suggested_reviewers: false
17+
changed_files_summary: false
18+
suggested_labels: false
19+
abort_on_close: true
20+
poem: false
21+
path_instructions:
22+
- path: '**/*.md'
23+
instructions: Remember that documentation must be updated with the latest information.
24+
- path: '**/*.rst'
25+
instructions: Remember that documentation must be updated with the latest information.
26+
- path: '**/*.py'
27+
instructions: >-
28+
Review the Python code for quality and correctness. Ensure variable names adhere to PEP8 style guides, are
29+
sensible and informative in regards to their function, though permitting simple names for loop and comprehension
30+
variables. Ensure routine names are meaningful in regards to their function and use verbs, adjectives, and
31+
nouns in a semantically appropriate way. Docstrings should be present for all definition which describe each
32+
variable, return value, and raised exception in the appropriate section of the Google-style of docstrings.
33+
Examine code for logical error or inconsistencies, and suggest what may be changed to addressed these. Suggest
34+
any enhancements for code improving efficiency, maintainability, comprehensibility, and correctness. Ensure new
35+
or modified definitions will be covered by existing or new unit tests.
36+
37+
auto_review:
38+
# Automatic Review | Automatic code review
39+
enabled: true
40+
# Review draft PRs/MRs.
41+
drafts: false
42+
# ignore PRs with these in the title, these sorts of PRs should be drafts anyway
43+
ignore_title_keywords:
44+
- "WIP"
45+
- "DO NOT MERGE"
46+
47+
# opt out for now until it's clear this isn't too much info and is useful
48+
knowledge_base:
49+
opt_out: true
50+
51+
# chat is allowed
52+
chat:
53+
auto_reply: true

.github/workflows/pythonapp-min.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
strategy:
125125
fail-fast: false
126126
matrix:
127-
pytorch-version: ['2.4.1', '2.5.1', '2.6.0'] # FIXME: add 'latest' back once PyTorch 2.7 issues are resolved
127+
pytorch-version: ['2.4.1', '2.5.1', '2.6.0', '2.7.1']
128128
timeout-minutes: 40
129129
steps:
130130
- uses: actions/checkout@v4
@@ -151,11 +151,7 @@ jobs:
151151
- name: Install the dependencies
152152
run: |
153153
# min. requirements
154-
if [ ${{ matrix.pytorch-version }} == "latest" ]; then
155-
python -m pip install torch
156-
else
157-
python -m pip install torch==${{ matrix.pytorch-version }}
158-
fi
154+
python -m pip install torch==${{ matrix.pytorch-version }}
159155
python -m pip install -r requirements-min.txt
160156
python -m pip list
161157
BUILD_MONAI=0 python setup.py develop # no compile of extensions

CONTRIBUTING.md

Lines changed: 47 additions & 20 deletions
Large diffs are not rendered by default.

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-f https://download.pytorch.org/whl/cpu/torch-2.4.1%2Bcpu-cp39-cp39-linux_x86_64.whl
2-
torch>=2.4.1, <2.7.0
2+
torch>=2.4.1
33
pytorch-ignite==0.4.11
44
numpy>=1.20
55
itk>=5.2

monai/apps/generation/maisi/networks/autoencoderkl_maisi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
232232
if self.print_info:
233233
logger.info(f"Number of splits: {self.num_splits}")
234234

235-
if self.dim_split <= 1 and self.num_splits <= 1:
235+
if self.num_splits <= 1:
236236
x = self.conv(x)
237237
return x
238238

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
requires = [
33
"wheel",
44
"setuptools",
5-
"torch>=2.4.1, <2.7.0",
5+
"torch>=2.4.1",
66
"ninja",
77
"packaging"
88
]

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pyflakes
2020
black>=25.1.0
2121
isort>=5.1, <6.0
2222
ruff
23-
pytype>=2020.6.1; platform_system != "Windows"
23+
pytype>=2020.6.1, <=2024.4.11; platform_system != "Windows"
2424
types-setuptools
2525
mypy>=1.5.0, <1.12.0
2626
ninja

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
torch>=2.4.1, <2.7.0
1+
torch>=2.4.1; platform_system != "Windows"
2+
torch>=2.4.1, !=2.7.0; platform_system == "Windows"
23
numpy>=1.24,<3.0

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ setup_requires =
4242
ninja
4343
packaging
4444
install_requires =
45-
torch>=2.4.1, <2.7.0
45+
torch>=2.4.1
4646
numpy>=1.24,<3.0
4747

4848
[options.extras_require]

tests/apps/detection/networks/test_retinanet.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from monai.networks import eval_mode
2121
from monai.networks.nets import resnet10, resnet18, resnet34, resnet50, resnet101, resnet152, resnet200
2222
from monai.utils import ensure_tuple, optional_import
23-
from tests.test_utils import SkipIfBeforePyTorchVersion, skip_if_quick, test_onnx_save, test_script_save
23+
from tests.test_utils import SkipIfBeforePyTorchVersion, dict_product, skip_if_quick, test_onnx_save, test_script_save
2424

2525
_, has_torchvision = optional_import("torchvision")
2626

@@ -86,15 +86,12 @@
8686
(2, 1, 32, 64),
8787
]
8888

89-
TEST_CASES = []
90-
for case in [TEST_CASE_1, TEST_CASE_2, TEST_CASE_3, TEST_CASE_2_A, TEST_CASE_3_A]:
91-
for model in [resnet10, resnet18, resnet34, resnet50, resnet101, resnet152, resnet200]:
92-
TEST_CASES.append([model, *case])
89+
# Create all test case combinations using dict_product
90+
CASE_LIST = [TEST_CASE_1, TEST_CASE_2, TEST_CASE_3, TEST_CASE_2_A, TEST_CASE_3_A]
91+
MODEL_LIST = [resnet10, resnet18, resnet34, resnet50, resnet101, resnet152, resnet200]
9392

94-
TEST_CASES_TS = []
95-
for case in [TEST_CASE_1]:
96-
for model in [resnet10, resnet18, resnet34, resnet50, resnet101, resnet152, resnet200]:
97-
TEST_CASES_TS.append([model, *case])
93+
TEST_CASES = [[params["model"], *params["case"]] for params in dict_product(model=MODEL_LIST, case=CASE_LIST)]
94+
TEST_CASES_TS = [[params["model"], *params["case"]] for params in dict_product(model=MODEL_LIST, case=[TEST_CASE_1])]
9895

9996

10097
@SkipIfBeforePyTorchVersion((1, 12))

0 commit comments

Comments
 (0)