MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_integration_value

Function test_integration_value

tests/testing_data/integration_answers.py:341–351  ·  view source on GitHub ↗
(test_name, key, data, rtol=1e-2)

Source from the content-addressed store, hash-verified

339
340
341def test_integration_value(test_name, key, data, rtol=1e-2):
342 for idx, expected in enumerate(EXPECTED_ANSWERS):
343 if test_name not in expected:
344 continue
345 if key not in expected[test_name]:
346 continue
347 value = expected[test_name][key]
348 if np.allclose(data, value, rtol=rtol):
349 print(f"matched {idx} result of {test_name}, {key}, {rtol}.")
350 return True
351 raise ValueError(f"no matched results for {test_name}, {key}. {data}.")

Callers 4

train_and_inferMethod · 0.90
train_and_inferMethod · 0.90
_test_saved_filesMethod · 0.90
train_and_inferMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…