Skip to content

Commit 0043abf

Browse files
committed
fix deprecation warning
1 parent 27ef747 commit 0043abf

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

bioimageio/core/_resource_tests.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,16 @@ def _handle_legacy_precision_args(
409409
"absolute_tolerance": absolute_tolerance,
410410
"relative_tolerance": relative_tolerance,
411411
}
412+
else:
413+
warnings.warn(
414+
"The argument `decimal` has been depricated in favour of "
415+
+ "`relative_tolerance` and `absolute_tolerance`, with different validation "
416+
+ "logic, using `numpy.testing.assert_allclose, see "
417+
+ "'https://numpy.org/doc/stable/reference/generated/"
418+
+ "numpy.testing.assert_allclose.html'. Passing a value for `decimal` will "
419+
+ "cause validation to revert to the old behaviour."
420+
)
412421

413-
warnings.warn(
414-
"The argument `decimal` has been depricated in favour of "
415-
+ "`relative_tolerance` and `absolute_tolerance`, with different validation "
416-
+ "logic, using `numpy.testing.assert_allclose, see "
417-
+ "'https://numpy.org/doc/stable/reference/generated/"
418-
+ "numpy.testing.assert_allclose.html'. Passing a value for `decimal` will "
419-
+ "cause validation to revert to the old behaviour."
420-
)
421422
# decimal overrides new behaviour,
422423
# have to convert the params to emulate old behaviour
423424
return {
@@ -426,6 +427,7 @@ def _handle_legacy_precision_args(
426427
}
427428

428429

430+
# TODO: Implement `debug_model()`
429431
# def debug_model(
430432
# model_rdf: Union[RawResourceDescr, ResourceDescr, URI, Path, str],
431433
# *,

0 commit comments

Comments
 (0)