Commit ·
c7e825d
1
Parent(s): dd0fe26
Let a variant's methods nest under its components
Browse filesA multi-component variant could only declare one flat methods map, so a
pipeline whose parts share a method name had nowhere to put them: supertonic
has four forwards, kokoro two. A methods value may now be either a signature
or a map of signatures keyed by method name, selected by component.
Purely additive: every config that validated before still validates.
- config.schema.json +13 -1
config.schema.json
CHANGED
|
@@ -112,7 +112,13 @@
|
|
| 112 |
"methods": {
|
| 113 |
"type": "object",
|
| 114 |
"minProperties": 1,
|
| 115 |
-
"additionalProperties": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
},
|
| 118 |
"oneOf": [
|
|
@@ -138,6 +144,12 @@
|
|
| 138 |
}
|
| 139 |
}
|
| 140 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
"tensorSpec": {
|
| 142 |
"type": "object",
|
| 143 |
"required": ["shape", "dtype"],
|
|
|
|
| 112 |
"methods": {
|
| 113 |
"type": "object",
|
| 114 |
"minProperties": 1,
|
| 115 |
+
"additionalProperties": {
|
| 116 |
+
"oneOf": [
|
| 117 |
+
{ "$ref": "#/$defs/methodSignature" },
|
| 118 |
+
{ "$ref": "#/$defs/componentMethods" }
|
| 119 |
+
]
|
| 120 |
+
},
|
| 121 |
+
"description": "Single-file variants key this by method name. Multi-component variants key it by component name, matching `components`, and nest that component's methods inside."
|
| 122 |
}
|
| 123 |
},
|
| 124 |
"oneOf": [
|
|
|
|
| 144 |
}
|
| 145 |
}
|
| 146 |
},
|
| 147 |
+
"componentMethods": {
|
| 148 |
+
"type": "object",
|
| 149 |
+
"minProperties": 1,
|
| 150 |
+
"additionalProperties": { "$ref": "#/$defs/methodSignature" },
|
| 151 |
+
"description": "One component's methods, keyed by method name. Used under `methods` when a variant sets `components`, so that components sharing a method name (several `forward`s in one pipeline) stay distinct."
|
| 152 |
+
},
|
| 153 |
"tensorSpec": {
|
| 154 |
"type": "object",
|
| 155 |
"required": ["shape", "dtype"],
|