Skip to content

Commit f42b6bb

Browse files
author
Tommaso Adani
committed
Add model_type field to YAML configurations in golden_test.py
1 parent 889edca commit f42b6bb

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎src/mobius/_testing/golden_test.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
MINIMAL_YAML = """\
3131
model_id: "test-org/test-model"
32+
model_type: "test_model"
3233
revision: "abc123"
3334
task_type: "text-generation"
3435
dtype: "float32"
@@ -40,6 +41,7 @@
4041

4142
VL_YAML = """\
4243
model_id: "test-org/test-vl"
44+
model_type: "test_vl"
4345
revision: "def456"
4446
task_type: "qwen-vl"
4547
dtype: "float32"
@@ -57,6 +59,7 @@
5759

5860
SKIP_YAML = """\
5961
model_id: "test-org/skip-model"
62+
model_type: "test_skip"
6063
revision: "aaa111"
6164
task_type: "text-generation"
6265
dtype: "float32"
@@ -293,19 +296,19 @@ def _setup_cases(self, tmp_path: Path) -> Path:
293296
_write_yaml(
294297
causal,
295298
"model-a.yaml",
296-
'model_id: "a"\nrevision: "1"\ntask_type: "text-generation"'
299+
'model_id: "a"\nmodel_type: "a"\nrevision: "1"\ntask_type: "text-generation"'
297300
'\ndtype: "float32"\nlevel: "L4+L5"\n',
298301
)
299302
_write_yaml(
300303
causal,
301304
"model-b.yaml",
302-
'model_id: "b"\nrevision: "2"\ntask_type: "text-generation"'
305+
'model_id: "b"\nmodel_type: "b"\nrevision: "2"\ntask_type: "text-generation"'
303306
'\ndtype: "float32"\nlevel: "L4"\n',
304307
)
305308
_write_yaml(
306309
encoder,
307310
"model-c.yaml",
308-
'model_id: "c"\nrevision: "3"\n'
311+
'model_id: "c"\nmodel_type: "c"\nrevision: "3"\n'
309312
'task_type: "feature-extraction"'
310313
'\ndtype: "float32"\nlevel: "L4"\n',
311314
)
@@ -362,7 +365,7 @@ def test_malformed_yaml_skipped(self, tmp_path: Path):
362365
_write_yaml(
363366
root,
364367
"good.yaml",
365-
'model_id: "ok"\nrevision: "1"\n'
368+
'model_id: "ok"\nmodel_type: "ok"\nrevision: "1"\n'
366369
'task_type: "text-generation"'
367370
'\ndtype: "float32"\nlevel: "L4"\n',
368371
)

0 commit comments

Comments
 (0)