Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.experimental.sessions.record

Module Contents

CompletionPolicy

class roboto.experimental.sessions.record.CompletionPolicy(/, **data)#View Source

Bases: pydantic.BaseModel

When Roboto marks a session complete on its own.

A session’s completion policy is set when the session is created and can be changed with an update. Roboto marks the session complete once inactivity_minutes have passed since a file was last added to it, or since the policy was changed, whichever is later. A session that no file has been added to yet is not completed this way. Adding a file to a session Roboto completed puts it back in progress, and Roboto marks it complete again after the same inactivity.

Parameters

data Any

Attributes

CompletionPolicy.inactivity_minutes

inactivity_minutes int = None #

Minutes without a new file after which Roboto marks the session complete.

CompletionPolicy.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

MAX_INACTIVITY_MINUTES

roboto.experimental.sessions.record.MAX_INACTIVITY_MINUTES = 10080#View Source

Longest inactivity a CompletionPolicy may wait for: one week.

PendingIngestionFile

class roboto.experimental.sessions.record.PendingIngestionFile(/, **data)#View Source

Bases: pydantic.BaseModel

A file in a session that is ingestable and not ingested yet.

Parameters

data Any

Attributes

PendingIngestionFile.file_id

file_id str #

ID of the file.

PendingIngestionFile.ingestion_status

How much of the file’s current version is ingested: not at all, or partly.

PendingIngestionFile.last_run

The latest time an ingestion rule’s trigger ran on the file. None when none has.

PendingIngestionFile.relative_path

relative_path str #

Path of the file within its dataset, device, or org.

PendingIngestionFile.uploaded

uploaded datetime.datetime | None = None #

When the file’s current version was uploaded.

SessionFileRecord

class roboto.experimental.sessions.record.SessionFileRecord(/, **data)#View Source

Bases: pydantic.BaseModel

Wire-format row for one file a Session holds, and the part of the file it holds.

Time window contract (min_wall_clock_timestamp_ns and max_wall_clock_timestamp_ns):

  1. Set together or both None; a window with only one bound is rejected on write.
  2. When both are None, the Session holds the file’s whole recorded time window.
  3. When both are set, min_wall_clock_timestamp_ns <= max_wall_clock_timestamp_ns. Consumers iterating session data must keep only the file’s data inside the closed interval [min_wall_clock_timestamp_ns, max_wall_clock_timestamp_ns].
  4. Values are nanoseconds since the Unix epoch, measured the same way as the parent Session’s own bounds. A caller states this window in the file’s own timestamps, on SessionFile; the platform adds the anchor covering the data the window names and reports the sum here, alongside the unix_epoch_offset_ns it added.

Data range contract (data_range):

  1. None means the Session holds the whole file.
  2. (start, end): start is the first covered position; end is one past the last, with 0 <= start < end. Values are in the file’s own units: stored-row positions (counted from 0), or nanoseconds of media time for video.
  3. Used when one file is shared by several sessions; the range names the slice of the file that belongs to this session.

Parameters

data Any

Attributes

SessionFileRecord.created

created datetime.datetime | None = None #

When this file was added to the session.

SessionFileRecord.created_by

created_by str #

User ID or service account that added this file to the session.

SessionFileRecord.data_range

data_range tuple[int, int] | None = None #

The slice of the file the Session holds, as (start, end) in the file’s own units, or None when it holds the whole file. start is the first covered position; end is one past the last.

SessionFileRecord.fs_node_id

fs_node_id str #

Identifier of the file.

SessionFileRecord.max_wall_clock_timestamp_ns

max_wall_clock_timestamp_ns int | None = None #

Upper bound (inclusive) of the part of the file the Session holds, in Unix-epoch nanoseconds. None means the Session holds the file up to the end of its recorded time window; paired with min_wall_clock_timestamp_ns.

SessionFileRecord.min_wall_clock_timestamp_ns

min_wall_clock_timestamp_ns int | None = None #

Lower bound (inclusive) of the part of the file the Session holds, in Unix-epoch nanoseconds. None means the Session holds the file from the beginning of its recorded time window; paired with max_wall_clock_timestamp_ns.

SessionFileRecord.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

SessionFileRecord.modified

modified datetime.datetime | None = None #

When this file’s place in the session was last modified.

SessionFileRecord.modified_by

modified_by str #

User ID or service account that last modified this file’s place in the session.

SessionFileRecord.session_id

session_id str #

Identifier of the session holding this file.

SessionFileRecord.unix_epoch_offset_ns

unix_epoch_offset_ns int | None = None #

Wall-clock instant of stored time 0 for the file’s data the Session holds, in nanoseconds since the Unix epoch: what the platform added to the file’s own timestamps to reach min_wall_clock_timestamp_ns and max_wall_clock_timestamp_ns, and what to subtract to read any other instant back in the file’s own timestamps. None when that data includes nothing registered, and when it sits at more than one instant, which leaves no single offset to report.

SessionFileView

class roboto.experimental.sessions.record.SessionFileView(/, **data)#View Source

Bases: pydantic.BaseModel

One row of the GET /v1/sessions/id/<session_id>/files response: a file’s place in a Session joined with display fields of the file itself.

These fields come from the session’s composition: file_id, the optional time window min_wall_clock_timestamp_ns / max_wall_clock_timestamp_ns in Unix-epoch nanoseconds, the optional data_range slice (the window and the slice both under the contracts documented on SessionFileRecord), and the unix_epoch_offset_ns the platform added to reach that window. Every other field is read from the file itself when the files are listed, and describes the file rather than its place in the session: created is when the file was created, not when it joined the session. None of those fields is part of a write.

Parameters

data Any

Attributes

SessionFileView.created

created datetime.datetime | None = None #

When the file was created.

SessionFileView.data_range

data_range tuple[int, int] | None = None #

The slice of the file the Session holds, as (start, end) in the file’s own units, or None when it holds the whole file. start is the first covered position; end is one past the last.

SessionFileView.dataset_id

dataset_id str | None = None #

ID of the dataset that contains the file.

SessionFileView.file_id

file_id str #

Stable, unique identifier of the file.

SessionFileView.ingestable

ingestable bool | None = None #

Whether the file is meant to be ingested: its path matched one of its org’s ingestion rules when its current version was created, or it has since been partly or fully ingested.

SessionFileView.ingestion_status

ingestion_status roboto.domain.files.IngestionStatus | None = None #

How much of the contributing file has been ingested.

SessionFileView.max_wall_clock_timestamp_ns

max_wall_clock_timestamp_ns int | None = None #

Upper bound (inclusive) of the part of the file the Session holds, in Unix-epoch nanoseconds. None means the Session holds the file up to the end of its recorded time window; paired with min_wall_clock_timestamp_ns.

SessionFileView.min_wall_clock_timestamp_ns

min_wall_clock_timestamp_ns int | None = None #

Lower bound (inclusive) of the part of the file the Session holds, in Unix-epoch nanoseconds. None means the Session holds the file from the beginning of its recorded time window; paired with max_wall_clock_timestamp_ns.

SessionFileView.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

SessionFileView.modified

modified datetime.datetime | None = None #

When the file was last modified.

SessionFileView.name

name str | None = None #

Name of the file (the final segment of relative_path).

SessionFileView.origination

origination str | None = None #

Provenance of the file, e.g. an invocation id or upload source.

SessionFileView.relative_path

relative_path str | None = None #

Path of the file within its dataset.

SessionFileView.size

size int | None = None #

Size of the file in bytes.

SessionFileView.tags

tags list[str] = None #

Tags on the file.

SessionFileView.unix_epoch_offset_ns

unix_epoch_offset_ns int | None = None #

Wall-clock instant of stored time 0 for the file’s data the Session holds, in nanoseconds since the Unix epoch: what the platform added to the file’s own timestamps to reach min_wall_clock_timestamp_ns and max_wall_clock_timestamp_ns, and what to subtract to read any other instant back in the file’s own timestamps. None when that data includes nothing registered, and when it sits at more than one instant, which leaves no single offset to report.

SessionIngestionState

class roboto.experimental.sessions.record.SessionIngestionState#View Source

Bases: roboto.compat.StrEnum

Where a session’s ingestion stands.

Attributes

SessionIngestionState.InProgress

InProgress = 'in_progress' #

The session is in progress, so it is not announced ingested.

SessionIngestionState.Ingested

Ingested = 'ingested' #

The session is complete and every ingestable file in it is ingested.

SessionIngestionState.Processing

Processing = 'processing' #

The session is complete and at least one of its ingestable files is not ingested yet.

SessionIngestionStatus

class roboto.experimental.sessions.record.SessionIngestionStatus(/, **data)#View Source

Bases: pydantic.BaseModel

Where a session stands in ingestion, with the files it is still waiting for.

Response of GET /v1/sessions/id/<session_id>/ingestion.

Parameters

data Any

Attributes

SessionIngestionStatus.ingested_file_count

ingested_file_count int = 0 #

How many ingestable files are ingested.

SessionIngestionStatus.ingestion_count

ingestion_count int #

How many times the session has been announced ingested.

SessionIngestionStatus.not_ingestable_file_count

not_ingestable_file_count int = 0 #

How many files are not ingestable. The session never waits for them.

SessionIngestionStatus.pending_file_count

pending_file_count int = 0 #

How many ingestable files are not ingested yet, leaving out skipped ones.

SessionIngestionStatus.pending_files

pending_files list[PendingIngestionFile] = None #

Ingestable files not ingested yet, which keep a complete session from being announced. Holds at most the first 100, ordered by path; pending_file_count counts them all.

SessionIngestionStatus.session_id

session_id str #

ID of the session.

SessionIngestionStatus.skipped_file_count

skipped_file_count int = 0 #

How many ingestable files not ingested the session was told to stop waiting for.

SessionIngestionStatus.skipped_files

skipped_files list[SkippedIngestionFile] = None #

Ingestable files not ingested that the session was told to stop waiting for. At most the first 100; skipped_file_count counts them all.

SessionIngestionStatus.state

Whether the session is in progress, waiting for files to be ingested, or ingested.

SessionIngestionSummary

class roboto.experimental.sessions.record.SessionIngestionSummary(/, **data)#View Source

Bases: pydantic.BaseModel

Where one session’s ingestion stands, in counts: what a sessions list shows per row.

Response item of POST /v1/sessions/ingestion/summaries.

Parameters

data Any

Attributes

SessionIngestionSummary.failed_file_count

failed_file_count int = 0 #

Pending files whose latest ingestion run failed, or finished without ingesting the file. Counted among the first 100 pending files, as SessionIngestionStatus.pending_files lists them.

SessionIngestionSummary.ingested_file_count

ingested_file_count int = 0 #

How many ingestable files are ingested.

SessionIngestionSummary.not_ingestable_file_count

not_ingestable_file_count int = 0 #

How many files are not ingestable. The session never waits for them.

SessionIngestionSummary.pending_file_count

pending_file_count int = 0 #

How many ingestable files are not ingested yet, leaving out skipped ones.

SessionIngestionSummary.session_id

session_id str #

ID of the session.

SessionIngestionSummary.skipped_file_count

skipped_file_count int = 0 #

Ingestable files not ingested that the session no longer waits for.

SessionIngestionSummary.state

Whether the session is in progress, waiting for files to be ingested, or ingested.

SessionRecord

class roboto.experimental.sessions.record.SessionRecord(/, **data)#View Source

Bases: pydantic.BaseModel

Wire-format row for a session: an operational time window of a Device such as a drone flight, a vehicle drive, or a robot run.

A Session unifies the recordings and auxiliary data produced during its window; it may span many files or cover only a slice of one.

min_timestamp_ns and max_timestamp_ns span every file the Session holds: each file supplies the time window stated for it or, without one, the time span of the data the Session takes from it. The platform recomputes them in the same write as any change to the Session’s files or to the anchors of their data, so the row never disagrees with its contents.

Parameters

data Any

Attributes

SessionRecord.completed_at

completed_at datetime.datetime | None = None #

When the session was last marked complete. None if it never was. Adding a file to a complete session puts it back in progress and keeps this value, so check status to tell whether the session is complete now.

SessionRecord.completed_by

completed_by str | None = None #

User ID or service account that last marked the session complete. None if it never was.

SessionRecord.completes_at

completes_at datetime.datetime | None = None #

When Roboto will mark the session complete unless another file is added first. None while the session is complete, has no completion policy, or has no files.

SessionRecord.completion_policy

completion_policy CompletionPolicy | None = None #

When Roboto marks the session complete on its own. None: the session is marked complete only by request.

SessionRecord.created

created datetime.datetime | None = None #

When the session was created.

SessionRecord.created_by

created_by str #

User ID or service account that created the session.

SessionRecord.custom_fields

custom_fields dict[str, Any] = None #

Values for the custom fields defined on Sessions in this org.

Every Ready custom field defined for (org_id, Session) appears as a key; values that have not been set surface as None rather than being absent. Empty when no custom fields are defined for the org.

SessionRecord.description

description str | None = None #

Optional description of the Session.

SessionRecord.ingested_at

ingested_at datetime.datetime | None = None #

When the session was last announced ingested. None until the first announcement.

SessionRecord.ingestion_count

ingestion_count int = 0 #

How many times the session has been announced ingested. Each announcement fires a session.ingested event. A session is announced again when it is put back in progress and marked complete again, or when its ingestable files change while it is complete, once they are all ingested again. A file uploaded again, removed, or deleted changes them; editing a file’s tags, metadata, or description does not.

SessionRecord.max_timestamp_ns

max_timestamp_ns int | None = None #

Latest time covered by the Session, in Unix-epoch nanoseconds. None while none of its files supplies a time: the Session holds no files, or only files added without a time window whose topic data has no time span registered yet.

SessionRecord.metadata

metadata dict[str, Any] = None #

User-supplied metadata.

Sessions cannot be filtered or sorted by metadata keys; for queryable structured attributes, define a custom field on the Session entity type.

SessionRecord.min_timestamp_ns

min_timestamp_ns int | None = None #

Earliest time covered by the Session, in Unix-epoch nanoseconds. None while none of its files supplies a time: the Session holds no files, or only files added without a time window whose topic data has no time span registered yet.

SessionRecord.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

SessionRecord.modified

modified datetime.datetime | None = None #

When the Session was last modified.

SessionRecord.modified_by

modified_by str #

User ID or service account that last modified the Session.

SessionRecord.name

name str | None = None #

A short, human-readable name for the Session. If provided, must be 120 characters or less.

SessionRecord.org_id

org_id str #

Organization that owns the Session.

SessionRecord.session_id

session_id str #

Stable, unique identifier for the Session.

SessionRecord.status

Whether the session is in progress or complete. Adding a file to a complete session puts it back in progress.

SessionRecord.tags

tags list[str] = None #

User-supplied tags.

Sessions can be filtered by tag membership (e.g., tags CONTAINS '<tag>') but are not sortable by tag.

SessionStatus

class roboto.experimental.sessions.record.SessionStatus#View Source

Bases: roboto.compat.StrEnum

Whether a session is still receiving files.

Attributes

SessionStatus.Complete

Complete = 'complete' #

All of the session’s files have been added. Roboto announces session.ingested once every ingestable file in it is ingested.

SessionStatus.InProgress

InProgress = 'in_progress' #

Files may still be added. Roboto does not announce the session ingested.

SkipWaitingResponse

class roboto.experimental.sessions.record.SkipWaitingResponse(/, **data)#View Source

Bases: pydantic.BaseModel

Response of POST /v1/sessions/id/<session_id>/ingestion/skip.

Parameters

data Any

Attributes

SkipWaitingResponse.ingestion

Where the session stands in ingestion after the skip.

SkipWaitingResponse.not_in_session

not_in_session list[str] = None #

Requested file ids that are not in the session, so nothing was skipped for them.

SkippedIngestionFile

class roboto.experimental.sessions.record.SkippedIngestionFile(/, **data)#View Source

Bases: pydantic.BaseModel

A file in a session that is ingestable and not ingested, which the session no longer waits for.

The skip covers the upload of the file that was current when it was made: editing the file’s tags, metadata, or description keeps it, and uploading the file again ends it.

Parameters

data Any

Attributes

SkippedIngestionFile.file_id

file_id str #

ID of the file.

SkippedIngestionFile.relative_path

relative_path str #

Path of the file within its dataset, device, or org.

SkippedIngestionFile.skipped_at

skipped_at datetime.datetime | None = None #

When the session was told to stop waiting for the file.

SkippedIngestionFile.skipped_by

skipped_by str | None = None #

User ID or service account that told the session to stop waiting for the file.

Was this page helpful?