Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _unittests/ut_torch_models/test_validate_whole_models1.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def test_g_validate_model_onnx_dynamo_os_ort(self):
@hide_stdout()
@ignore_warnings(FutureWarning)
@requires_experimental()
@requires_transformers("4.52") # empty_cache None does not work
def test_i_validate_model_custom(self):
mid = "arnir0/Tiny-LLM"
summary, data = validate_model(
Expand Down Expand Up @@ -150,6 +151,7 @@ def test_i_validate_model_custom(self):
@requires_torch("2.7")
@hide_stdout()
@ignore_warnings(FutureWarning)
@requires_transformers("4.52") # empty_cache None does not work
@requires_experimental()
def test_j_validate_model_custom_torch(self):
mid = "arnir0/Tiny-LLM"
Expand Down
6 changes: 4 additions & 2 deletions onnx_diagnostic/helpers/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,8 @@ def max_diff(

You may use :func:`string_diff` to display the discrepancies in one string.
"""
if verbose >= 10:
print(f"[max_diff] {type(expected)} ? {type(got)}")
if expected is None and got is None:
return dict(abs=0, rel=0, sum=0, n=0, dnan=0)

Expand Down Expand Up @@ -1061,8 +1063,8 @@ def max_diff(
if expected.__class__.__name__ == "CausalLMOutputWithPast":
if verbose >= 6:
print(
f"[max_diff] CausalLMOutputWithPast: {string_type(expected)} "
f"? {string_type(got)}"
f"[max_diff] CausalLMOutputWithPast: {string_type(expected, with_shape=True)} "
f"? {string_type(got, with_shape=True)}"
)
if got.__class__.__name__ == "CausalLMOutputWithPast":
return max_diff(
Expand Down
Loading
Loading