Skip to main content

model

Pydantic record and state vocabularies for the dataset_states cache table (v1).

Classes​

DatasetStateKind​

class DatasetStateKind(*args, **kwds):

The kinds of state a dataset has in a trial.

Each kind is tracked independently and has its own set of states. A new kind needs only a member here and an enum of its states: the table stores kinds and states as plain strings.

Attributes

  • HUB_LINK: Whether the Hub reports the dataset linked to the trial; its states are HubLinkState.

Variables​

  • static HUB_LINK

DatasetStateRecord​

class DatasetStateRecord(**data: Any):

The current state of one kind for one dataset in one trial.

kind and state are plain strings rather than the enums above, so a row written by a newer version with a kind this one does not know still reads.

Attributes

  • project_id: The trial (project) the state applies to. Empty for a state of the dataset itself rather than of its place in one trial.
  • datasource_name: The dataset's name.
  • kind: Which kind of state this is (a DatasetStateKind value).
  • state: The current state of that kind (e.g. a HubLinkState value).
  • state_since: When the dataset was first seen in state, ISO 8601; reset each time the state changes.
  • last_checked_at: When state was last reported or confirmed, ISO 8601.
  • tags: Arbitrary flat metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Variables​

  • static datasource_name : str
  • static kind : str
  • static last_checked_at : str
  • static model_config
  • static project_id : str
  • static state : str
  • static state_since : str

HubLinkState​

class HubLinkState(*args, **kwds):

The states of DatasetStateKind.HUB_LINK.

Attributes

  • LINKED: The Hub reports the dataset linked to the trial, or the pod was sent a link for it.
  • UNLINKED: The Hub's report of the trial's linked datasets leaves it out.

Variables​

  • static LINKED
  • static UNLINKED