tensorbay.client.diff

Class about the diff.

DiffBase defines the basic structure of a diff.

NotesDiff defines the basic structure of a brief diff of notes.

CatalogDiff defines the basic structure of a brief diff of catalog.

FileDiff defines the basic structure of a brief diff of data file.

LabelDiff defines the basic structure of a brief diff of data label.

SensorDiff defines the basic structure of a brief diff of sensor.

DataDiff defines the basic structure of a brief diff of data.

SegmentDiff defines the basic structure of a brief diff of a segment.

DatasetDiff defines the basic structure of a brief diff of a dataset.

class tensorbay.client.diff.DiffBase(action: str)[source]

Bases: tensorbay.utility.attr.AttrsMixin, tensorbay.utility.repr.ReprMixin

This class defines the basic structure of a diff.

action

The concrete action.

Type

str

classmethod loads(contents: Dict[str, Any]) tensorbay.client.diff._T[source]

Loads a DiffBase instance from the given contents.

Parameters

contents

A dict containing all the information of the diff:

{
    "action": <str>
}

Returns

A DiffBase instance containing all the information in the given contents.

dumps() Dict[str, Any][source]

Dumps all the information of the diff into a dict.

Returns

A dict containing all the information of the diff:

{
    "action": <str>
}

class tensorbay.client.diff.NotesDiff(action: str)[source]

Bases: tensorbay.client.diff.DiffBase

This class defines the basic structure of a brief diff of notes.

class tensorbay.client.diff.CatalogDiff(action: str)[source]

Bases: tensorbay.client.diff.DiffBase

This class defines the basic structure of a brief diff of catalog.

class tensorbay.client.diff.FileDiff(action: str)[source]

Bases: tensorbay.client.diff.DiffBase

This class defines the basic structure of a brief diff of data file.

class tensorbay.client.diff.LabelDiff(action: str)[source]

Bases: tensorbay.client.diff.DiffBase

This class defines the basic structure of a brief diff of data label.

class tensorbay.client.diff.SensorDiff(action: str)[source]

Bases: tensorbay.client.diff.DiffBase

This class defines the basic structure of a brief diff of sensor.

class tensorbay.client.diff.DataDiff(action: str)[source]

Bases: tensorbay.client.diff.DiffBase

This class defines the basic structure of a diff statistic.

remote_path

The remote path.

Type

str

action

The action of data.

Type

str

file

The brief diff information of the file.

Type

tensorbay.client.diff.FileDiff

label

The brief diff information of the labels.

Type

tensorbay.client.diff.LabelDiff

classmethod loads(contents: Dict[str, Any]) tensorbay.client.diff._T[source]

Loads a DataDiff instance from the given contents.

Parameters

contents

A dict containing all the brief diff information of data:

{
    "remotePath": <str>,
    "action": <str>,
    "file": {
        "action": <str>
    },
    "label": {
        "action": <str>
    }
}

Returns

A DataDiff instance containing all the information in the given contents.

dumps() Dict[str, Any][source]

Dumps all the brief diff information of data into a dict.

Returns

A dict containing all the brief diff information of data:

{
    "remotePath": <str>,
    "action": <str>,
    "file": {
        "action": <str>
    },
    "label": {
        "action": <str>
    }
}

class tensorbay.client.diff.SegmentDiff(name: str, action: str, data: tensorbay.client.lazy.PagingList[tensorbay.client.diff.DataDiff])[source]

Bases: tensorbay.utility.user.UserSequence[tensorbay.client.diff.DataDiff], tensorbay.utility.name.NameMixin

This class defines the basic structure of a brief diff of a segment.

Parameters
  • name – The segment name.

  • action – The action of a segment.

class tensorbay.client.diff.DatasetDiff(name: str, segments: tensorbay.client.lazy.PagingList[tensorbay.client.diff.SegmentDiff])[source]

Bases: Sequence[tensorbay.client.diff.SegmentDiff], tensorbay.utility.name.NameMixin

This class defines the basic structure of a brief diff of a dataset.

Parameters
  • name – The segment name.

  • action – The action of a segment.