Skip to content

Commit c2a95f6

Browse files
committed
fix issues
1 parent 4fe863d commit c2a95f6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

_unittests/ut_torch_models/test_hghub_model.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ def test_get_untrained_model_with_inputs_phi_2(self):
4949
data = get_untrained_model_with_inputs(mid, verbose=1)
5050
model, inputs = data["model"], data["inputs"]
5151
model(**inputs)
52-
self.assertEqual((1040498688, 260124672), (data["size"], data["n_weights"]))
52+
# different expected value for different version of transformers
53+
self.assertIn(
54+
(data["size"], data["n_weights"]),
55+
[(1040293888, 260073472), (1040498688, 260124672)],
56+
)
5357

5458

5559
if __name__ == "__main__":

onnx_diagnostic/torch_models/hghub/model_inputs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ def get_untrained_model_with_inputs(
5353
Gets a non initialized model similar to the original model
5454
based on the model id given to the function.
5555
The model size is reduced compare to the original model.
56-
No weights download is required.
56+
No weight is downloaded, only the configuration file sometimes.
5757
58-
:param model_id: model id, ex:`arnir0/Tiny-LLM`
58+
:param model_id: model id, ex: :epkg:`arnir0/Tiny-LLM`
5959
:param config: to overwrite the configuration
6060
:param task: model task, can be overwritten, otherwise, it is automatically determined
6161
:param input_kwargs: parameters sent to input generation

0 commit comments

Comments
 (0)