sharpie.webserver.data.models
Classes
|
A complete sequence of interactions between a set of agents, and their environment—from an initial state to a terminal or truncated state—representing one coherent task of decision-making cycle. |
|
A single entry within that captures the state of the environment, an agent’s (human or artificial) actions or other outputs, the resulting outcomes or rewards, and any relevant contextual information at a specific point during a trial. |
|
The run of a single participant or group of participants through an experiment. |
- class sharpie.webserver.data.models.Session(*args, **kwargs)
The run of a single participant or group of participants through an experiment. Consists of one or more episodes.
- Parameters:
id (BigAutoField) – Primary key: ID
room (CharField) – Room
connected_participants (IntegerField) – Connected participants
start_time (DateTimeField) – Start time
end_time (DateTimeField) – End time
status (CharField) – Status
metadata (JSONField) – Metadata
Relationship fields:
- Parameters:
experiment (
ForeignKeytoExperiment) – Experiment (related name:sessions)participants (
ManyToManyFieldtoParticipant) – Participants (related name:sessions)
Reverse relationships:
- Parameters:
- experiment
Type:
ForeignKeytoExperimentExperiment (related name:
sessions)
- participants
Type:
ManyToManyFieldtoParticipantParticipants (related name:
sessions)
- room
Type:
CharFieldRoom
- connected_participants
Type:
IntegerFieldConnected participants
- start_time
Type:
DateTimeFieldStart time
- end_time
Type:
DateTimeFieldEnd time
- status
Type:
CharFieldStatus
Choices:
not_readyreadypendingrunningcompletedaborted
- metadata
Type:
JSONFieldMetadata
- validate_unique_running_session()
- exception DoesNotExist
- exception MultipleObjectsReturned
- episodes
Type: Reverse
ForeignKeyfromEpisodeAll episodes of this session (related name of
session)
- experiment_id
Internal field, use
experimentinstead.
- get_next_by_start_time(*, field=<django.db.models.DateTimeField: start_time>, is_next=True, **kwargs)
Finds next instance based on
start_time. Seeget_next_by_FOO()for more information.
- get_previous_by_start_time(*, field=<django.db.models.DateTimeField: start_time>, is_next=False, **kwargs)
Finds previous instance based on
start_time. Seeget_previous_by_FOO()for more information.
- get_status_display(*, field=<django.db.models.CharField: status>)
Shows the label of the
status. Seeget_FOO_display()for more information.
- id
Type:
BigAutoFieldPrimary key: ID
- objects = <django.db.models.Manager object>
- class sharpie.webserver.data.models.Episode(*args, **kwargs)
A complete sequence of interactions between a set of agents, and their environment—from an initial state to a terminal or truncated state—representing one coherent task of decision-making cycle.
- Parameters:
id (BigAutoField) – Primary key: ID
started_at (DateTimeField) – Started at
ended_at (DateTimeField) – Ended at
duration_steps (IntegerField) – Duration steps
completed (BooleanField) – Completed
outcome (JSONField) – Outcome
Relationship fields:
Reverse relationships:
- Parameters:
records (Reverse
ForeignKeyfromRecord) – All records of this episode (related name ofepisode)
- started_at
Type:
DateTimeFieldStarted at
- ended_at
Type:
DateTimeFieldEnded at
- duration_steps
Type:
IntegerFieldDuration steps
- completed
Type:
BooleanFieldCompleted
- outcome
Type:
JSONFieldOutcome
- exception DoesNotExist
- exception MultipleObjectsReturned
- get_next_by_started_at(*, field=<django.db.models.DateTimeField: started_at>, is_next=True, **kwargs)
Finds next instance based on
started_at. Seeget_next_by_FOO()for more information.
- get_previous_by_started_at(*, field=<django.db.models.DateTimeField: started_at>, is_next=False, **kwargs)
Finds previous instance based on
started_at. Seeget_previous_by_FOO()for more information.
- id
Type:
BigAutoFieldPrimary key: ID
- objects = <django.db.models.Manager object>
- class sharpie.webserver.data.models.Record(*args, **kwargs)
A single entry within that captures the state of the environment, an agent’s (human or artificial) actions or other outputs, the resulting outcomes or rewards, and any relevant contextual information at a specific point during a trial.
- Parameters:
id (BigAutoField) – Primary key: ID
step_index (IntegerField) – Step index
state (JSONField) – State
action (JSONField) – Action
reward (JSONField) – Reward
info (JSONField) – Info
timestamp (DateTimeField) – Timestamp
Relationship fields:
- step_index
Type:
IntegerFieldStep index
- state
Type:
JSONFieldState
- action
Type:
JSONFieldAction
- reward
Type:
JSONFieldReward
- info
Type:
JSONFieldInfo
- timestamp
Type:
DateTimeFieldTimestamp
- exception DoesNotExist
- exception MultipleObjectsReturned
- get_next_by_timestamp(*, field=<django.db.models.DateTimeField: timestamp>, is_next=True, **kwargs)
Finds next instance based on
timestamp. Seeget_next_by_FOO()for more information.
- get_previous_by_timestamp(*, field=<django.db.models.DateTimeField: timestamp>, is_next=False, **kwargs)
Finds previous instance based on
timestamp. Seeget_previous_by_FOO()for more information.
- id
Type:
BigAutoFieldPrimary key: ID
- objects = <django.db.models.Manager object>