syft.core.store.dataset

Classes

Dataset(id, data[, description, tags, ...])

Dataset is a wrapper over a collection of Serializable objects.

class syft.core.store.dataset.Dataset(id, data, description=None, tags=None, read_permissions=None, search_permissions=None)[source]

Bases: syft.core.common.serde.serializable.Serializable

Dataset is a wrapper over a collection of Serializable objects.

Parameters
  • id (UID) – the id at which to store the data.

  • data (List[Serializable]) – A list of serializable objects.

  • description (Optional[str]) – An optional string that describes what you are storing. Useful

  • when searching.

  • tags (Optional[List[str]]) – An optional list of strings that are tags used at search.

  • TODO – add docs about read_permission and search_permission

id

the id at which to store the data.

Type

UID

data

A list of serializable objects.

Type

List[Serializable]

description

An optional string that describes what you are storing. Useful

Type

Optional[str]

when searching.
tags

An optional list of strings that are tags used at search.

Type

Optional[List[str]]

static get_protobuf_schema()[source]

Return the type of protobuf object which stores a class of this type

As a part of serialization and deserialization, we need the ability to lookup the protobuf object type directly from the object type. This static method allows us to do this.

Importantly, this method is also used to create the reverse lookup ability within the metaclass of Serializable. In the metaclass, it calls this method and then it takes whatever type is returned from this method and adds an attribute to it with the type of this class attached to it. See the MetaSerializable class for details.

Returns

the type of protobuf object which corresponds to this class.

Return type

GeneratedProtocolMessageType