Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE] Allow task skipping using run-time variables #111

Open
earcanal opened this issue Aug 1, 2018 · 12 comments
Open

[RFE] Allow task skipping using run-time variables #111

earcanal opened this issue Aug 1, 2018 · 12 comments

Comments

@earcanal
Copy link
Contributor

earcanal commented Aug 1, 2018

RFE

There are two common use cases where it would be convenient to be able to skip tasks at run-time. Here are proposed snippets from a variables file for each case:

Conditional execution

As an researcher running an online experiment, I would like to configure which tasks a participant sees at run-time.

experimental-task,skip,1,control-participant-token
control-task,skip,1,experimental-participant-token

Testing

As a developer, I would like to skip (long) tasks during testing.

long-task,skip,1,*
other-long-task,skip,1,*

Implementation

I currently implement this at the experiment level, but it seems such a useful feature that it would be better to implement within expfactory.

@vsoch
Copy link
Member

vsoch commented Aug 1, 2018

Is it not substantial enough to skip tasks by not selecting them with the start command? Could you better explain your use cases?

@earcanal
Copy link
Contributor Author

earcanal commented Aug 1, 2018

If you want a single container/URL containing all tasks for (all conditions within) a study then you have to include them all when you start the container.

@vsoch
Copy link
Member

vsoch commented Aug 1, 2018

That's the behavior that should be encouraged, so the entire thing can be done once, and then reproducibly done again.

@earcanal
Copy link
Contributor Author

earcanal commented Aug 1, 2018

So that's why you need to be able to skip tasks using variables.

@vsoch
Copy link
Member

vsoch commented Aug 1, 2018

Sorry I don't follow. There are two things here:

  • selection of tasks, globally, when you start a container can be done with the --experiments flag. Experiments that aren't included are essentially missing from the container, and variables for them in any file would be ignored.
  • subject specific variables to control within logic of experiments can be added to the variables file. If needed, you would generate tokens in advance for your subjects as part of a planned design.

If you have a task that you want to skip for a participant, then in the task you would have a variable that is passed from the file for a particular token, and changes the behavior of finishing the experiment. Maybe that just means submitting an "empty" data record to record this, it's up to you, but the logic is handled cleanly.

If you can help me to better understand the issue first we can put our heads better together.

@earcanal
Copy link
Contributor Author

earcanal commented Aug 1, 2018

Your second bullet ff. is how I do things currently. I've updated the RFE to make it clearer I'm suggesting server side implementation. Making this a "core" feature would avoid having to add "skipping code" to every experiment. I'm guessing that skipping surveys client-side has the further problem of needing a way to preserve the skipping code whenever you regenerate the survey (e.g. adding items, tweaking instructions).

I haven't looked at the code which steps through each task, but I thought it might be relatively easy to build a "skip list" from tasks with a variable skip==1 and skip the task if it matches the token (or *).

@vsoch
Copy link
Member

vsoch commented Aug 1, 2018

Hmm, so basically you want a custom list of experiments, on the level of the user / token?

@earcanal
Copy link
Contributor Author

earcanal commented Aug 1, 2018

Yes please :)

@vsoch
Copy link
Member

vsoch commented Aug 1, 2018

I can test this with the finish-url PR, but probably not soon.

@earcanal
Copy link
Contributor Author

earcanal commented Aug 1, 2018

Not urgent. Enjoy travel!

@vsoch
Copy link
Member

vsoch commented Aug 1, 2018

I hope there is sarcasm there. This week has been pure misery.

@earcanal
Copy link
Contributor Author

earcanal commented Aug 1, 2018

Sorry to hear that. I meant don't work too hard!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants