diff --git a/CHANGELOGS.rst b/CHANGELOGS.rst index fc5852ed..0f9b7f7d 100644 --- a/CHANGELOGS.rst +++ b/CHANGELOGS.rst @@ -4,6 +4,7 @@ Change Logs 0.7.14 ++++++ +* :pr:`252`: adds new set of inputs for task texgt-generation * :pr:`250`: add variables to track sequence nodes * :pr:`249`: patches _maybe_broadcast to support a corner case diff --git a/onnx_diagnostic/_command_lines_parser.py b/onnx_diagnostic/_command_lines_parser.py index 2c6f72b1..8632d34f 100644 --- a/onnx_diagnostic/_command_lines_parser.py +++ b/onnx_diagnostic/_command_lines_parser.py @@ -400,12 +400,17 @@ def get_parser_validate() -> ArgumentParser: position_ids is usually not needed, they can be removed by adding: - --drop position_ids + --drop position_ids The behaviour may be modified compare the original configuration, the following argument can be rope_scaling to dynamic: - --mop \"rope_scaling={'rope_type': 'dynamic', 'factor': 10.0}\"" + --mop \"rope_scaling={'rope_type': 'dynamic', 'factor': 10.0}\"" + + You can profile the command line by running: + + pyinstrument -m onnx_diagnostic validate ... + pyinstrument -r html -o profile.html -m onnx_diagnostic validate ... """ ), formatter_class=RawTextHelpFormatter, diff --git a/onnx_diagnostic/torch_models/validate.py b/onnx_diagnostic/torch_models/validate.py index 9bccf9f1..e90c3420 100644 --- a/onnx_diagnostic/torch_models/validate.py +++ b/onnx_diagnostic/torch_models/validate.py @@ -419,14 +419,14 @@ def validate_model( such as ``input_empty_cache`` which refers to a set of inputs using an empty cache. """ - validation_begin = time.perf_counter() + main_validation_begin = time.perf_counter() model_id, subfolder, same_as_pretrained, use_pretrained = _preprocess_model_id( model_id, subfolder, same_as_pretrained=same_as_pretrained, use_pretrained=use_pretrained, ) - time_preprocess_model_id = time.perf_counter() - validation_begin + time_preprocess_model_id = time.perf_counter() - main_validation_begin default_patch = dict(patch_transformers=True, patch_diffusers=True, patch=True) if isinstance(patch, bool): patch_kwargs = default_patch if patch else dict(patch=False) @@ -921,7 +921,7 @@ def validate_model( summary.update(summary_valid) _compute_final_statistics(summary) - summary["time_total"] = time.perf_counter() - validation_begin + summary["time_total"] = time.perf_counter() - main_validation_begin if verbose: print("[validate_model] -- done (final)")