ParallelSpec#

class alfred3_interact.spec.ParallelSpec(*roles, nslots: int, name: str, respect_version: bool = True, inclusive: bool = False, count: bool = True, shuffle_waiting_members: bool = True)[source]#

Bases: Spec

Interface for defining a parallel group.

A parallel group is a group in which participants complete the experiments in parallel, i.e. they are all active simultaneously and can interact in real-time.

Parameters
  • *roles (str) – A variable number of strings, indicating which roles will be appointed to members of the group. The number of roles determines the number of group members. All roles in a group must be unique. Roles cannot start with numbers or contain spaces.

  • nslots (int) – Maximum number of groups that should be created based on this spec.

  • name (str) – A unique identifier for the spec.

  • respect_version (bool) – If True, the matchmaking will only include sessions that run on the same experiment version. This setting makes sure that there’s no strange behavior if you make changes to an ongoing experiment. Defaults to True.

  • inclusive (bool) – If False (default), the quota will only assign a slot, if there are no pending sessions for that slot. See SequentialGroupQuota / ParallelGroupQuota for more details.

  • shuffle_waiting_members (bool) – If True, the list of waiting members will be shuffled before starting a new group. If False, members who have been waiting longest are prioritized.

See also

See SequentialSpec for an interface for defining a sequential group and IndividualSpec for defining an individual session spec.

Methods

full

Attributes

group_type

pattern

quota

Access to the spec's SequentialGroupQuota, or ParallelGroupQuota, depending on the type of spec.