Last active
January 27, 2025 10:12
-
-
Save qtangs/ca754167f38767bec6b6ddfaa0320fae to your computer and use it in GitHub Desktop.
Test Models JSON Schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"models": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9_\\-\\./]+$": { | |
"type": "object", | |
"properties": { | |
"model": { | |
"type": "string", | |
"default": null | |
}, | |
"task": { | |
"type": "string", | |
"enum": ["feature-extraction", "text-classification"], | |
"default": "text-classification" | |
}, | |
"framework": { | |
"type": "string", | |
"enum": ["pt", "onnx"], | |
"default": "pt" | |
}, | |
"model_args": { | |
"type": "object" | |
}, | |
"tokenizer_args": { | |
"type": "object" | |
}, | |
"handler": { | |
"type": "string", | |
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)*\.[A-Z][a-zA-Z0-9_]*$", | |
"default": null | |
}, | |
"pipeline": { | |
"type": "string", | |
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)*\.[A-Z][a-zA-Z0-9_]*$", | |
"default": null | |
}, | |
"pipeline_args": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"additionalProperties": false | |
} | |
}, | |
"required": ["models"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment