(fn)
| 8165 | return type.withContained(type.containedTypes((type) => this.unshapedType(type))); |
| 8166 | } |
| 8167 | defaultSchemaFor(fn) { |
| 8168 | const args = []; |
| 8169 | const returns = []; |
| 8170 | const g = fn.graph(); |
| 8171 | const num_inputs = fn.num_inputs(); |
| 8172 | for (let i = 0; i < num_inputs; i++) { |
| 8173 | const v = g.inputs()[i]; |
| 8174 | const name = v.hasDebugName() ? v.debugNameBase() : `argument_${i}`; |
| 8175 | const argument = new torch.Argument(name, this.unshapedType(g.inputs()[i].type())); |
| 8176 | args.push(argument); |
| 8177 | } |
| 8178 | const num_outputs = g.outputs().length; |
| 8179 | for (let i = 0; i < num_outputs; i++) { |
| 8180 | const argument = new torch.Argument('', this.unshapedType(g.outputs()[i].type())); |
| 8181 | returns.push(argument); |
| 8182 | } |
| 8183 | return new torch.FunctionSchema(fn.name(), '', args, returns); |
| 8184 | } |
| 8185 | }); |
| 8186 | this.registerType('torch.utils._contextlib._DecoratorContextManager', class {}); |
| 8187 | this.registerType('torch.utils._contextlib._NoParamDecoratorContextManager', class extends torch.utils._contextlib._DecoratorContextManager {}); |
no test coverage detected