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
1 change: 1 addition & 0 deletions CHANGELOGS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Change Logs
0.4.0
+++++

* :pr:`63`: support option ``--trained``
* :pr:`61`: improves dynamic shapes for EncoderDecoderCache
* :pr:`58`: add function use_dyn_not_str to replace string by ``torch.export.Dim.DYNAMIC``,
use string instead of ``torch.export.Dim.DYNAMIC`` when returning the dynamic shapes
Expand Down
9 changes: 6 additions & 3 deletions onnx_diagnostic/torch_models/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ def validate_model(
:return: two dictionaries, one with some metrics,
another one with whatever the function produces
"""
assert not trained, f"trained={trained} not supported yet"
summary = version_summary()

summary.update(
Expand Down Expand Up @@ -270,14 +269,18 @@ def validate_model(
begin = time.perf_counter()
if quiet:
try:
data = get_untrained_model_with_inputs(model_id, verbose=verbose, task=task)
data = get_untrained_model_with_inputs(
model_id, verbose=verbose, task=task, same_as_pretrained=trained
)
except Exception as e:
summary["ERR_create"] = str(e)
data["ERR_create"] = e
summary["time_create"] = time.perf_counter() - begin
return summary, {}
else:
data = get_untrained_model_with_inputs(model_id, verbose=verbose, task=task)
data = get_untrained_model_with_inputs(
model_id, verbose=verbose, task=task, same_as_pretrained=trained
)

if drop_inputs:
if verbose:
Expand Down
Loading