SessionQuota.count()#
- SessionQuota.count(raise_exception: bool = False) str [source]#
Counts the experiment session associated with the quota.
- Parameters
raise_exception (bool) – If True, the function raises the
AllSlotsFull
exception instead of automatically aborting the experiment if all slots are full. This allows you to catch the exception and customize the experiment’s behavior in this case.- Returns
The slot label.
- Return type
- Raises
AllSlotsFull – If raise_exception is True and
all slots are full. –
SlotInconsistency – If slot validation fails.
Examples
A simple example on how to use the quota:
import alfred3 as al exp = al.Experiment() @exp.setup def setup(exp): quota = al.SessionQuota(10, exp) quota.count() exp += al.Page(title = "Hello, World!", name="hello_world")