diff --git a/js/protobuf.d.js b/js/protobuf.d.js index 6113eae..0794e97 100644 --- a/js/protobuf.d.js +++ b/js/protobuf.d.js @@ -130,6 +130,108 @@ export namespace syft_proto { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a Placeholder. */ + interface IPlaceholder { + + /** Placeholder id */ + id?: (syft_proto.types.syft.v1.IId|null); + + /** Placeholder tags */ + tags?: (string[]|null); + + /** Placeholder description */ + description?: (string|null); + } + + /** Represents a Placeholder. */ + class Placeholder implements IPlaceholder { + + /** + * Constructs a new Placeholder. + * @param [properties] Properties to set + */ + constructor(properties?: syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder); + + /** Placeholder id. */ + public id?: (syft_proto.types.syft.v1.IId|null); + + /** Placeholder tags. */ + public tags: string[]; + + /** Placeholder description. */ + public description: string; + + /** + * Creates a new Placeholder instance using the specified properties. + * @param [properties] Properties to set + * @returns Placeholder instance + */ + public static create(properties?: syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder): syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder; + + /** + * Encodes the specified Placeholder message. Does not implicitly {@link syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify|verify} messages. + * @param message Placeholder message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Placeholder message, length delimited. Does not implicitly {@link syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify|verify} messages. + * @param message Placeholder message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Placeholder message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Placeholder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder; + + /** + * Decodes a Placeholder message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Placeholder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder; + + /** + * Verifies a Placeholder message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Placeholder message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Placeholder + */ + public static fromObject(object: { [k: string]: any }): syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder; + + /** + * Creates a plain object from a Placeholder message. Also converts values to other types if specified. + * @param message Placeholder + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Placeholder to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } } } @@ -475,6 +577,9 @@ export namespace syft_proto { /** Operation owner_pointer */ owner_pointer?: (syft_proto.generic.pointers.v1.IPointerTensor|null); + /** Operation owner_placeholder */ + owner_placeholder?: (syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder|null); + /** Operation owner_tensor */ owner_tensor?: (syft_proto.types.torch.v1.ITorchTensor|null); @@ -486,6 +591,9 @@ export namespace syft_proto { /** Operation return_ids */ return_ids?: (syft_proto.types.syft.v1.IId[]|null); + + /** Operation return_placeholders */ + return_placeholders?: (syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder[]|null); } /** Represents an Operation. */ @@ -503,6 +611,9 @@ export namespace syft_proto { /** Operation owner_pointer. */ public owner_pointer?: (syft_proto.generic.pointers.v1.IPointerTensor|null); + /** Operation owner_placeholder. */ + public owner_placeholder?: (syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder|null); + /** Operation owner_tensor. */ public owner_tensor?: (syft_proto.types.torch.v1.ITorchTensor|null); @@ -515,8 +626,11 @@ export namespace syft_proto { /** Operation return_ids. */ public return_ids: syft_proto.types.syft.v1.IId[]; + /** Operation return_placeholders. */ + public return_placeholders: syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder[]; + /** Operation owner. */ - public owner?: ("owner_pointer"|"owner_tensor"); + public owner?: ("owner_pointer"|"owner_placeholder"|"owner_tensor"); /** * Creates a new Operation instance using the specified properties. @@ -615,6 +729,9 @@ export namespace syft_proto { /** Arg arg_pointer_tensor */ arg_pointer_tensor?: (syft_proto.generic.pointers.v1.IPointerTensor|null); + + /** Arg arg_placeholder */ + arg_placeholder?: (syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder|null); } /** Represents an Arg. */ @@ -650,8 +767,11 @@ export namespace syft_proto { /** Arg arg_pointer_tensor. */ public arg_pointer_tensor?: (syft_proto.generic.pointers.v1.IPointerTensor|null); + /** Arg arg_placeholder. */ + public arg_placeholder?: (syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder|null); + /** Arg arg. */ - public arg?: ("arg_bool"|"arg_int"|"arg_float"|"arg_string"|"arg_shape"|"arg_tensor"|"arg_torch_param"|"arg_pointer_tensor"); + public arg?: ("arg_bool"|"arg_int"|"arg_float"|"arg_string"|"arg_shape"|"arg_tensor"|"arg_torch_param"|"arg_pointer_tensor"|"arg_placeholder"); /** * Creates a new Arg instance using the specified properties. @@ -2013,6 +2133,339 @@ export namespace syft_proto { public toJSON(): { [k: string]: any }; } + /** Properties of a Plan. */ + interface IPlan { + + /** Plan id */ + id?: (syft_proto.types.syft.v1.IId|null); + + /** Plan operations */ + operations?: (syft_proto.types.syft.v1.IOperation[]|null); + + /** Plan state */ + state?: (syft_proto.messaging.v1.IState|null); + + /** Plan include_state */ + include_state?: (boolean|null); + + /** Plan is_built */ + is_built?: (boolean|null); + + /** Plan name */ + name?: (string|null); + + /** Plan tags */ + tags?: (string[]|null); + + /** Plan description */ + description?: (string|null); + + /** Plan placeholders */ + placeholders?: (syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder[]|null); + } + + /** Represents a Plan. */ + class Plan implements IPlan { + + /** + * Constructs a new Plan. + * @param [properties] Properties to set + */ + constructor(properties?: syft_proto.messaging.v1.IPlan); + + /** Plan id. */ + public id?: (syft_proto.types.syft.v1.IId|null); + + /** Plan operations. */ + public operations: syft_proto.types.syft.v1.IOperation[]; + + /** Plan state. */ + public state?: (syft_proto.messaging.v1.IState|null); + + /** Plan include_state. */ + public include_state: boolean; + + /** Plan is_built. */ + public is_built: boolean; + + /** Plan name. */ + public name: string; + + /** Plan tags. */ + public tags: string[]; + + /** Plan description. */ + public description: string; + + /** Plan placeholders. */ + public placeholders: syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder[]; + + /** + * Creates a new Plan instance using the specified properties. + * @param [properties] Properties to set + * @returns Plan instance + */ + public static create(properties?: syft_proto.messaging.v1.IPlan): syft_proto.messaging.v1.Plan; + + /** + * Encodes the specified Plan message. Does not implicitly {@link syft_proto.messaging.v1.Plan.verify|verify} messages. + * @param message Plan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: syft_proto.messaging.v1.IPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Plan message, length delimited. Does not implicitly {@link syft_proto.messaging.v1.Plan.verify|verify} messages. + * @param message Plan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: syft_proto.messaging.v1.IPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Plan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): syft_proto.messaging.v1.Plan; + + /** + * Decodes a Plan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): syft_proto.messaging.v1.Plan; + + /** + * Verifies a Plan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Plan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Plan + */ + public static fromObject(object: { [k: string]: any }): syft_proto.messaging.v1.Plan; + + /** + * Creates a plain object from a Plan message. Also converts values to other types if specified. + * @param message Plan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: syft_proto.messaging.v1.Plan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Plan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a State. */ + interface IState { + + /** State placeholders */ + placeholders?: (syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder[]|null); + + /** State tensors */ + tensors?: (syft_proto.messaging.v1.IStateTensor[]|null); + } + + /** Represents a State. */ + class State implements IState { + + /** + * Constructs a new State. + * @param [properties] Properties to set + */ + constructor(properties?: syft_proto.messaging.v1.IState); + + /** State placeholders. */ + public placeholders: syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder[]; + + /** State tensors. */ + public tensors: syft_proto.messaging.v1.IStateTensor[]; + + /** + * Creates a new State instance using the specified properties. + * @param [properties] Properties to set + * @returns State instance + */ + public static create(properties?: syft_proto.messaging.v1.IState): syft_proto.messaging.v1.State; + + /** + * Encodes the specified State message. Does not implicitly {@link syft_proto.messaging.v1.State.verify|verify} messages. + * @param message State message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: syft_proto.messaging.v1.IState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified State message, length delimited. Does not implicitly {@link syft_proto.messaging.v1.State.verify|verify} messages. + * @param message State message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: syft_proto.messaging.v1.IState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a State message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): syft_proto.messaging.v1.State; + + /** + * Decodes a State message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): syft_proto.messaging.v1.State; + + /** + * Verifies a State message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a State message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns State + */ + public static fromObject(object: { [k: string]: any }): syft_proto.messaging.v1.State; + + /** + * Creates a plain object from a State message. Also converts values to other types if specified. + * @param message State + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: syft_proto.messaging.v1.State, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this State to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StateTensor. */ + interface IStateTensor { + + /** StateTensor torch_tensor */ + torch_tensor?: (syft_proto.types.torch.v1.ITorchTensor|null); + + /** StateTensor torch_param */ + torch_param?: (syft_proto.types.torch.v1.IParameter|null); + } + + /** Represents a StateTensor. */ + class StateTensor implements IStateTensor { + + /** + * Constructs a new StateTensor. + * @param [properties] Properties to set + */ + constructor(properties?: syft_proto.messaging.v1.IStateTensor); + + /** StateTensor torch_tensor. */ + public torch_tensor?: (syft_proto.types.torch.v1.ITorchTensor|null); + + /** StateTensor torch_param. */ + public torch_param?: (syft_proto.types.torch.v1.IParameter|null); + + /** StateTensor tensor. */ + public tensor?: ("torch_tensor"|"torch_param"); + + /** + * Creates a new StateTensor instance using the specified properties. + * @param [properties] Properties to set + * @returns StateTensor instance + */ + public static create(properties?: syft_proto.messaging.v1.IStateTensor): syft_proto.messaging.v1.StateTensor; + + /** + * Encodes the specified StateTensor message. Does not implicitly {@link syft_proto.messaging.v1.StateTensor.verify|verify} messages. + * @param message StateTensor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: syft_proto.messaging.v1.IStateTensor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StateTensor message, length delimited. Does not implicitly {@link syft_proto.messaging.v1.StateTensor.verify|verify} messages. + * @param message StateTensor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: syft_proto.messaging.v1.IStateTensor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StateTensor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StateTensor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): syft_proto.messaging.v1.StateTensor; + + /** + * Decodes a StateTensor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StateTensor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): syft_proto.messaging.v1.StateTensor; + + /** + * Verifies a StateTensor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StateTensor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StateTensor + */ + public static fromObject(object: { [k: string]: any }): syft_proto.messaging.v1.StateTensor; + + /** + * Creates a plain object from a StateTensor message. Also converts values to other types if specified. + * @param message StateTensor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: syft_proto.messaging.v1.StateTensor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StateTensor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Protocol. */ interface IProtocol { diff --git a/js/protobuf.js b/js/protobuf.js index 4a31fbc..e96a924 100644 --- a/js/protobuf.js +++ b/js/protobuf.js @@ -407,6 +407,260 @@ $root.syft_proto = (function() { return AdditiveSharingTensor; })(); + v1.Placeholder = (function() { + + /** + * Properties of a Placeholder. + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1 + * @interface IPlaceholder + * @property {syft_proto.types.syft.v1.IId|null} [id] Placeholder id + * @property {Array.|null} [tags] Placeholder tags + * @property {string|null} [description] Placeholder description + */ + + /** + * Constructs a new Placeholder. + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1 + * @classdesc Represents a Placeholder. + * @implements IPlaceholder + * @constructor + * @param {syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder=} [properties] Properties to set + */ + function Placeholder(properties) { + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Placeholder id. + * @member {syft_proto.types.syft.v1.IId|null|undefined} id + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @instance + */ + Placeholder.prototype.id = null; + + /** + * Placeholder tags. + * @member {Array.} tags + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @instance + */ + Placeholder.prototype.tags = $util.emptyArray; + + /** + * Placeholder description. + * @member {string} description + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @instance + */ + Placeholder.prototype.description = ""; + + /** + * Creates a new Placeholder instance using the specified properties. + * @function create + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @static + * @param {syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder=} [properties] Properties to set + * @returns {syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder} Placeholder instance + */ + Placeholder.create = function create(properties) { + return new Placeholder(properties); + }; + + /** + * Encodes the specified Placeholder message. Does not implicitly {@link syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify|verify} messages. + * @function encode + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @static + * @param {syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder} message Placeholder message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Placeholder.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + $root.syft_proto.types.syft.v1.Id.encode(message.id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tags[i]); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified Placeholder message, length delimited. Does not implicitly {@link syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify|verify} messages. + * @function encodeDelimited + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @static + * @param {syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder} message Placeholder message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Placeholder.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Placeholder message from the specified reader or buffer. + * @function decode + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder} Placeholder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Placeholder.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = $root.syft_proto.types.syft.v1.Id.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 3: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Placeholder message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder} Placeholder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Placeholder.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Placeholder message. + * @function verify + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Placeholder.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) { + var error = $root.syft_proto.types.syft.v1.Id.verify(message.id); + if (error) + return "id." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a Placeholder message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @static + * @param {Object.} object Plain object + * @returns {syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder} Placeholder + */ + Placeholder.fromObject = function fromObject(object) { + if (object instanceof $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder) + return object; + var message = new $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder(); + if (object.id != null) { + if (typeof object.id !== "object") + throw TypeError(".syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.id: object expected"); + message.id = $root.syft_proto.types.syft.v1.Id.fromObject(object.id); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a Placeholder message. Also converts values to other types if specified. + * @function toObject + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @static + * @param {syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder} message Placeholder + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Placeholder.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tags = []; + if (options.defaults) { + object.id = null; + object.description = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = $root.syft_proto.types.syft.v1.Id.toObject(message.id, options); + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this Placeholder to JSON. + * @function toJSON + * @memberof syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder + * @instance + * @returns {Object.} JSON object + */ + Placeholder.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Placeholder; + })(); + return v1; })(); @@ -1265,10 +1519,12 @@ $root.syft_proto = (function() { * @interface IOperation * @property {string|null} [command] Operation command * @property {syft_proto.generic.pointers.v1.IPointerTensor|null} [owner_pointer] Operation owner_pointer + * @property {syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder|null} [owner_placeholder] Operation owner_placeholder * @property {syft_proto.types.torch.v1.ITorchTensor|null} [owner_tensor] Operation owner_tensor * @property {Array.|null} [args] Operation args * @property {Object.|null} [kwargs] Operation kwargs * @property {Array.|null} [return_ids] Operation return_ids + * @property {Array.|null} [return_placeholders] Operation return_placeholders */ /** @@ -1283,6 +1539,7 @@ $root.syft_proto = (function() { this.args = []; this.kwargs = {}; this.return_ids = []; + this.return_placeholders = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1305,6 +1562,14 @@ $root.syft_proto = (function() { */ Operation.prototype.owner_pointer = null; + /** + * Operation owner_placeholder. + * @member {syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder|null|undefined} owner_placeholder + * @memberof syft_proto.types.syft.v1.Operation + * @instance + */ + Operation.prototype.owner_placeholder = null; + /** * Operation owner_tensor. * @member {syft_proto.types.torch.v1.ITorchTensor|null|undefined} owner_tensor @@ -1337,17 +1602,25 @@ $root.syft_proto = (function() { */ Operation.prototype.return_ids = $util.emptyArray; + /** + * Operation return_placeholders. + * @member {Array.} return_placeholders + * @memberof syft_proto.types.syft.v1.Operation + * @instance + */ + Operation.prototype.return_placeholders = $util.emptyArray; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Operation owner. - * @member {"owner_pointer"|"owner_tensor"|undefined} owner + * @member {"owner_pointer"|"owner_placeholder"|"owner_tensor"|undefined} owner * @memberof syft_proto.types.syft.v1.Operation * @instance */ Object.defineProperty(Operation.prototype, "owner", { - get: $util.oneOfGetter($oneOfFields = ["owner_pointer", "owner_tensor"]), + get: $util.oneOfGetter($oneOfFields = ["owner_pointer", "owner_placeholder", "owner_tensor"]), set: $util.oneOfSetter($oneOfFields) }); @@ -1379,19 +1652,24 @@ $root.syft_proto = (function() { writer.uint32(/* id 1, wireType 2 =*/10).string(message.command); if (message.owner_pointer != null && message.hasOwnProperty("owner_pointer")) $root.syft_proto.generic.pointers.v1.PointerTensor.encode(message.owner_pointer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.owner_placeholder != null && message.hasOwnProperty("owner_placeholder")) + $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.encode(message.owner_placeholder, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.owner_tensor != null && message.hasOwnProperty("owner_tensor")) + $root.syft_proto.types.torch.v1.TorchTensor.encode(message.owner_tensor, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.args != null && message.args.length) for (var i = 0; i < message.args.length; ++i) - $root.syft_proto.types.syft.v1.Arg.encode(message.args[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.syft_proto.types.syft.v1.Arg.encode(message.args[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.kwargs != null && message.hasOwnProperty("kwargs")) for (var keys = Object.keys(message.kwargs), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.syft_proto.types.syft.v1.Arg.encode(message.kwargs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } if (message.return_ids != null && message.return_ids.length) for (var i = 0; i < message.return_ids.length; ++i) - $root.syft_proto.types.syft.v1.Id.encode(message.return_ids[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.owner_tensor != null && message.hasOwnProperty("owner_tensor")) - $root.syft_proto.types.torch.v1.TorchTensor.encode(message.owner_tensor, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.syft_proto.types.syft.v1.Id.encode(message.return_ids[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.return_placeholders != null && message.return_placeholders.length) + for (var i = 0; i < message.return_placeholders.length; ++i) + $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.encode(message.return_placeholders[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -1432,15 +1710,18 @@ $root.syft_proto = (function() { case 2: message.owner_pointer = $root.syft_proto.generic.pointers.v1.PointerTensor.decode(reader, reader.uint32()); break; - case 7: + case 3: + message.owner_placeholder = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.decode(reader, reader.uint32()); + break; + case 4: message.owner_tensor = $root.syft_proto.types.torch.v1.TorchTensor.decode(reader, reader.uint32()); break; - case 3: + case 5: if (!(message.args && message.args.length)) message.args = []; message.args.push($root.syft_proto.types.syft.v1.Arg.decode(reader, reader.uint32())); break; - case 4: + case 6: reader.skip().pos++; if (message.kwargs === $util.emptyObject) message.kwargs = {}; @@ -1448,11 +1729,16 @@ $root.syft_proto = (function() { reader.pos++; message.kwargs[key] = $root.syft_proto.types.syft.v1.Arg.decode(reader, reader.uint32()); break; - case 5: + case 7: if (!(message.return_ids && message.return_ids.length)) message.return_ids = []; message.return_ids.push($root.syft_proto.types.syft.v1.Id.decode(reader, reader.uint32())); break; + case 8: + if (!(message.return_placeholders && message.return_placeholders.length)) + message.return_placeholders = []; + message.return_placeholders.push($root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -1500,6 +1786,16 @@ $root.syft_proto = (function() { return "owner_pointer." + error; } } + if (message.owner_placeholder != null && message.hasOwnProperty("owner_placeholder")) { + if (properties.owner === 1) + return "owner: multiple values"; + properties.owner = 1; + { + var error = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify(message.owner_placeholder); + if (error) + return "owner_placeholder." + error; + } + } if (message.owner_tensor != null && message.hasOwnProperty("owner_tensor")) { if (properties.owner === 1) return "owner: multiple values"; @@ -1538,6 +1834,15 @@ $root.syft_proto = (function() { return "return_ids." + error; } } + if (message.return_placeholders != null && message.hasOwnProperty("return_placeholders")) { + if (!Array.isArray(message.return_placeholders)) + return "return_placeholders: array expected"; + for (var i = 0; i < message.return_placeholders.length; ++i) { + var error = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify(message.return_placeholders[i]); + if (error) + return "return_placeholders." + error; + } + } return null; }; @@ -1560,6 +1865,11 @@ $root.syft_proto = (function() { throw TypeError(".syft_proto.types.syft.v1.Operation.owner_pointer: object expected"); message.owner_pointer = $root.syft_proto.generic.pointers.v1.PointerTensor.fromObject(object.owner_pointer); } + if (object.owner_placeholder != null) { + if (typeof object.owner_placeholder !== "object") + throw TypeError(".syft_proto.types.syft.v1.Operation.owner_placeholder: object expected"); + message.owner_placeholder = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.fromObject(object.owner_placeholder); + } if (object.owner_tensor != null) { if (typeof object.owner_tensor !== "object") throw TypeError(".syft_proto.types.syft.v1.Operation.owner_tensor: object expected"); @@ -1595,6 +1905,16 @@ $root.syft_proto = (function() { message.return_ids[i] = $root.syft_proto.types.syft.v1.Id.fromObject(object.return_ids[i]); } } + if (object.return_placeholders) { + if (!Array.isArray(object.return_placeholders)) + throw TypeError(".syft_proto.types.syft.v1.Operation.return_placeholders: array expected"); + message.return_placeholders = []; + for (var i = 0; i < object.return_placeholders.length; ++i) { + if (typeof object.return_placeholders[i] !== "object") + throw TypeError(".syft_proto.types.syft.v1.Operation.return_placeholders: object expected"); + message.return_placeholders[i] = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.fromObject(object.return_placeholders[i]); + } + } return message; }; @@ -1614,6 +1934,7 @@ $root.syft_proto = (function() { if (options.arrays || options.defaults) { object.args = []; object.return_ids = []; + object.return_placeholders = []; } if (options.objects || options.defaults) object.kwargs = {}; @@ -1626,6 +1947,16 @@ $root.syft_proto = (function() { if (options.oneofs) object.owner = "owner_pointer"; } + if (message.owner_placeholder != null && message.hasOwnProperty("owner_placeholder")) { + object.owner_placeholder = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.toObject(message.owner_placeholder, options); + if (options.oneofs) + object.owner = "owner_placeholder"; + } + if (message.owner_tensor != null && message.hasOwnProperty("owner_tensor")) { + object.owner_tensor = $root.syft_proto.types.torch.v1.TorchTensor.toObject(message.owner_tensor, options); + if (options.oneofs) + object.owner = "owner_tensor"; + } if (message.args && message.args.length) { object.args = []; for (var j = 0; j < message.args.length; ++j) @@ -1642,10 +1973,10 @@ $root.syft_proto = (function() { for (var j = 0; j < message.return_ids.length; ++j) object.return_ids[j] = $root.syft_proto.types.syft.v1.Id.toObject(message.return_ids[j], options); } - if (message.owner_tensor != null && message.hasOwnProperty("owner_tensor")) { - object.owner_tensor = $root.syft_proto.types.torch.v1.TorchTensor.toObject(message.owner_tensor, options); - if (options.oneofs) - object.owner = "owner_tensor"; + if (message.return_placeholders && message.return_placeholders.length) { + object.return_placeholders = []; + for (var j = 0; j < message.return_placeholders.length; ++j) + object.return_placeholders[j] = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.toObject(message.return_placeholders[j], options); } return object; }; @@ -1678,6 +2009,7 @@ $root.syft_proto = (function() { * @property {syft_proto.types.torch.v1.ITorchTensor|null} [arg_tensor] Arg arg_tensor * @property {syft_proto.types.torch.v1.IParameter|null} [arg_torch_param] Arg arg_torch_param * @property {syft_proto.generic.pointers.v1.IPointerTensor|null} [arg_pointer_tensor] Arg arg_pointer_tensor + * @property {syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder|null} [arg_placeholder] Arg arg_placeholder */ /** @@ -1759,17 +2091,25 @@ $root.syft_proto = (function() { */ Arg.prototype.arg_pointer_tensor = null; + /** + * Arg arg_placeholder. + * @member {syft_proto.frameworks.torch.tensors.interpreters.v1.IPlaceholder|null|undefined} arg_placeholder + * @memberof syft_proto.types.syft.v1.Arg + * @instance + */ + Arg.prototype.arg_placeholder = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Arg arg. - * @member {"arg_bool"|"arg_int"|"arg_float"|"arg_string"|"arg_shape"|"arg_tensor"|"arg_torch_param"|"arg_pointer_tensor"|undefined} arg + * @member {"arg_bool"|"arg_int"|"arg_float"|"arg_string"|"arg_shape"|"arg_tensor"|"arg_torch_param"|"arg_pointer_tensor"|"arg_placeholder"|undefined} arg * @memberof syft_proto.types.syft.v1.Arg * @instance */ Object.defineProperty(Arg.prototype, "arg", { - get: $util.oneOfGetter($oneOfFields = ["arg_bool", "arg_int", "arg_float", "arg_string", "arg_shape", "arg_tensor", "arg_torch_param", "arg_pointer_tensor"]), + get: $util.oneOfGetter($oneOfFields = ["arg_bool", "arg_int", "arg_float", "arg_string", "arg_shape", "arg_tensor", "arg_torch_param", "arg_pointer_tensor", "arg_placeholder"]), set: $util.oneOfSetter($oneOfFields) }); @@ -1813,6 +2153,8 @@ $root.syft_proto = (function() { $root.syft_proto.types.torch.v1.Parameter.encode(message.arg_torch_param, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.arg_pointer_tensor != null && message.hasOwnProperty("arg_pointer_tensor")) $root.syft_proto.generic.pointers.v1.PointerTensor.encode(message.arg_pointer_tensor, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.arg_placeholder != null && message.hasOwnProperty("arg_placeholder")) + $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.encode(message.arg_placeholder, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -1871,6 +2213,9 @@ $root.syft_proto = (function() { case 8: message.arg_pointer_tensor = $root.syft_proto.generic.pointers.v1.PointerTensor.decode(reader, reader.uint32()); break; + case 9: + message.arg_placeholder = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -1973,6 +2318,16 @@ $root.syft_proto = (function() { return "arg_pointer_tensor." + error; } } + if (message.arg_placeholder != null && message.hasOwnProperty("arg_placeholder")) { + if (properties.arg === 1) + return "arg: multiple values"; + properties.arg = 1; + { + var error = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify(message.arg_placeholder); + if (error) + return "arg_placeholder." + error; + } + } return null; }; @@ -2016,6 +2371,11 @@ $root.syft_proto = (function() { throw TypeError(".syft_proto.types.syft.v1.Arg.arg_pointer_tensor: object expected"); message.arg_pointer_tensor = $root.syft_proto.generic.pointers.v1.PointerTensor.fromObject(object.arg_pointer_tensor); } + if (object.arg_placeholder != null) { + if (typeof object.arg_placeholder !== "object") + throw TypeError(".syft_proto.types.syft.v1.Arg.arg_placeholder: object expected"); + message.arg_placeholder = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.fromObject(object.arg_placeholder); + } return message; }; @@ -2072,6 +2432,11 @@ $root.syft_proto = (function() { if (options.oneofs) object.arg = "arg_pointer_tensor"; } + if (message.arg_placeholder != null && message.hasOwnProperty("arg_placeholder")) { + object.arg_placeholder = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.toObject(message.arg_placeholder, options); + if (options.oneofs) + object.arg = "arg_placeholder"; + } return object; }; @@ -5601,6 +5966,937 @@ $root.syft_proto = (function() { return OperationMessage; })(); + v1.Plan = (function() { + + /** + * Properties of a Plan. + * @memberof syft_proto.messaging.v1 + * @interface IPlan + * @property {syft_proto.types.syft.v1.IId|null} [id] Plan id + * @property {Array.|null} [operations] Plan operations + * @property {syft_proto.messaging.v1.IState|null} [state] Plan state + * @property {boolean|null} [include_state] Plan include_state + * @property {boolean|null} [is_built] Plan is_built + * @property {string|null} [name] Plan name + * @property {Array.|null} [tags] Plan tags + * @property {string|null} [description] Plan description + * @property {Array.|null} [placeholders] Plan placeholders + */ + + /** + * Constructs a new Plan. + * @memberof syft_proto.messaging.v1 + * @classdesc Represents a Plan. + * @implements IPlan + * @constructor + * @param {syft_proto.messaging.v1.IPlan=} [properties] Properties to set + */ + function Plan(properties) { + this.operations = []; + this.tags = []; + this.placeholders = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Plan id. + * @member {syft_proto.types.syft.v1.IId|null|undefined} id + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.id = null; + + /** + * Plan operations. + * @member {Array.} operations + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.operations = $util.emptyArray; + + /** + * Plan state. + * @member {syft_proto.messaging.v1.IState|null|undefined} state + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.state = null; + + /** + * Plan include_state. + * @member {boolean} include_state + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.include_state = false; + + /** + * Plan is_built. + * @member {boolean} is_built + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.is_built = false; + + /** + * Plan name. + * @member {string} name + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.name = ""; + + /** + * Plan tags. + * @member {Array.} tags + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.tags = $util.emptyArray; + + /** + * Plan description. + * @member {string} description + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.description = ""; + + /** + * Plan placeholders. + * @member {Array.} placeholders + * @memberof syft_proto.messaging.v1.Plan + * @instance + */ + Plan.prototype.placeholders = $util.emptyArray; + + /** + * Creates a new Plan instance using the specified properties. + * @function create + * @memberof syft_proto.messaging.v1.Plan + * @static + * @param {syft_proto.messaging.v1.IPlan=} [properties] Properties to set + * @returns {syft_proto.messaging.v1.Plan} Plan instance + */ + Plan.create = function create(properties) { + return new Plan(properties); + }; + + /** + * Encodes the specified Plan message. Does not implicitly {@link syft_proto.messaging.v1.Plan.verify|verify} messages. + * @function encode + * @memberof syft_proto.messaging.v1.Plan + * @static + * @param {syft_proto.messaging.v1.IPlan} message Plan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Plan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + $root.syft_proto.types.syft.v1.Id.encode(message.id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.syft_proto.types.syft.v1.Operation.encode(message.operations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && message.hasOwnProperty("state")) + $root.syft_proto.messaging.v1.State.encode(message.state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.include_state != null && message.hasOwnProperty("include_state")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_state); + if (message.is_built != null && message.hasOwnProperty("is_built")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_built); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tags[i]); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.description); + if (message.placeholders != null && message.placeholders.length) + for (var i = 0; i < message.placeholders.length; ++i) + $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.encode(message.placeholders[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Plan message, length delimited. Does not implicitly {@link syft_proto.messaging.v1.Plan.verify|verify} messages. + * @function encodeDelimited + * @memberof syft_proto.messaging.v1.Plan + * @static + * @param {syft_proto.messaging.v1.IPlan} message Plan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Plan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Plan message from the specified reader or buffer. + * @function decode + * @memberof syft_proto.messaging.v1.Plan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {syft_proto.messaging.v1.Plan} Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Plan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.syft_proto.messaging.v1.Plan(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = $root.syft_proto.types.syft.v1.Id.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.syft_proto.types.syft.v1.Operation.decode(reader, reader.uint32())); + break; + case 3: + message.state = $root.syft_proto.messaging.v1.State.decode(reader, reader.uint32()); + break; + case 4: + message.include_state = reader.bool(); + break; + case 5: + message.is_built = reader.bool(); + break; + case 6: + message.name = reader.string(); + break; + case 7: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 8: + message.description = reader.string(); + break; + case 9: + if (!(message.placeholders && message.placeholders.length)) + message.placeholders = []; + message.placeholders.push($root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Plan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof syft_proto.messaging.v1.Plan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {syft_proto.messaging.v1.Plan} Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Plan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Plan message. + * @function verify + * @memberof syft_proto.messaging.v1.Plan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Plan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) { + var error = $root.syft_proto.types.syft.v1.Id.verify(message.id); + if (error) + return "id." + error; + } + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.syft_proto.types.syft.v1.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.syft_proto.messaging.v1.State.verify(message.state); + if (error) + return "state." + error; + } + if (message.include_state != null && message.hasOwnProperty("include_state")) + if (typeof message.include_state !== "boolean") + return "include_state: boolean expected"; + if (message.is_built != null && message.hasOwnProperty("is_built")) + if (typeof message.is_built !== "boolean") + return "is_built: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.placeholders != null && message.hasOwnProperty("placeholders")) { + if (!Array.isArray(message.placeholders)) + return "placeholders: array expected"; + for (var i = 0; i < message.placeholders.length; ++i) { + var error = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify(message.placeholders[i]); + if (error) + return "placeholders." + error; + } + } + return null; + }; + + /** + * Creates a Plan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof syft_proto.messaging.v1.Plan + * @static + * @param {Object.} object Plain object + * @returns {syft_proto.messaging.v1.Plan} Plan + */ + Plan.fromObject = function fromObject(object) { + if (object instanceof $root.syft_proto.messaging.v1.Plan) + return object; + var message = new $root.syft_proto.messaging.v1.Plan(); + if (object.id != null) { + if (typeof object.id !== "object") + throw TypeError(".syft_proto.messaging.v1.Plan.id: object expected"); + message.id = $root.syft_proto.types.syft.v1.Id.fromObject(object.id); + } + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".syft_proto.messaging.v1.Plan.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".syft_proto.messaging.v1.Plan.operations: object expected"); + message.operations[i] = $root.syft_proto.types.syft.v1.Operation.fromObject(object.operations[i]); + } + } + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".syft_proto.messaging.v1.Plan.state: object expected"); + message.state = $root.syft_proto.messaging.v1.State.fromObject(object.state); + } + if (object.include_state != null) + message.include_state = Boolean(object.include_state); + if (object.is_built != null) + message.is_built = Boolean(object.is_built); + if (object.name != null) + message.name = String(object.name); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".syft_proto.messaging.v1.Plan.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.description != null) + message.description = String(object.description); + if (object.placeholders) { + if (!Array.isArray(object.placeholders)) + throw TypeError(".syft_proto.messaging.v1.Plan.placeholders: array expected"); + message.placeholders = []; + for (var i = 0; i < object.placeholders.length; ++i) { + if (typeof object.placeholders[i] !== "object") + throw TypeError(".syft_proto.messaging.v1.Plan.placeholders: object expected"); + message.placeholders[i] = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.fromObject(object.placeholders[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Plan message. Also converts values to other types if specified. + * @function toObject + * @memberof syft_proto.messaging.v1.Plan + * @static + * @param {syft_proto.messaging.v1.Plan} message Plan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Plan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.operations = []; + object.tags = []; + object.placeholders = []; + } + if (options.defaults) { + object.id = null; + object.state = null; + object.include_state = false; + object.is_built = false; + object.name = ""; + object.description = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = $root.syft_proto.types.syft.v1.Id.toObject(message.id, options); + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.syft_proto.types.syft.v1.Operation.toObject(message.operations[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.syft_proto.messaging.v1.State.toObject(message.state, options); + if (message.include_state != null && message.hasOwnProperty("include_state")) + object.include_state = message.include_state; + if (message.is_built != null && message.hasOwnProperty("is_built")) + object.is_built = message.is_built; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.placeholders && message.placeholders.length) { + object.placeholders = []; + for (var j = 0; j < message.placeholders.length; ++j) + object.placeholders[j] = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.toObject(message.placeholders[j], options); + } + return object; + }; + + /** + * Converts this Plan to JSON. + * @function toJSON + * @memberof syft_proto.messaging.v1.Plan + * @instance + * @returns {Object.} JSON object + */ + Plan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Plan; + })(); + + v1.State = (function() { + + /** + * Properties of a State. + * @memberof syft_proto.messaging.v1 + * @interface IState + * @property {Array.|null} [placeholders] State placeholders + * @property {Array.|null} [tensors] State tensors + */ + + /** + * Constructs a new State. + * @memberof syft_proto.messaging.v1 + * @classdesc Represents a State. + * @implements IState + * @constructor + * @param {syft_proto.messaging.v1.IState=} [properties] Properties to set + */ + function State(properties) { + this.placeholders = []; + this.tensors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * State placeholders. + * @member {Array.} placeholders + * @memberof syft_proto.messaging.v1.State + * @instance + */ + State.prototype.placeholders = $util.emptyArray; + + /** + * State tensors. + * @member {Array.} tensors + * @memberof syft_proto.messaging.v1.State + * @instance + */ + State.prototype.tensors = $util.emptyArray; + + /** + * Creates a new State instance using the specified properties. + * @function create + * @memberof syft_proto.messaging.v1.State + * @static + * @param {syft_proto.messaging.v1.IState=} [properties] Properties to set + * @returns {syft_proto.messaging.v1.State} State instance + */ + State.create = function create(properties) { + return new State(properties); + }; + + /** + * Encodes the specified State message. Does not implicitly {@link syft_proto.messaging.v1.State.verify|verify} messages. + * @function encode + * @memberof syft_proto.messaging.v1.State + * @static + * @param {syft_proto.messaging.v1.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.placeholders != null && message.placeholders.length) + for (var i = 0; i < message.placeholders.length; ++i) + $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.encode(message.placeholders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tensors != null && message.tensors.length) + for (var i = 0; i < message.tensors.length; ++i) + $root.syft_proto.messaging.v1.StateTensor.encode(message.tensors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified State message, length delimited. Does not implicitly {@link syft_proto.messaging.v1.State.verify|verify} messages. + * @function encodeDelimited + * @memberof syft_proto.messaging.v1.State + * @static + * @param {syft_proto.messaging.v1.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a State message from the specified reader or buffer. + * @function decode + * @memberof syft_proto.messaging.v1.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {syft_proto.messaging.v1.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.syft_proto.messaging.v1.State(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.placeholders && message.placeholders.length)) + message.placeholders = []; + message.placeholders.push($root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.tensors && message.tensors.length)) + message.tensors = []; + message.tensors.push($root.syft_proto.messaging.v1.StateTensor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a State message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof syft_proto.messaging.v1.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {syft_proto.messaging.v1.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a State message. + * @function verify + * @memberof syft_proto.messaging.v1.State + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + State.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.placeholders != null && message.hasOwnProperty("placeholders")) { + if (!Array.isArray(message.placeholders)) + return "placeholders: array expected"; + for (var i = 0; i < message.placeholders.length; ++i) { + var error = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.verify(message.placeholders[i]); + if (error) + return "placeholders." + error; + } + } + if (message.tensors != null && message.hasOwnProperty("tensors")) { + if (!Array.isArray(message.tensors)) + return "tensors: array expected"; + for (var i = 0; i < message.tensors.length; ++i) { + var error = $root.syft_proto.messaging.v1.StateTensor.verify(message.tensors[i]); + if (error) + return "tensors." + error; + } + } + return null; + }; + + /** + * Creates a State message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof syft_proto.messaging.v1.State + * @static + * @param {Object.} object Plain object + * @returns {syft_proto.messaging.v1.State} State + */ + State.fromObject = function fromObject(object) { + if (object instanceof $root.syft_proto.messaging.v1.State) + return object; + var message = new $root.syft_proto.messaging.v1.State(); + if (object.placeholders) { + if (!Array.isArray(object.placeholders)) + throw TypeError(".syft_proto.messaging.v1.State.placeholders: array expected"); + message.placeholders = []; + for (var i = 0; i < object.placeholders.length; ++i) { + if (typeof object.placeholders[i] !== "object") + throw TypeError(".syft_proto.messaging.v1.State.placeholders: object expected"); + message.placeholders[i] = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.fromObject(object.placeholders[i]); + } + } + if (object.tensors) { + if (!Array.isArray(object.tensors)) + throw TypeError(".syft_proto.messaging.v1.State.tensors: array expected"); + message.tensors = []; + for (var i = 0; i < object.tensors.length; ++i) { + if (typeof object.tensors[i] !== "object") + throw TypeError(".syft_proto.messaging.v1.State.tensors: object expected"); + message.tensors[i] = $root.syft_proto.messaging.v1.StateTensor.fromObject(object.tensors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a State message. Also converts values to other types if specified. + * @function toObject + * @memberof syft_proto.messaging.v1.State + * @static + * @param {syft_proto.messaging.v1.State} message State + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + State.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.placeholders = []; + object.tensors = []; + } + if (message.placeholders && message.placeholders.length) { + object.placeholders = []; + for (var j = 0; j < message.placeholders.length; ++j) + object.placeholders[j] = $root.syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.toObject(message.placeholders[j], options); + } + if (message.tensors && message.tensors.length) { + object.tensors = []; + for (var j = 0; j < message.tensors.length; ++j) + object.tensors[j] = $root.syft_proto.messaging.v1.StateTensor.toObject(message.tensors[j], options); + } + return object; + }; + + /** + * Converts this State to JSON. + * @function toJSON + * @memberof syft_proto.messaging.v1.State + * @instance + * @returns {Object.} JSON object + */ + State.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return State; + })(); + + v1.StateTensor = (function() { + + /** + * Properties of a StateTensor. + * @memberof syft_proto.messaging.v1 + * @interface IStateTensor + * @property {syft_proto.types.torch.v1.ITorchTensor|null} [torch_tensor] StateTensor torch_tensor + * @property {syft_proto.types.torch.v1.IParameter|null} [torch_param] StateTensor torch_param + */ + + /** + * Constructs a new StateTensor. + * @memberof syft_proto.messaging.v1 + * @classdesc Represents a StateTensor. + * @implements IStateTensor + * @constructor + * @param {syft_proto.messaging.v1.IStateTensor=} [properties] Properties to set + */ + function StateTensor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StateTensor torch_tensor. + * @member {syft_proto.types.torch.v1.ITorchTensor|null|undefined} torch_tensor + * @memberof syft_proto.messaging.v1.StateTensor + * @instance + */ + StateTensor.prototype.torch_tensor = null; + + /** + * StateTensor torch_param. + * @member {syft_proto.types.torch.v1.IParameter|null|undefined} torch_param + * @memberof syft_proto.messaging.v1.StateTensor + * @instance + */ + StateTensor.prototype.torch_param = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StateTensor tensor. + * @member {"torch_tensor"|"torch_param"|undefined} tensor + * @memberof syft_proto.messaging.v1.StateTensor + * @instance + */ + Object.defineProperty(StateTensor.prototype, "tensor", { + get: $util.oneOfGetter($oneOfFields = ["torch_tensor", "torch_param"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StateTensor instance using the specified properties. + * @function create + * @memberof syft_proto.messaging.v1.StateTensor + * @static + * @param {syft_proto.messaging.v1.IStateTensor=} [properties] Properties to set + * @returns {syft_proto.messaging.v1.StateTensor} StateTensor instance + */ + StateTensor.create = function create(properties) { + return new StateTensor(properties); + }; + + /** + * Encodes the specified StateTensor message. Does not implicitly {@link syft_proto.messaging.v1.StateTensor.verify|verify} messages. + * @function encode + * @memberof syft_proto.messaging.v1.StateTensor + * @static + * @param {syft_proto.messaging.v1.IStateTensor} message StateTensor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StateTensor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.torch_tensor != null && message.hasOwnProperty("torch_tensor")) + $root.syft_proto.types.torch.v1.TorchTensor.encode(message.torch_tensor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.torch_param != null && message.hasOwnProperty("torch_param")) + $root.syft_proto.types.torch.v1.Parameter.encode(message.torch_param, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StateTensor message, length delimited. Does not implicitly {@link syft_proto.messaging.v1.StateTensor.verify|verify} messages. + * @function encodeDelimited + * @memberof syft_proto.messaging.v1.StateTensor + * @static + * @param {syft_proto.messaging.v1.IStateTensor} message StateTensor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StateTensor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StateTensor message from the specified reader or buffer. + * @function decode + * @memberof syft_proto.messaging.v1.StateTensor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {syft_proto.messaging.v1.StateTensor} StateTensor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StateTensor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.syft_proto.messaging.v1.StateTensor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.torch_tensor = $root.syft_proto.types.torch.v1.TorchTensor.decode(reader, reader.uint32()); + break; + case 2: + message.torch_param = $root.syft_proto.types.torch.v1.Parameter.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StateTensor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof syft_proto.messaging.v1.StateTensor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {syft_proto.messaging.v1.StateTensor} StateTensor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StateTensor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StateTensor message. + * @function verify + * @memberof syft_proto.messaging.v1.StateTensor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StateTensor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.torch_tensor != null && message.hasOwnProperty("torch_tensor")) { + properties.tensor = 1; + { + var error = $root.syft_proto.types.torch.v1.TorchTensor.verify(message.torch_tensor); + if (error) + return "torch_tensor." + error; + } + } + if (message.torch_param != null && message.hasOwnProperty("torch_param")) { + if (properties.tensor === 1) + return "tensor: multiple values"; + properties.tensor = 1; + { + var error = $root.syft_proto.types.torch.v1.Parameter.verify(message.torch_param); + if (error) + return "torch_param." + error; + } + } + return null; + }; + + /** + * Creates a StateTensor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof syft_proto.messaging.v1.StateTensor + * @static + * @param {Object.} object Plain object + * @returns {syft_proto.messaging.v1.StateTensor} StateTensor + */ + StateTensor.fromObject = function fromObject(object) { + if (object instanceof $root.syft_proto.messaging.v1.StateTensor) + return object; + var message = new $root.syft_proto.messaging.v1.StateTensor(); + if (object.torch_tensor != null) { + if (typeof object.torch_tensor !== "object") + throw TypeError(".syft_proto.messaging.v1.StateTensor.torch_tensor: object expected"); + message.torch_tensor = $root.syft_proto.types.torch.v1.TorchTensor.fromObject(object.torch_tensor); + } + if (object.torch_param != null) { + if (typeof object.torch_param !== "object") + throw TypeError(".syft_proto.messaging.v1.StateTensor.torch_param: object expected"); + message.torch_param = $root.syft_proto.types.torch.v1.Parameter.fromObject(object.torch_param); + } + return message; + }; + + /** + * Creates a plain object from a StateTensor message. Also converts values to other types if specified. + * @function toObject + * @memberof syft_proto.messaging.v1.StateTensor + * @static + * @param {syft_proto.messaging.v1.StateTensor} message StateTensor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StateTensor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.torch_tensor != null && message.hasOwnProperty("torch_tensor")) { + object.torch_tensor = $root.syft_proto.types.torch.v1.TorchTensor.toObject(message.torch_tensor, options); + if (options.oneofs) + object.tensor = "torch_tensor"; + } + if (message.torch_param != null && message.hasOwnProperty("torch_param")) { + object.torch_param = $root.syft_proto.types.torch.v1.Parameter.toObject(message.torch_param, options); + if (options.oneofs) + object.tensor = "torch_param"; + } + return object; + }; + + /** + * Converts this StateTensor to JSON. + * @function toJSON + * @memberof syft_proto.messaging.v1.StateTensor + * @instance + * @returns {Object.} JSON object + */ + StateTensor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StateTensor; + })(); + v1.Protocol = (function() { /** diff --git a/protobuf/syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto b/protobuf/syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto new file mode 100644 index 0000000..5404482 --- /dev/null +++ b/protobuf/syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package syft_proto.frameworks.torch.tensors.interpreters.v1; + +import "syft_proto/types/syft/v1/id.proto"; + +message Placeholder { + syft_proto.types.syft.v1.Id id = 1; + repeated string tags = 2; + string description = 3; +} diff --git a/protobuf/syft_proto/messaging/v1/plan.proto b/protobuf/syft_proto/messaging/v1/plan.proto new file mode 100644 index 0000000..f86746c --- /dev/null +++ b/protobuf/syft_proto/messaging/v1/plan.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package syft_proto.messaging.v1; + +import "syft_proto/types/syft/v1/id.proto"; +import "syft_proto/types/syft/v1/operation.proto"; +import "syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto"; +import "syft_proto/messaging/v1/state.proto"; + +message Plan { + syft_proto.types.syft.v1.Id id = 1; + repeated syft_proto.types.syft.v1.Operation operations = 2; + syft_proto.messaging.v1.State state = 3; + bool include_state = 4; + bool is_built = 5; + string name = 6; + repeated string tags = 7; + string description = 8; + repeated syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder placeholders = 9; +} \ No newline at end of file diff --git a/protobuf/syft_proto/messaging/v1/state.proto b/protobuf/syft_proto/messaging/v1/state.proto new file mode 100644 index 0000000..69ca53d --- /dev/null +++ b/protobuf/syft_proto/messaging/v1/state.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package syft_proto.messaging.v1; + +import "syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto"; +import "syft_proto/types/torch/v1/tensor.proto"; +import "syft_proto/messaging/v1/state_tensor.proto"; + +message State { + repeated syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder placeholders = 1; + repeated syft_proto.messaging.v1.StateTensor tensors = 2; +} \ No newline at end of file diff --git a/protobuf/syft_proto/messaging/v1/state_tensor.proto b/protobuf/syft_proto/messaging/v1/state_tensor.proto new file mode 100644 index 0000000..d52b733 --- /dev/null +++ b/protobuf/syft_proto/messaging/v1/state_tensor.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package syft_proto.messaging.v1; + +import "syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto"; +import "syft_proto/types/torch/v1/tensor.proto"; +import "syft_proto/types/torch/v1/parameter.proto"; + +message StateTensor { + oneof tensor { + syft_proto.types.torch.v1.TorchTensor torch_tensor = 1; + syft_proto.types.torch.v1.Parameter torch_param = 2; + } +} \ No newline at end of file diff --git a/protobuf/syft_proto/types/syft/v1/arg.proto b/protobuf/syft_proto/types/syft/v1/arg.proto index dd0848f..9755a8c 100644 --- a/protobuf/syft_proto/types/syft/v1/arg.proto +++ b/protobuf/syft_proto/types/syft/v1/arg.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package syft_proto.types.syft.v1; +import "syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto"; import "syft_proto/generic/pointers/v1/pointer_tensor.proto"; import "syft_proto/types/torch/v1/tensor.proto"; import "syft_proto/types/syft/v1/shape.proto"; @@ -19,5 +20,6 @@ message Arg { syft_proto.types.torch.v1.Parameter arg_torch_param = 7; syft_proto.generic.pointers.v1.PointerTensor arg_pointer_tensor = 8; + syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder arg_placeholder = 9; } } diff --git a/protobuf/syft_proto/types/syft/v1/operation.proto b/protobuf/syft_proto/types/syft/v1/operation.proto index 463096e..34c7e88 100644 --- a/protobuf/syft_proto/types/syft/v1/operation.proto +++ b/protobuf/syft_proto/types/syft/v1/operation.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package syft_proto.types.syft.v1; import "syft_proto/generic/pointers/v1/pointer_tensor.proto"; +import "syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto"; import "syft_proto/types/syft/v1/arg.proto"; import "syft_proto/types/syft/v1/id.proto"; import "syft_proto/types/torch/v1/tensor.proto"; @@ -11,9 +12,11 @@ message Operation { string command = 1; oneof owner { syft_proto.generic.pointers.v1.PointerTensor owner_pointer = 2; - syft_proto.types.torch.v1.TorchTensor owner_tensor = 7; + syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder owner_placeholder = 3; + syft_proto.types.torch.v1.TorchTensor owner_tensor = 4; } - repeated syft_proto.types.syft.v1.Arg args = 3; - map kwargs = 4; - repeated syft_proto.types.syft.v1.Id return_ids = 5; + repeated syft_proto.types.syft.v1.Arg args = 5; + map kwargs = 6; + repeated syft_proto.types.syft.v1.Id return_ids = 7; + repeated syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder return_placeholders = 8; } diff --git a/syft_proto/frameworks/torch/tensors/interpreters/v1/additive_shared_pb2.py b/syft_proto/frameworks/torch/tensors/interpreters/v1/additive_shared_pb2.py index 60a95a5..61ac658 100644 --- a/syft_proto/frameworks/torch/tensors/interpreters/v1/additive_shared_pb2.py +++ b/syft_proto/frameworks/torch/tensors/interpreters/v1/additive_shared_pb2.py @@ -94,11 +94,11 @@ DESCRIPTOR.message_types_by_name['AdditiveSharingTensor'] = _ADDITIVESHARINGTENSOR _sym_db.RegisterFileDescriptor(DESCRIPTOR) -AdditiveSharingTensor = _reflection.GeneratedProtocolMessageType('AdditiveSharingTensor', (_message.Message,), dict( - DESCRIPTOR = _ADDITIVESHARINGTENSOR, - __module__ = 'syft_proto.frameworks.torch.tensors.interpreters.v1.additive_shared_pb2' +AdditiveSharingTensor = _reflection.GeneratedProtocolMessageType('AdditiveSharingTensor', (_message.Message,), { + 'DESCRIPTOR' : _ADDITIVESHARINGTENSOR, + '__module__' : 'syft_proto.frameworks.torch.tensors.interpreters.v1.additive_shared_pb2' # @@protoc_insertion_point(class_scope:syft_proto.frameworks.torch.tensors.interpreters.v1.AdditiveSharingTensor) - )) + }) _sym_db.RegisterMessage(AdditiveSharingTensor) diff --git a/syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder_pb2.py b/syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder_pb2.py new file mode 100644 index 0000000..8674ddc --- /dev/null +++ b/syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder_pb2.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from syft_proto.types.syft.v1 import id_pb2 as syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto', + package='syft_proto.frameworks.torch.tensors.interpreters.v1', + syntax='proto3', + serialized_options=None, + serialized_pb=_b('\nEsyft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto\x12\x33syft_proto.frameworks.torch.tensors.interpreters.v1\x1a!syft_proto/types/syft/v1/id.proto\"q\n\x0bPlaceholder\x12,\n\x02id\x18\x01 \x01(\x0b\x32\x1c.syft_proto.types.syft.v1.IdR\x02id\x12\x12\n\x04tags\x18\x02 \x03(\tR\x04tags\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scriptionb\x06proto3') + , + dependencies=[syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2.DESCRIPTOR,]) + + + + +_PLACEHOLDER = _descriptor.Descriptor( + name='Placeholder', + full_name='syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.id', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='id', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='tags', full_name='syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.tags', index=1, + number=2, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='tags', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='description', full_name='syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder.description', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='description', file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=161, + serialized_end=274, +) + +_PLACEHOLDER.fields_by_name['id'].message_type = syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2._ID +DESCRIPTOR.message_types_by_name['Placeholder'] = _PLACEHOLDER +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Placeholder = _reflection.GeneratedProtocolMessageType('Placeholder', (_message.Message,), { + 'DESCRIPTOR' : _PLACEHOLDER, + '__module__' : 'syft_proto.frameworks.torch.tensors.interpreters.v1.placeholder_pb2' + # @@protoc_insertion_point(class_scope:syft_proto.frameworks.torch.tensors.interpreters.v1.Placeholder) + }) +_sym_db.RegisterMessage(Placeholder) + + +# @@protoc_insertion_point(module_scope) diff --git a/syft_proto/generic/pointers/v1/pointer_tensor_pb2.py b/syft_proto/generic/pointers/v1/pointer_tensor_pb2.py index 1946140..915cf4f 100644 --- a/syft_proto/generic/pointers/v1/pointer_tensor_pb2.py +++ b/syft_proto/generic/pointers/v1/pointer_tensor_pb2.py @@ -101,11 +101,11 @@ DESCRIPTOR.message_types_by_name['PointerTensor'] = _POINTERTENSOR _sym_db.RegisterFileDescriptor(DESCRIPTOR) -PointerTensor = _reflection.GeneratedProtocolMessageType('PointerTensor', (_message.Message,), dict( - DESCRIPTOR = _POINTERTENSOR, - __module__ = 'syft_proto.generic.pointers.v1.pointer_tensor_pb2' +PointerTensor = _reflection.GeneratedProtocolMessageType('PointerTensor', (_message.Message,), { + 'DESCRIPTOR' : _POINTERTENSOR, + '__module__' : 'syft_proto.generic.pointers.v1.pointer_tensor_pb2' # @@protoc_insertion_point(class_scope:syft_proto.generic.pointers.v1.PointerTensor) - )) + }) _sym_db.RegisterMessage(PointerTensor) diff --git a/syft_proto/messaging/v1/message_pb2.py b/syft_proto/messaging/v1/message_pb2.py index 8d93e3e..b7ea75f 100644 --- a/syft_proto/messaging/v1/message_pb2.py +++ b/syft_proto/messaging/v1/message_pb2.py @@ -158,25 +158,25 @@ DESCRIPTOR.message_types_by_name['OperationMessage'] = _OPERATIONMESSAGE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -SyftMessage = _reflection.GeneratedProtocolMessageType('SyftMessage', (_message.Message,), dict( - DESCRIPTOR = _SYFTMESSAGE, - __module__ = 'syft_proto.messaging.v1.message_pb2' +SyftMessage = _reflection.GeneratedProtocolMessageType('SyftMessage', (_message.Message,), { + 'DESCRIPTOR' : _SYFTMESSAGE, + '__module__' : 'syft_proto.messaging.v1.message_pb2' # @@protoc_insertion_point(class_scope:syft_proto.messaging.v1.SyftMessage) - )) + }) _sym_db.RegisterMessage(SyftMessage) -ObjectMessage = _reflection.GeneratedProtocolMessageType('ObjectMessage', (_message.Message,), dict( - DESCRIPTOR = _OBJECTMESSAGE, - __module__ = 'syft_proto.messaging.v1.message_pb2' +ObjectMessage = _reflection.GeneratedProtocolMessageType('ObjectMessage', (_message.Message,), { + 'DESCRIPTOR' : _OBJECTMESSAGE, + '__module__' : 'syft_proto.messaging.v1.message_pb2' # @@protoc_insertion_point(class_scope:syft_proto.messaging.v1.ObjectMessage) - )) + }) _sym_db.RegisterMessage(ObjectMessage) -OperationMessage = _reflection.GeneratedProtocolMessageType('OperationMessage', (_message.Message,), dict( - DESCRIPTOR = _OPERATIONMESSAGE, - __module__ = 'syft_proto.messaging.v1.message_pb2' +OperationMessage = _reflection.GeneratedProtocolMessageType('OperationMessage', (_message.Message,), { + 'DESCRIPTOR' : _OPERATIONMESSAGE, + '__module__' : 'syft_proto.messaging.v1.message_pb2' # @@protoc_insertion_point(class_scope:syft_proto.messaging.v1.OperationMessage) - )) + }) _sym_db.RegisterMessage(OperationMessage) diff --git a/syft_proto/messaging/v1/plan_pb2.py b/syft_proto/messaging/v1/plan_pb2.py new file mode 100644 index 0000000..15ee916 --- /dev/null +++ b/syft_proto/messaging/v1/plan_pb2.py @@ -0,0 +1,135 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: syft_proto/messaging/v1/plan.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from syft_proto.types.syft.v1 import id_pb2 as syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2 +from syft_proto.types.syft.v1 import operation_pb2 as syft__proto_dot_types_dot_syft_dot_v1_dot_operation__pb2 +from syft_proto.frameworks.torch.tensors.interpreters.v1 import placeholder_pb2 as syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2 +from syft_proto.messaging.v1 import state_pb2 as syft__proto_dot_messaging_dot_v1_dot_state__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='syft_proto/messaging/v1/plan.proto', + package='syft_proto.messaging.v1', + syntax='proto3', + serialized_options=None, + serialized_pb=_b('\n\"syft_proto/messaging/v1/plan.proto\x12\x17syft_proto.messaging.v1\x1a!syft_proto/types/syft/v1/id.proto\x1a(syft_proto/types/syft/v1/operation.proto\x1a\x45syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto\x1a#syft_proto/messaging/v1/state.proto\"\x9f\x03\n\x04Plan\x12,\n\x02id\x18\x01 \x01(\x0b\x32\x1c.syft_proto.types.syft.v1.IdR\x02id\x12\x43\n\noperations\x18\x02 \x03(\x0b\x32#.syft_proto.types.syft.v1.OperationR\noperations\x12\x34\n\x05state\x18\x03 \x01(\x0b\x32\x1e.syft_proto.messaging.v1.StateR\x05state\x12#\n\rinclude_state\x18\x04 \x01(\x08R\x0cincludeState\x12\x19\n\x08is_built\x18\x05 \x01(\x08R\x07isBuilt\x12\x12\n\x04name\x18\x06 \x01(\tR\x04name\x12\x12\n\x04tags\x18\x07 \x03(\tR\x04tags\x12 \n\x0b\x64\x65scription\x18\x08 \x01(\tR\x0b\x64\x65scription\x12\x64\n\x0cplaceholders\x18\t \x03(\x0b\x32@.syft_proto.frameworks.torch.tensors.interpreters.v1.PlaceholderR\x0cplaceholdersb\x06proto3') + , + dependencies=[syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2.DESCRIPTOR,syft__proto_dot_types_dot_syft_dot_v1_dot_operation__pb2.DESCRIPTOR,syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2.DESCRIPTOR,syft__proto_dot_messaging_dot_v1_dot_state__pb2.DESCRIPTOR,]) + + + + +_PLAN = _descriptor.Descriptor( + name='Plan', + full_name='syft_proto.messaging.v1.Plan', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='syft_proto.messaging.v1.Plan.id', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='id', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='operations', full_name='syft_proto.messaging.v1.Plan.operations', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='operations', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='state', full_name='syft_proto.messaging.v1.Plan.state', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='state', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='include_state', full_name='syft_proto.messaging.v1.Plan.include_state', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='includeState', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='is_built', full_name='syft_proto.messaging.v1.Plan.is_built', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='isBuilt', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='name', full_name='syft_proto.messaging.v1.Plan.name', index=5, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='name', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='tags', full_name='syft_proto.messaging.v1.Plan.tags', index=6, + number=7, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='tags', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='description', full_name='syft_proto.messaging.v1.Plan.description', index=7, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='description', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='placeholders', full_name='syft_proto.messaging.v1.Plan.placeholders', index=8, + number=9, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='placeholders', file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=249, + serialized_end=664, +) + +_PLAN.fields_by_name['id'].message_type = syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2._ID +_PLAN.fields_by_name['operations'].message_type = syft__proto_dot_types_dot_syft_dot_v1_dot_operation__pb2._OPERATION +_PLAN.fields_by_name['state'].message_type = syft__proto_dot_messaging_dot_v1_dot_state__pb2._STATE +_PLAN.fields_by_name['placeholders'].message_type = syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2._PLACEHOLDER +DESCRIPTOR.message_types_by_name['Plan'] = _PLAN +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Plan = _reflection.GeneratedProtocolMessageType('Plan', (_message.Message,), { + 'DESCRIPTOR' : _PLAN, + '__module__' : 'syft_proto.messaging.v1.plan_pb2' + # @@protoc_insertion_point(class_scope:syft_proto.messaging.v1.Plan) + }) +_sym_db.RegisterMessage(Plan) + + +# @@protoc_insertion_point(module_scope) diff --git a/syft_proto/messaging/v1/protocol_pb2.py b/syft_proto/messaging/v1/protocol_pb2.py index d2ebde2..0ffde69 100644 --- a/syft_proto/messaging/v1/protocol_pb2.py +++ b/syft_proto/messaging/v1/protocol_pb2.py @@ -133,18 +133,18 @@ DESCRIPTOR.message_types_by_name['PlanAssignment'] = _PLANASSIGNMENT _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Protocol = _reflection.GeneratedProtocolMessageType('Protocol', (_message.Message,), dict( - DESCRIPTOR = _PROTOCOL, - __module__ = 'syft_proto.messaging.v1.protocol_pb2' +Protocol = _reflection.GeneratedProtocolMessageType('Protocol', (_message.Message,), { + 'DESCRIPTOR' : _PROTOCOL, + '__module__' : 'syft_proto.messaging.v1.protocol_pb2' # @@protoc_insertion_point(class_scope:syft_proto.messaging.v1.Protocol) - )) + }) _sym_db.RegisterMessage(Protocol) -PlanAssignment = _reflection.GeneratedProtocolMessageType('PlanAssignment', (_message.Message,), dict( - DESCRIPTOR = _PLANASSIGNMENT, - __module__ = 'syft_proto.messaging.v1.protocol_pb2' +PlanAssignment = _reflection.GeneratedProtocolMessageType('PlanAssignment', (_message.Message,), { + 'DESCRIPTOR' : _PLANASSIGNMENT, + '__module__' : 'syft_proto.messaging.v1.protocol_pb2' # @@protoc_insertion_point(class_scope:syft_proto.messaging.v1.PlanAssignment) - )) + }) _sym_db.RegisterMessage(PlanAssignment) diff --git a/syft_proto/messaging/v1/state_pb2.py b/syft_proto/messaging/v1/state_pb2.py new file mode 100644 index 0000000..c79e0ef --- /dev/null +++ b/syft_proto/messaging/v1/state_pb2.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: syft_proto/messaging/v1/state.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from syft_proto.frameworks.torch.tensors.interpreters.v1 import placeholder_pb2 as syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2 +from syft_proto.types.torch.v1 import tensor_pb2 as syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2 +from syft_proto.messaging.v1 import state_tensor_pb2 as syft__proto_dot_messaging_dot_v1_dot_state__tensor__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='syft_proto/messaging/v1/state.proto', + package='syft_proto.messaging.v1', + syntax='proto3', + serialized_options=None, + serialized_pb=_b('\n#syft_proto/messaging/v1/state.proto\x12\x17syft_proto.messaging.v1\x1a\x45syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto\x1a&syft_proto/types/torch/v1/tensor.proto\x1a*syft_proto/messaging/v1/state_tensor.proto\"\xad\x01\n\x05State\x12\x64\n\x0cplaceholders\x18\x01 \x03(\x0b\x32@.syft_proto.frameworks.torch.tensors.interpreters.v1.PlaceholderR\x0cplaceholders\x12>\n\x07tensors\x18\x02 \x03(\x0b\x32$.syft_proto.messaging.v1.StateTensorR\x07tensorsb\x06proto3') + , + dependencies=[syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2.DESCRIPTOR,syft__proto_dot_messaging_dot_v1_dot_state__tensor__pb2.DESCRIPTOR,]) + + + + +_STATE = _descriptor.Descriptor( + name='State', + full_name='syft_proto.messaging.v1.State', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='placeholders', full_name='syft_proto.messaging.v1.State.placeholders', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='placeholders', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='tensors', full_name='syft_proto.messaging.v1.State.tensors', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='tensors', file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=220, + serialized_end=393, +) + +_STATE.fields_by_name['placeholders'].message_type = syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2._PLACEHOLDER +_STATE.fields_by_name['tensors'].message_type = syft__proto_dot_messaging_dot_v1_dot_state__tensor__pb2._STATETENSOR +DESCRIPTOR.message_types_by_name['State'] = _STATE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +State = _reflection.GeneratedProtocolMessageType('State', (_message.Message,), { + 'DESCRIPTOR' : _STATE, + '__module__' : 'syft_proto.messaging.v1.state_pb2' + # @@protoc_insertion_point(class_scope:syft_proto.messaging.v1.State) + }) +_sym_db.RegisterMessage(State) + + +# @@protoc_insertion_point(module_scope) diff --git a/syft_proto/messaging/v1/state_tensor_pb2.py b/syft_proto/messaging/v1/state_tensor_pb2.py new file mode 100644 index 0000000..680c285 --- /dev/null +++ b/syft_proto/messaging/v1/state_tensor_pb2.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: syft_proto/messaging/v1/state_tensor.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from syft_proto.frameworks.torch.tensors.interpreters.v1 import placeholder_pb2 as syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2 +from syft_proto.types.torch.v1 import tensor_pb2 as syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2 +from syft_proto.types.torch.v1 import parameter_pb2 as syft__proto_dot_types_dot_torch_dot_v1_dot_parameter__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='syft_proto/messaging/v1/state_tensor.proto', + package='syft_proto.messaging.v1', + syntax='proto3', + serialized_options=None, + serialized_pb=_b('\n*syft_proto/messaging/v1/state_tensor.proto\x12\x17syft_proto.messaging.v1\x1a\x45syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto\x1a&syft_proto/types/torch/v1/tensor.proto\x1a)syft_proto/types/torch/v1/parameter.proto\"\xad\x01\n\x0bStateTensor\x12K\n\x0ctorch_tensor\x18\x01 \x01(\x0b\x32&.syft_proto.types.torch.v1.TorchTensorH\x00R\x0btorchTensor\x12G\n\x0btorch_param\x18\x02 \x01(\x0b\x32$.syft_proto.types.torch.v1.ParameterH\x00R\ntorchParamB\x08\n\x06tensorb\x06proto3') + , + dependencies=[syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_parameter__pb2.DESCRIPTOR,]) + + + + +_STATETENSOR = _descriptor.Descriptor( + name='StateTensor', + full_name='syft_proto.messaging.v1.StateTensor', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='torch_tensor', full_name='syft_proto.messaging.v1.StateTensor.torch_tensor', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='torchTensor', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='torch_param', full_name='syft_proto.messaging.v1.StateTensor.torch_param', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='torchParam', file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='tensor', full_name='syft_proto.messaging.v1.StateTensor.tensor', + index=0, containing_type=None, fields=[]), + ], + serialized_start=226, + serialized_end=399, +) + +_STATETENSOR.fields_by_name['torch_tensor'].message_type = syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2._TORCHTENSOR +_STATETENSOR.fields_by_name['torch_param'].message_type = syft__proto_dot_types_dot_torch_dot_v1_dot_parameter__pb2._PARAMETER +_STATETENSOR.oneofs_by_name['tensor'].fields.append( + _STATETENSOR.fields_by_name['torch_tensor']) +_STATETENSOR.fields_by_name['torch_tensor'].containing_oneof = _STATETENSOR.oneofs_by_name['tensor'] +_STATETENSOR.oneofs_by_name['tensor'].fields.append( + _STATETENSOR.fields_by_name['torch_param']) +_STATETENSOR.fields_by_name['torch_param'].containing_oneof = _STATETENSOR.oneofs_by_name['tensor'] +DESCRIPTOR.message_types_by_name['StateTensor'] = _STATETENSOR +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +StateTensor = _reflection.GeneratedProtocolMessageType('StateTensor', (_message.Message,), { + 'DESCRIPTOR' : _STATETENSOR, + '__module__' : 'syft_proto.messaging.v1.state_tensor_pb2' + # @@protoc_insertion_point(class_scope:syft_proto.messaging.v1.StateTensor) + }) +_sym_db.RegisterMessage(StateTensor) + + +# @@protoc_insertion_point(module_scope) diff --git a/syft_proto/types/syft/v1/arg_pb2.py b/syft_proto/types/syft/v1/arg_pb2.py index 9037d5f..d4133ad 100644 --- a/syft_proto/types/syft/v1/arg_pb2.py +++ b/syft_proto/types/syft/v1/arg_pb2.py @@ -13,6 +13,7 @@ _sym_db = _symbol_database.Default() +from syft_proto.frameworks.torch.tensors.interpreters.v1 import placeholder_pb2 as syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2 from syft_proto.generic.pointers.v1 import pointer_tensor_pb2 as syft__proto_dot_generic_dot_pointers_dot_v1_dot_pointer__tensor__pb2 from syft_proto.types.torch.v1 import tensor_pb2 as syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2 from syft_proto.types.syft.v1 import shape_pb2 as syft__proto_dot_types_dot_syft_dot_v1_dot_shape__pb2 @@ -24,9 +25,9 @@ package='syft_proto.types.syft.v1', syntax='proto3', serialized_options=None, - serialized_pb=_b('\n\"syft_proto/types/syft/v1/arg.proto\x12\x18syft_proto.types.syft.v1\x1a\x33syft_proto/generic/pointers/v1/pointer_tensor.proto\x1a&syft_proto/types/torch/v1/tensor.proto\x1a$syft_proto/types/syft/v1/shape.proto\x1a)syft_proto/types/torch/v1/parameter.proto\"\xbc\x03\n\x03\x41rg\x12\x1b\n\x08\x61rg_bool\x18\x01 \x01(\x08H\x00R\x07\x61rgBool\x12\x19\n\x07\x61rg_int\x18\x02 \x01(\x05H\x00R\x06\x61rgInt\x12\x1d\n\targ_float\x18\x03 \x01(\x02H\x00R\x08\x61rgFloat\x12\x1f\n\narg_string\x18\x04 \x01(\tH\x00R\targString\x12>\n\targ_shape\x18\x05 \x01(\x0b\x32\x1f.syft_proto.types.syft.v1.ShapeH\x00R\x08\x61rgShape\x12G\n\narg_tensor\x18\x06 \x01(\x0b\x32&.syft_proto.types.torch.v1.TorchTensorH\x00R\targTensor\x12N\n\x0f\x61rg_torch_param\x18\x07 \x01(\x0b\x32$.syft_proto.types.torch.v1.ParameterH\x00R\rargTorchParam\x12]\n\x12\x61rg_pointer_tensor\x18\x08 \x01(\x0b\x32-.syft_proto.generic.pointers.v1.PointerTensorH\x00R\x10\x61rgPointerTensorB\x05\n\x03\x61rgb\x06proto3') + serialized_pb=_b('\n\"syft_proto/types/syft/v1/arg.proto\x12\x18syft_proto.types.syft.v1\x1a\x45syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto\x1a\x33syft_proto/generic/pointers/v1/pointer_tensor.proto\x1a&syft_proto/types/torch/v1/tensor.proto\x1a$syft_proto/types/syft/v1/shape.proto\x1a)syft_proto/types/torch/v1/parameter.proto\"\xa9\x04\n\x03\x41rg\x12\x1b\n\x08\x61rg_bool\x18\x01 \x01(\x08H\x00R\x07\x61rgBool\x12\x19\n\x07\x61rg_int\x18\x02 \x01(\x05H\x00R\x06\x61rgInt\x12\x1d\n\targ_float\x18\x03 \x01(\x02H\x00R\x08\x61rgFloat\x12\x1f\n\narg_string\x18\x04 \x01(\tH\x00R\targString\x12>\n\targ_shape\x18\x05 \x01(\x0b\x32\x1f.syft_proto.types.syft.v1.ShapeH\x00R\x08\x61rgShape\x12G\n\narg_tensor\x18\x06 \x01(\x0b\x32&.syft_proto.types.torch.v1.TorchTensorH\x00R\targTensor\x12N\n\x0f\x61rg_torch_param\x18\x07 \x01(\x0b\x32$.syft_proto.types.torch.v1.ParameterH\x00R\rargTorchParam\x12]\n\x12\x61rg_pointer_tensor\x18\x08 \x01(\x0b\x32-.syft_proto.generic.pointers.v1.PointerTensorH\x00R\x10\x61rgPointerTensor\x12k\n\x0f\x61rg_placeholder\x18\t \x01(\x0b\x32@.syft_proto.frameworks.torch.tensors.interpreters.v1.PlaceholderH\x00R\x0e\x61rgPlaceholderB\x05\n\x03\x61rgb\x06proto3') , - dependencies=[syft__proto_dot_generic_dot_pointers_dot_v1_dot_pointer__tensor__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2.DESCRIPTOR,syft__proto_dot_types_dot_syft_dot_v1_dot_shape__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_parameter__pb2.DESCRIPTOR,]) + dependencies=[syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2.DESCRIPTOR,syft__proto_dot_generic_dot_pointers_dot_v1_dot_pointer__tensor__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2.DESCRIPTOR,syft__proto_dot_types_dot_syft_dot_v1_dot_shape__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_parameter__pb2.DESCRIPTOR,]) @@ -94,6 +95,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, json_name='argPointerTensor', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='arg_placeholder', full_name='syft_proto.types.syft.v1.Arg.arg_placeholder', index=8, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='argPlaceholder', file=DESCRIPTOR), ], extensions=[ ], @@ -109,14 +117,15 @@ name='arg', full_name='syft_proto.types.syft.v1.Arg.arg', index=0, containing_type=None, fields=[]), ], - serialized_start=239, - serialized_end=683, + serialized_start=310, + serialized_end=863, ) _ARG.fields_by_name['arg_shape'].message_type = syft__proto_dot_types_dot_syft_dot_v1_dot_shape__pb2._SHAPE _ARG.fields_by_name['arg_tensor'].message_type = syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2._TORCHTENSOR _ARG.fields_by_name['arg_torch_param'].message_type = syft__proto_dot_types_dot_torch_dot_v1_dot_parameter__pb2._PARAMETER _ARG.fields_by_name['arg_pointer_tensor'].message_type = syft__proto_dot_generic_dot_pointers_dot_v1_dot_pointer__tensor__pb2._POINTERTENSOR +_ARG.fields_by_name['arg_placeholder'].message_type = syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2._PLACEHOLDER _ARG.oneofs_by_name['arg'].fields.append( _ARG.fields_by_name['arg_bool']) _ARG.fields_by_name['arg_bool'].containing_oneof = _ARG.oneofs_by_name['arg'] @@ -141,14 +150,17 @@ _ARG.oneofs_by_name['arg'].fields.append( _ARG.fields_by_name['arg_pointer_tensor']) _ARG.fields_by_name['arg_pointer_tensor'].containing_oneof = _ARG.oneofs_by_name['arg'] +_ARG.oneofs_by_name['arg'].fields.append( + _ARG.fields_by_name['arg_placeholder']) +_ARG.fields_by_name['arg_placeholder'].containing_oneof = _ARG.oneofs_by_name['arg'] DESCRIPTOR.message_types_by_name['Arg'] = _ARG _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Arg = _reflection.GeneratedProtocolMessageType('Arg', (_message.Message,), dict( - DESCRIPTOR = _ARG, - __module__ = 'syft_proto.types.syft.v1.arg_pb2' +Arg = _reflection.GeneratedProtocolMessageType('Arg', (_message.Message,), { + 'DESCRIPTOR' : _ARG, + '__module__' : 'syft_proto.types.syft.v1.arg_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.syft.v1.Arg) - )) + }) _sym_db.RegisterMessage(Arg) diff --git a/syft_proto/types/syft/v1/id_pb2.py b/syft_proto/types/syft/v1/id_pb2.py index 55f06c8..9219677 100644 --- a/syft_proto/types/syft/v1/id_pb2.py +++ b/syft_proto/types/syft/v1/id_pb2.py @@ -75,11 +75,11 @@ DESCRIPTOR.message_types_by_name['Id'] = _ID _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Id = _reflection.GeneratedProtocolMessageType('Id', (_message.Message,), dict( - DESCRIPTOR = _ID, - __module__ = 'syft_proto.types.syft.v1.id_pb2' +Id = _reflection.GeneratedProtocolMessageType('Id', (_message.Message,), { + 'DESCRIPTOR' : _ID, + '__module__' : 'syft_proto.types.syft.v1.id_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.syft.v1.Id) - )) + }) _sym_db.RegisterMessage(Id) diff --git a/syft_proto/types/syft/v1/operation_pb2.py b/syft_proto/types/syft/v1/operation_pb2.py index 4231e73..38dd6c1 100644 --- a/syft_proto/types/syft/v1/operation_pb2.py +++ b/syft_proto/types/syft/v1/operation_pb2.py @@ -14,6 +14,7 @@ from syft_proto.generic.pointers.v1 import pointer_tensor_pb2 as syft__proto_dot_generic_dot_pointers_dot_v1_dot_pointer__tensor__pb2 +from syft_proto.frameworks.torch.tensors.interpreters.v1 import placeholder_pb2 as syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2 from syft_proto.types.syft.v1 import arg_pb2 as syft__proto_dot_types_dot_syft_dot_v1_dot_arg__pb2 from syft_proto.types.syft.v1 import id_pb2 as syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2 from syft_proto.types.torch.v1 import tensor_pb2 as syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2 @@ -24,9 +25,9 @@ package='syft_proto.types.syft.v1', syntax='proto3', serialized_options=None, - serialized_pb=_b('\n(syft_proto/types/syft/v1/operation.proto\x12\x18syft_proto.types.syft.v1\x1a\x33syft_proto/generic/pointers/v1/pointer_tensor.proto\x1a\"syft_proto/types/syft/v1/arg.proto\x1a!syft_proto/types/syft/v1/id.proto\x1a&syft_proto/types/torch/v1/tensor.proto\"\xe4\x03\n\tOperation\x12\x18\n\x07\x63ommand\x18\x01 \x01(\tR\x07\x63ommand\x12T\n\rowner_pointer\x18\x02 \x01(\x0b\x32-.syft_proto.generic.pointers.v1.PointerTensorH\x00R\x0cownerPointer\x12K\n\x0cowner_tensor\x18\x07 \x01(\x0b\x32&.syft_proto.types.torch.v1.TorchTensorH\x00R\x0bownerTensor\x12\x31\n\x04\x61rgs\x18\x03 \x03(\x0b\x32\x1d.syft_proto.types.syft.v1.ArgR\x04\x61rgs\x12G\n\x06kwargs\x18\x04 \x03(\x0b\x32/.syft_proto.types.syft.v1.Operation.KwargsEntryR\x06kwargs\x12;\n\nreturn_ids\x18\x05 \x03(\x0b\x32\x1c.syft_proto.types.syft.v1.IdR\treturnIds\x1aX\n\x0bKwargsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32\x1d.syft_proto.types.syft.v1.ArgR\x05value:\x02\x38\x01\x42\x07\n\x05ownerb\x06proto3') + serialized_pb=_b('\n(syft_proto/types/syft/v1/operation.proto\x12\x18syft_proto.types.syft.v1\x1a\x33syft_proto/generic/pointers/v1/pointer_tensor.proto\x1a\x45syft_proto/frameworks/torch/tensors/interpreters/v1/placeholder.proto\x1a\"syft_proto/types/syft/v1/arg.proto\x1a!syft_proto/types/syft/v1/id.proto\x1a&syft_proto/types/torch/v1/tensor.proto\"\xc8\x05\n\tOperation\x12\x18\n\x07\x63ommand\x18\x01 \x01(\tR\x07\x63ommand\x12T\n\rowner_pointer\x18\x02 \x01(\x0b\x32-.syft_proto.generic.pointers.v1.PointerTensorH\x00R\x0cownerPointer\x12o\n\x11owner_placeholder\x18\x03 \x01(\x0b\x32@.syft_proto.frameworks.torch.tensors.interpreters.v1.PlaceholderH\x00R\x10ownerPlaceholder\x12K\n\x0cowner_tensor\x18\x04 \x01(\x0b\x32&.syft_proto.types.torch.v1.TorchTensorH\x00R\x0bownerTensor\x12\x31\n\x04\x61rgs\x18\x05 \x03(\x0b\x32\x1d.syft_proto.types.syft.v1.ArgR\x04\x61rgs\x12G\n\x06kwargs\x18\x06 \x03(\x0b\x32/.syft_proto.types.syft.v1.Operation.KwargsEntryR\x06kwargs\x12;\n\nreturn_ids\x18\x07 \x03(\x0b\x32\x1c.syft_proto.types.syft.v1.IdR\treturnIds\x12q\n\x13return_placeholders\x18\x08 \x03(\x0b\x32@.syft_proto.frameworks.torch.tensors.interpreters.v1.PlaceholderR\x12returnPlaceholders\x1aX\n\x0bKwargsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32\x1d.syft_proto.types.syft.v1.ArgR\x05value:\x02\x38\x01\x42\x07\n\x05ownerb\x06proto3') , - dependencies=[syft__proto_dot_generic_dot_pointers_dot_v1_dot_pointer__tensor__pb2.DESCRIPTOR,syft__proto_dot_types_dot_syft_dot_v1_dot_arg__pb2.DESCRIPTOR,syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2.DESCRIPTOR,]) + dependencies=[syft__proto_dot_generic_dot_pointers_dot_v1_dot_pointer__tensor__pb2.DESCRIPTOR,syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2.DESCRIPTOR,syft__proto_dot_types_dot_syft_dot_v1_dot_arg__pb2.DESCRIPTOR,syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2.DESCRIPTOR,syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2.DESCRIPTOR,]) @@ -64,8 +65,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=622, - serialized_end=710, + serialized_start=921, + serialized_end=1009, ) _OPERATION = _descriptor.Descriptor( @@ -90,33 +91,47 @@ is_extension=False, extension_scope=None, serialized_options=None, json_name='ownerPointer', file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='owner_tensor', full_name='syft_proto.types.syft.v1.Operation.owner_tensor', index=2, - number=7, type=11, cpp_type=10, label=1, + name='owner_placeholder', full_name='syft_proto.types.syft.v1.Operation.owner_placeholder', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='ownerPlaceholder', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='owner_tensor', full_name='syft_proto.types.syft.v1.Operation.owner_tensor', index=3, + number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, json_name='ownerTensor', file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='args', full_name='syft_proto.types.syft.v1.Operation.args', index=3, - number=3, type=11, cpp_type=10, label=3, + name='args', full_name='syft_proto.types.syft.v1.Operation.args', index=4, + number=5, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, json_name='args', file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='kwargs', full_name='syft_proto.types.syft.v1.Operation.kwargs', index=4, - number=4, type=11, cpp_type=10, label=3, + name='kwargs', full_name='syft_proto.types.syft.v1.Operation.kwargs', index=5, + number=6, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, json_name='kwargs', file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='return_ids', full_name='syft_proto.types.syft.v1.Operation.return_ids', index=5, - number=5, type=11, cpp_type=10, label=3, + name='return_ids', full_name='syft_proto.types.syft.v1.Operation.return_ids', index=6, + number=7, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, json_name='returnIds', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='return_placeholders', full_name='syft_proto.types.syft.v1.Operation.return_placeholders', index=7, + number=8, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='returnPlaceholders', file=DESCRIPTOR), ], extensions=[ ], @@ -132,38 +147,43 @@ name='owner', full_name='syft_proto.types.syft.v1.Operation.owner', index=0, containing_type=None, fields=[]), ], - serialized_start=235, - serialized_end=719, + serialized_start=306, + serialized_end=1018, ) _OPERATION_KWARGSENTRY.fields_by_name['value'].message_type = syft__proto_dot_types_dot_syft_dot_v1_dot_arg__pb2._ARG _OPERATION_KWARGSENTRY.containing_type = _OPERATION _OPERATION.fields_by_name['owner_pointer'].message_type = syft__proto_dot_generic_dot_pointers_dot_v1_dot_pointer__tensor__pb2._POINTERTENSOR +_OPERATION.fields_by_name['owner_placeholder'].message_type = syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2._PLACEHOLDER _OPERATION.fields_by_name['owner_tensor'].message_type = syft__proto_dot_types_dot_torch_dot_v1_dot_tensor__pb2._TORCHTENSOR _OPERATION.fields_by_name['args'].message_type = syft__proto_dot_types_dot_syft_dot_v1_dot_arg__pb2._ARG _OPERATION.fields_by_name['kwargs'].message_type = _OPERATION_KWARGSENTRY _OPERATION.fields_by_name['return_ids'].message_type = syft__proto_dot_types_dot_syft_dot_v1_dot_id__pb2._ID +_OPERATION.fields_by_name['return_placeholders'].message_type = syft__proto_dot_frameworks_dot_torch_dot_tensors_dot_interpreters_dot_v1_dot_placeholder__pb2._PLACEHOLDER _OPERATION.oneofs_by_name['owner'].fields.append( _OPERATION.fields_by_name['owner_pointer']) _OPERATION.fields_by_name['owner_pointer'].containing_oneof = _OPERATION.oneofs_by_name['owner'] +_OPERATION.oneofs_by_name['owner'].fields.append( + _OPERATION.fields_by_name['owner_placeholder']) +_OPERATION.fields_by_name['owner_placeholder'].containing_oneof = _OPERATION.oneofs_by_name['owner'] _OPERATION.oneofs_by_name['owner'].fields.append( _OPERATION.fields_by_name['owner_tensor']) _OPERATION.fields_by_name['owner_tensor'].containing_oneof = _OPERATION.oneofs_by_name['owner'] DESCRIPTOR.message_types_by_name['Operation'] = _OPERATION _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Operation = _reflection.GeneratedProtocolMessageType('Operation', (_message.Message,), dict( +Operation = _reflection.GeneratedProtocolMessageType('Operation', (_message.Message,), { - KwargsEntry = _reflection.GeneratedProtocolMessageType('KwargsEntry', (_message.Message,), dict( - DESCRIPTOR = _OPERATION_KWARGSENTRY, - __module__ = 'syft_proto.types.syft.v1.operation_pb2' + 'KwargsEntry' : _reflection.GeneratedProtocolMessageType('KwargsEntry', (_message.Message,), { + 'DESCRIPTOR' : _OPERATION_KWARGSENTRY, + '__module__' : 'syft_proto.types.syft.v1.operation_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.syft.v1.Operation.KwargsEntry) - )) + }) , - DESCRIPTOR = _OPERATION, - __module__ = 'syft_proto.types.syft.v1.operation_pb2' + 'DESCRIPTOR' : _OPERATION, + '__module__' : 'syft_proto.types.syft.v1.operation_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.syft.v1.Operation) - )) + }) _sym_db.RegisterMessage(Operation) _sym_db.RegisterMessage(Operation.KwargsEntry) diff --git a/syft_proto/types/syft/v1/shape_pb2.py b/syft_proto/types/syft/v1/shape_pb2.py index bccf36c..7941f21 100644 --- a/syft_proto/types/syft/v1/shape_pb2.py +++ b/syft_proto/types/syft/v1/shape_pb2.py @@ -59,11 +59,11 @@ DESCRIPTOR.message_types_by_name['Shape'] = _SHAPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Shape = _reflection.GeneratedProtocolMessageType('Shape', (_message.Message,), dict( - DESCRIPTOR = _SHAPE, - __module__ = 'syft_proto.types.syft.v1.shape_pb2' +Shape = _reflection.GeneratedProtocolMessageType('Shape', (_message.Message,), { + 'DESCRIPTOR' : _SHAPE, + '__module__' : 'syft_proto.types.syft.v1.shape_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.syft.v1.Shape) - )) + }) _sym_db.RegisterMessage(Shape) diff --git a/syft_proto/types/torch/v1/c_function_pb2.py b/syft_proto/types/torch/v1/c_function_pb2.py index 8bc6cbf..08b4729 100644 --- a/syft_proto/types/torch/v1/c_function_pb2.py +++ b/syft_proto/types/torch/v1/c_function_pb2.py @@ -59,11 +59,11 @@ DESCRIPTOR.message_types_by_name['CFunction'] = _CFUNCTION _sym_db.RegisterFileDescriptor(DESCRIPTOR) -CFunction = _reflection.GeneratedProtocolMessageType('CFunction', (_message.Message,), dict( - DESCRIPTOR = _CFUNCTION, - __module__ = 'syft_proto.types.torch.v1.c_function_pb2' +CFunction = _reflection.GeneratedProtocolMessageType('CFunction', (_message.Message,), { + 'DESCRIPTOR' : _CFUNCTION, + '__module__' : 'syft_proto.types.torch.v1.c_function_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.CFunction) - )) + }) _sym_db.RegisterMessage(CFunction) diff --git a/syft_proto/types/torch/v1/device_pb2.py b/syft_proto/types/torch/v1/device_pb2.py index 643feb7..9a7484e 100644 --- a/syft_proto/types/torch/v1/device_pb2.py +++ b/syft_proto/types/torch/v1/device_pb2.py @@ -59,11 +59,11 @@ DESCRIPTOR.message_types_by_name['Device'] = _DEVICE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Device = _reflection.GeneratedProtocolMessageType('Device', (_message.Message,), dict( - DESCRIPTOR = _DEVICE, - __module__ = 'syft_proto.types.torch.v1.device_pb2' +Device = _reflection.GeneratedProtocolMessageType('Device', (_message.Message,), { + 'DESCRIPTOR' : _DEVICE, + '__module__' : 'syft_proto.types.torch.v1.device_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.Device) - )) + }) _sym_db.RegisterMessage(Device) diff --git a/syft_proto/types/torch/v1/parameter_pb2.py b/syft_proto/types/torch/v1/parameter_pb2.py index ad8a82e..3fd6796 100644 --- a/syft_proto/types/torch/v1/parameter_pb2.py +++ b/syft_proto/types/torch/v1/parameter_pb2.py @@ -86,11 +86,11 @@ DESCRIPTOR.message_types_by_name['Parameter'] = _PARAMETER _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Parameter = _reflection.GeneratedProtocolMessageType('Parameter', (_message.Message,), dict( - DESCRIPTOR = _PARAMETER, - __module__ = 'syft_proto.types.torch.v1.parameter_pb2' +Parameter = _reflection.GeneratedProtocolMessageType('Parameter', (_message.Message,), { + 'DESCRIPTOR' : _PARAMETER, + '__module__' : 'syft_proto.types.torch.v1.parameter_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.Parameter) - )) + }) _sym_db.RegisterMessage(Parameter) diff --git a/syft_proto/types/torch/v1/script_function_pb2.py b/syft_proto/types/torch/v1/script_function_pb2.py index cad0ffc..0a887b6 100644 --- a/syft_proto/types/torch/v1/script_function_pb2.py +++ b/syft_proto/types/torch/v1/script_function_pb2.py @@ -59,11 +59,11 @@ DESCRIPTOR.message_types_by_name['ScriptFunction'] = _SCRIPTFUNCTION _sym_db.RegisterFileDescriptor(DESCRIPTOR) -ScriptFunction = _reflection.GeneratedProtocolMessageType('ScriptFunction', (_message.Message,), dict( - DESCRIPTOR = _SCRIPTFUNCTION, - __module__ = 'syft_proto.types.torch.v1.script_function_pb2' +ScriptFunction = _reflection.GeneratedProtocolMessageType('ScriptFunction', (_message.Message,), { + 'DESCRIPTOR' : _SCRIPTFUNCTION, + '__module__' : 'syft_proto.types.torch.v1.script_function_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.ScriptFunction) - )) + }) _sym_db.RegisterMessage(ScriptFunction) diff --git a/syft_proto/types/torch/v1/script_module_pb2.py b/syft_proto/types/torch/v1/script_module_pb2.py index 8c90ffd..4d5bdad 100644 --- a/syft_proto/types/torch/v1/script_module_pb2.py +++ b/syft_proto/types/torch/v1/script_module_pb2.py @@ -59,11 +59,11 @@ DESCRIPTOR.message_types_by_name['ScriptModule'] = _SCRIPTMODULE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -ScriptModule = _reflection.GeneratedProtocolMessageType('ScriptModule', (_message.Message,), dict( - DESCRIPTOR = _SCRIPTMODULE, - __module__ = 'syft_proto.types.torch.v1.script_module_pb2' +ScriptModule = _reflection.GeneratedProtocolMessageType('ScriptModule', (_message.Message,), { + 'DESCRIPTOR' : _SCRIPTMODULE, + '__module__' : 'syft_proto.types.torch.v1.script_module_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.ScriptModule) - )) + }) _sym_db.RegisterMessage(ScriptModule) diff --git a/syft_proto/types/torch/v1/size_pb2.py b/syft_proto/types/torch/v1/size_pb2.py index 3f924dc..e9172fa 100644 --- a/syft_proto/types/torch/v1/size_pb2.py +++ b/syft_proto/types/torch/v1/size_pb2.py @@ -59,11 +59,11 @@ DESCRIPTOR.message_types_by_name['Size'] = _SIZE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Size = _reflection.GeneratedProtocolMessageType('Size', (_message.Message,), dict( - DESCRIPTOR = _SIZE, - __module__ = 'syft_proto.types.torch.v1.size_pb2' +Size = _reflection.GeneratedProtocolMessageType('Size', (_message.Message,), { + 'DESCRIPTOR' : _SIZE, + '__module__' : 'syft_proto.types.torch.v1.size_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.Size) - )) + }) _sym_db.RegisterMessage(Size) diff --git a/syft_proto/types/torch/v1/tensor_data_pb2.py b/syft_proto/types/torch/v1/tensor_data_pb2.py index 6d154f5..f63755f 100644 --- a/syft_proto/types/torch/v1/tensor_data_pb2.py +++ b/syft_proto/types/torch/v1/tensor_data_pb2.py @@ -182,11 +182,11 @@ DESCRIPTOR.message_types_by_name['TensorData'] = _TENSORDATA _sym_db.RegisterFileDescriptor(DESCRIPTOR) -TensorData = _reflection.GeneratedProtocolMessageType('TensorData', (_message.Message,), dict( - DESCRIPTOR = _TENSORDATA, - __module__ = 'syft_proto.types.torch.v1.tensor_data_pb2' +TensorData = _reflection.GeneratedProtocolMessageType('TensorData', (_message.Message,), { + 'DESCRIPTOR' : _TENSORDATA, + '__module__' : 'syft_proto.types.torch.v1.tensor_data_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.TensorData) - )) + }) _sym_db.RegisterMessage(TensorData) diff --git a/syft_proto/types/torch/v1/tensor_pb2.py b/syft_proto/types/torch/v1/tensor_pb2.py index 92d773a..7143def 100644 --- a/syft_proto/types/torch/v1/tensor_pb2.py +++ b/syft_proto/types/torch/v1/tensor_pb2.py @@ -161,11 +161,11 @@ DESCRIPTOR.message_types_by_name['TorchTensor'] = _TORCHTENSOR _sym_db.RegisterFileDescriptor(DESCRIPTOR) -TorchTensor = _reflection.GeneratedProtocolMessageType('TorchTensor', (_message.Message,), dict( - DESCRIPTOR = _TORCHTENSOR, - __module__ = 'syft_proto.types.torch.v1.tensor_pb2' +TorchTensor = _reflection.GeneratedProtocolMessageType('TorchTensor', (_message.Message,), { + 'DESCRIPTOR' : _TORCHTENSOR, + '__module__' : 'syft_proto.types.torch.v1.tensor_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.TorchTensor) - )) + }) _sym_db.RegisterMessage(TorchTensor) diff --git a/syft_proto/types/torch/v1/traced_module_pb2.py b/syft_proto/types/torch/v1/traced_module_pb2.py index faac2a3..6ca10ac 100644 --- a/syft_proto/types/torch/v1/traced_module_pb2.py +++ b/syft_proto/types/torch/v1/traced_module_pb2.py @@ -59,11 +59,11 @@ DESCRIPTOR.message_types_by_name['TracedModule'] = _TRACEDMODULE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -TracedModule = _reflection.GeneratedProtocolMessageType('TracedModule', (_message.Message,), dict( - DESCRIPTOR = _TRACEDMODULE, - __module__ = 'syft_proto.types.torch.v1.traced_module_pb2' +TracedModule = _reflection.GeneratedProtocolMessageType('TracedModule', (_message.Message,), { + 'DESCRIPTOR' : _TRACEDMODULE, + '__module__' : 'syft_proto.types.torch.v1.traced_module_pb2' # @@protoc_insertion_point(class_scope:syft_proto.types.torch.v1.TracedModule) - )) + }) _sym_db.RegisterMessage(TracedModule)