Skip to content

Commit 65f455f

Browse files
authored
Merge pull request #123 from caozhuozi/align-schema-add-datasets-url
json-schema: add datasets url
2 parents 72592fa + 2d5d31e commit 65f455f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

schema/config-schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@
7171
"sourceURL": {
7272
"type": "string"
7373
},
74+
"datasetsURL": {
75+
"type": "array",
76+
"items": {
77+
"type": "string"
78+
}
79+
},
7480
"version": {
7581
"type": "string"
7682
},

schema/config_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,29 @@ func TestConfig(t *testing.T) {
200200
]
201201
}
202202
}
203+
`,
204+
fail: true,
205+
},
206+
// expected failure: datasetsURL is not an array
207+
{
208+
config: `
209+
{
210+
"descriptor": {
211+
"name": "xyz-3-8B-Instruct",
212+
"version": "3.1",
213+
"sourceURL": "https://github.com/xyz/xyz3",
214+
"datasetsURL": "https://example.com/dataset"
215+
},
216+
"config": {
217+
"paramSize": "8b"
218+
},
219+
"modelfs": {
220+
"type": "layers",
221+
"diffIds": [
222+
"sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
223+
]
224+
}
225+
}
203226
`,
204227
fail: true,
205228
},

0 commit comments

Comments
 (0)