Skip to content

autora.experiment_runner.firebase_prolific.firebase_runner ignores time_out arg #707

@LJKS

Description

@LJKS

%%%%%Description%%%%%:

The firebase_runner implements a time_out arg in documentation and comments in the code-base, but does not actually use this arg. This results in misleading behaviour for users, and causes issues with users dropping ongoing experiments.

The firebase_runner has the following kwargs (documentation copied from implementation @firebase_prolific/init.py):

firebase_credentials: a dict with firebase service account credentials
time_out: time out to reset a condition that was started but not finished
sleep_time: the time between checks and updates of the firebase database

The call is forwarded to _firebase_run (@firebase_prolific/init.py, line 21). This in turn forwards the time_out arg to autora.experiment_runner.experimentation_manager.firebase.check_firebase_status.

This in turn accepts time_out in its args (as an Optional)

        collection_name: name of the collection as given in firebase
        firebase_credentials: credentials for firebase
        time_out: time out for participants that started the condition
            but didn't finish (after this time spots are freed)
        pids_aborted: a list of personal ids that aborted the experiment (free the places)

The arg is subsequently completely ignored in the respective function implementation though.

%%%%%Build information%%%%%

[autora packages only, all packages are on the latest version available on pypl]
autora-core 5.0.3
autora-experiment-runner-experimentation-manager-firebase 1.1.5
autora-experiment-runner-firebase-prolific 1.0.1
autora-experiment-runner-recruitment-manager-prolific 1.0.1

%%%%%Proposed fix%%%%%
Solving this issue should be as simple as adjusting line 371 (in check_firebase_status):
from:
if is_aborted:
to:
if is_aborted or (time_out is not None and time_from_started > time_out):

Confidence in this fix is low, as I have little to no experience with firebase myself. The fix is implemented in my current experiment, I will try and update here regarding its success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions