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

[Feature request] Allow multiple instances of the same task #71

Open
earcanal opened this issue Feb 25, 2018 · 9 comments
Open

[Feature request] Allow multiple instances of the same task #71

earcanal opened this issue Feb 25, 2018 · 9 comments

Comments

@earcanal
Copy link
Contributor

Version of Experiment Factory:

All

Expected behavior

As a researcher, I frequently want to run the same task multiple times during a study (e.g. pre/post treatment).

As a developer, I would like to be able to build switches into my experiment which can be toggled at run-time. For example, I duplicated the ANT task twice, simply because I want one version without the feedback box at the end, and another without a practice block or the feedback box. I would like to merge these back into the library repo as options that I can configure at run-time (perhaps via the initial experiment UI?).

Actual behavior

In the current implementation, this requires duplicating the task under a different name so that you can build both into the container. Aside from being a hack, this approach also duplicates code (recipe for disaster).

@vsoch
Copy link
Member

vsoch commented Feb 25, 2018

The variables issue is a repeat of #58. Duplicating code I don't see as a major issue, after all an experiment is just a few tiny files compared to the entire container. If you were to need to duplicate an experiment, given that you have the variables and could specify a different name, this would be possible. This is the approach that I think is reasonable.

@earcanal
Copy link
Contributor Author

OK. Wrt duplication, when you find a bug in experiment.js don't you have to patch n repos? Maybe branches are a compromise? That way you could branch with a different name allowing multiple instances, whilst stil allowing cherry-picking bug fixes from master?

@vsoch
Copy link
Member

vsoch commented Feb 25, 2018

It would be the same experiment, named something different so you have a different folder.

@earcanal
Copy link
Contributor Author

earcanal commented Jul 31, 2018

Revisiting this. I now have an ANT which can enable/disable features using variables. Do I still need to duplicate a repo under a different name to build it into a container more than once? It looked like it might be possible using a single repo e.g.

LABEL EXPERIMENT_ant1 /scif/apps/attention-network-task
WORKDIR /scif/apps
RUN expfactory install https://github.com/earcanal/attention-network-task

LABEL EXPERIMENT_ant2 /scif/apps/attention-network-task
WORKDIR /scif/apps
RUN expfactory install https://github.com/earcanal/attention-network-task

However, that creates a single folder /scif/apps/attention-network-task and docker run ... --headless --no-randomize --experiments ant1,ant2,... doesn't run either ant1 or ant2.

@vsoch
Copy link
Member

vsoch commented Jul 31, 2018

I think you would also need to change the uid in the config.json too :)

@earcanal
Copy link
Contributor Author

I'm not sure I understand. Does that mean it's not possible without copies of the repo?

@vsoch
Copy link
Member

vsoch commented Jul 31, 2018

Correct, you would have two folders and rename the config.json his to match the folder name. This probably seems annoying, but what I'm trying to do is to prevent (or make it hard) to do some kind of non reproducible practice.

@earcanal
Copy link
Contributor Author

earcanal commented Aug 1, 2018

Ah, so you don't need to have multiple versions of the repo; just follow instructions for Local Experiment Selection for each instance of the same task, tweaking folder name and config.json? I'll try this now and submit a PR to the docs for this use case if it works for me.

@earcanal
Copy link
Contributor Author

earcanal commented Aug 1, 2018

#110

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