Skip to content

Commit d644371

Browse files
Merge branch 'dev' into 4980-get-wsi-at-mpp
2 parents 5059b14 + 8ee3f89 commit d644371

8 files changed

Lines changed: 67 additions & 14 deletions

File tree

.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

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

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/integration/test_pad_collation.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111

1212
from __future__ import annotations
1313

14+
import os
1415
import random
1516
import unittest
17+
from contextlib import redirect_stderr
1618
from functools import wraps
1719

1820
import numpy as np
@@ -35,7 +37,7 @@
3537
RandZoomd,
3638
ToTensor,
3739
)
38-
from monai.utils import set_determinism
40+
from monai.utils import first, set_determinism
3941

4042

4143
@wraps(pad_list_data_collate)
@@ -97,8 +99,9 @@ def test_pad_collation(self, t_type, collate_method, transform):
9799
# Default collation should raise an error
98100
loader_fail = DataLoader(dataset, batch_size=10)
99101
with self.assertRaises(RuntimeError):
100-
for _ in loader_fail:
101-
pass
102+
# stifle PyTorch error reporting, we expect failure so don't need to look at it
103+
with open(os.devnull) as f, redirect_stderr(f):
104+
_ = first(loader_fail)
102105

103106
# Padded collation shouldn't
104107
loader = DataLoader(dataset, batch_size=10, collate_fn=collate_method)

0 commit comments

Comments
 (0)