experiment order applies for all batteries
jonathanicholas opened this issue · comments
When you specify an order for an experiment within your battery it saves this order to other batteries as well
cool, thanks for reporting this! I will investigate first thing tomorrow.
Could you give an example of this? I'm having trouble seeing how it happens, programatically. The order function is called specific to a battery and experiment (also unique to a battery):
experiment = get_experiment(eid,request)
battery = get_battery(bid,request)
then we check for a post, get the order from the post...
new_order = request.POST["order"]
and set it
experiment.order = int(new_order)
experiment.save()
return HttpResponseRedirect(battery.get_absolute_url())
Any examples or further insight would be helpful for debugging!
Ok, just found the issue. Back before we had order variables, it didn't make sense to store an experiment instance twice with identical credit and performance criteria. So I used get_or_create with unique id as the template, and those variables:
experiment,_ = Experiment.objects.get_or_create(template=template,
include_bonus=include_bonus,
include_catch=include_catch)
This unfortunately means that when you created the batteries with those two experiments, they are actually using the same experiment instance. To fix, you would need to delete and re-add one of the experiments, however this would also delete associated results. If you can download the data and this is ok, go for it. If not, you can create a new battery. But wait until I close this issue - I haven't fixed the bug yet :)
ok, give this a test - I just fixed the issue so if you create a battery with the same experiment, the exp_id should be different (a new instance).
The same problem still persists. I tried it on bucket game
On Tue, May 24, 2016 at 5:15 PM, Vanessa Sochat notifications@github.com
wrote:
ok, give this a test - I just fixed the issue so if you create a battery
with the same experiment, the exp_id should be different (a new instance).—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#150 (comment)
You would need to create an entirely new experiment object for whichever battery you choose - I can't fix the ids of those already created. It might help to use a fresh battery as well.
In that case, confirmed working!
On Tue, May 24, 2016 at 5:31 PM, Vanessa Sochat notifications@github.com
wrote:
You would need to create an entirely new experiment object for whichever
battery you choose - I can't fix the ids of those already created. It might
help to use a fresh battery as well.—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#150 (comment)