Skip to content

Commit

Permalink
auto updates (Project-MONAI#7807)
Browse files Browse the repository at this point in the history
Signed-off-by: monai-bot <[email protected]>

Signed-off-by: monai-bot <[email protected]>
Co-authored-by: YunLiu <[email protected]>
  • Loading branch information
2 people authored and hyacinth97223 committed May 27, 2024
1 parent ad6a433 commit 7bba1bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions monai/bundle/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# limitations under the License.

from __future__ import annotations
from io import StringIO

import ast
import json
Expand Down Expand Up @@ -116,10 +117,20 @@ def _pop_args(src: dict, *args: Any, **kwargs: Any) -> tuple:


def _log_input_summary(tag: str, args: dict) -> None:
logger.info(f"--- input summary of monai.bundle.scripts.{tag} ---")
<<<<<<< HEAD
log_buffer = StringIO()
log_buffer.write(f"--- input summary of monai.bundle.scripts.{tag} ---\n")
for name, val in args.items():
logger.info(f"> {name}: {pprint_edges(val, PPRINT_CONFIG_N)}")
logger.info("---\n\n")
log_buffer.write(f"> {name}: {pprint_edges(val, PPRINT_CONFIG_N)}\n")
log_buffer.write("---\n\n")
=======
log_buffer = StringIO()
log_buffer.write(f"--- input summary of monai.bundle.scripts.{tag} ---\n")
for name, val in args.items():
log_buffer.write(f"> {name}: {pprint_edges(val, PPRINT_CONFIG_N)}\n")
log_buffer.write("---\n\n")
>>>>>>> 28f5ebe7e3a0487b9d78123a80d565f1fa26615a
logger.info(log_buffer.getvalue()) # output all content in buffer


def _get_var_names(expr: str) -> list[str]:
Expand Down
1 change: 1 addition & 0 deletions tests/test_clip_intensity_percentiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@


class TestClipIntensityPercentiles2D(NumpyImageTestCase2D):

@parameterized.expand([[p] for p in TEST_NDARRAYS])
def test_hard_clipping_two_sided(self, p):
hard_clipper = ClipIntensityPercentiles(upper=95, lower=5)
Expand Down

0 comments on commit 7bba1bd

Please sign in to comment.