roboto.experimental.sessions.record
Module Contents
CompletionPolicy
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 AnyMAX_INACTIVITY_MINUTES
Longest inactivity a CompletionPolicy may wait for: one week.
PendingIngestionFile
Bases: pydantic.BaseModel
A file in a session that is ingestable and not ingested yet.
Parameters
data AnyAttributes
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
Path of the file within its dataset, device, or org.
PendingIngestionFile.uploaded
When the file’s current version was uploaded.
SessionFileRecord
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):
- Set together or both
None; a window with only one bound is rejected on write. - When both are
None, the Session holds the file’s whole recorded time window. - 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]. - 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 theunix_epoch_offset_nsit added.
Data range contract (data_range):
Nonemeans the Session holds the whole file.(start, end):startis the first covered position;endis one past the last, with0 <= start < end. Values are in the file’s own units: stored-row positions (counted from 0), or nanoseconds of media time for video.- Used when one file is shared by several sessions; the range names the slice of the file that belongs to this session.
Parameters
data AnyAttributes
SessionFileRecord.created
When this file was added to the session.
SessionFileRecord.created_by
User ID or service account that added this file to the session.
SessionFileRecord.data_range
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.max_wall_clock_timestamp_ns
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
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
When this file’s place in the session was last modified.
SessionFileRecord.modified_by
User ID or service account that last modified this file’s place in the session.
SessionFileRecord.unix_epoch_offset_ns
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
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 AnyAttributes
SessionFileView.data_range
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.ingestable
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
How much of the contributing file has been ingested.
SessionFileView.max_wall_clock_timestamp_ns
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
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.origination
Provenance of the file, e.g. an invocation id or upload source.
SessionFileView.unix_epoch_offset_ns
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
Bases: roboto.compat.StrEnum
Where a session’s ingestion stands.
Attributes
SessionIngestionState.InProgress
The session is in progress, so it is not announced ingested.
SessionIngestionState.Ingested
The session is complete and every ingestable file in it is ingested.
SessionIngestionState.Processing
The session is complete and at least one of its ingestable files is not ingested yet.
SessionIngestionStatus
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 AnyAttributes
SessionIngestionStatus.ingested_file_count
How many ingestable files are ingested.
SessionIngestionStatus.ingestion_count
How many times the session has been announced ingested.
SessionIngestionStatus.not_ingestable_file_count
How many files are not ingestable. The session never waits for them.
SessionIngestionStatus.pending_file_count
How many ingestable files are not ingested yet, leaving out skipped ones.
SessionIngestionStatus.pending_files
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.skipped_file_count
How many ingestable files not ingested the session was told to stop waiting for.
SessionIngestionStatus.skipped_files
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
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 AnyAttributes
SessionIngestionSummary.failed_file_count
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
How many ingestable files are ingested.
SessionIngestionSummary.not_ingestable_file_count
How many files are not ingestable. The session never waits for them.
SessionIngestionSummary.pending_file_count
How many ingestable files are not ingested yet, leaving out skipped ones.
SessionIngestionSummary.skipped_file_count
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
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 AnyAttributes
SessionRecord.completed_at
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
User ID or service account that last marked the session complete. None if it never was.
SessionRecord.completes_at
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
When Roboto marks the session complete on its own. None: the session is marked complete only by request.
SessionRecord.custom_fields
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.ingested_at
When the session was last announced ingested. None until the first announcement.
SessionRecord.ingestion_count
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
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
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
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_by
User ID or service account that last modified the Session.
SessionRecord.name
A short, human-readable name for the Session. If provided, must be 120 characters or less.
SessionRecord.status
Whether the session is in progress or complete. Adding a file to a complete session puts it back in progress.
SessionRecord.tags
User-supplied tags.
Sessions can be filtered by tag membership (e.g., tags CONTAINS '<tag>') but are not sortable by tag.
SessionStatus
Bases: roboto.compat.StrEnum
Whether a session is still receiving files.
Attributes
SkipWaitingResponse
Bases: pydantic.BaseModel
Response of POST /v1/sessions/id/<session_id>/ingestion/skip.
Parameters
data AnyAttributes
SkipWaitingResponse.ingestion
Where the session stands in ingestion after the skip.
SkipWaitingResponse.not_in_session
Requested file ids that are not in the session, so nothing was skipped for them.
SkippedIngestionFile
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 AnyAttributes
SkippedIngestionFile.relative_path
Path of the file within its dataset, device, or org.
SkippedIngestionFile.skipped_at
When the session was told to stop waiting for the file.
SkippedIngestionFile.skipped_by
User ID or service account that told the session to stop waiting for the file.