Skip to content

Commit 3dc4fe1

Browse files
committed
Change one torch.load and otrher fixes
Signed-off-by: Eric Kerfoot <[email protected]>
1 parent 5db7a56 commit 3dc4fe1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/pythonapp-min.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
strategy:
125125
fail-fast: false
126126
matrix:
127-
pytorch-version: ['1.13.1', '2.0.1', '2.2.2', '2.3.1', '2.4.1', 'latest']
127+
pytorch-version: ['1.13.1', '2.0.1', '2.2.2', '2.3.1', '2.4.1', '2.5.1', 'latest']
128128
timeout-minutes: 40
129129
steps:
130130
- uses: actions/checkout@v4

monai/handlers/checkpoint_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __call__(self, engine: Engine) -> None:
122122
Args:
123123
engine: Ignite Engine, it can be a trainer, validator or evaluator.
124124
"""
125-
checkpoint = torch.load(self.load_path, map_location=self.map_location, weights_only=True)
125+
checkpoint = torch.load(self.load_path, map_location=self.map_location, weights_only=False)
126126

127127
k, _ = list(self.load_dict.items())[0]
128128
# single object and checkpoint is directly a state_dict

runtests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function print_usage {
120120

121121
# FIXME: https://github.com/Project-MONAI/MONAI/issues/4354
122122
protobuf_major_version=$("${PY_EXE}" -m pip list | grep '^protobuf ' | tr -s ' ' | cut -d' ' -f2 | cut -d'.' -f1)
123-
if [ "$protobuf_major_version" -ge "4" ]
123+
if [ ! -z "$protobuf_major_version" ] && [ "$protobuf_major_version" -ge "4" ]
124124
then
125125
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
126126
fi

0 commit comments

Comments
 (0)