fredcallaway / heroku-experiment Goto Github PK
View Code? Open in Web Editor NEWStarter kit for running a psiturk experiment on heroku with jspsych.
Home Page: http://salty-meadow-30207.herokuapp.com/
License: MIT License
Starter kit for running a psiturk experiment on heroku with jspsych.
Home Page: http://salty-meadow-30207.herokuapp.com/
License: MIT License
Can we build an experiment using JsPsych that functions using Psiturk and Heroku with a similar structure?
Context
PsiTurk Version: 3.3.1
Hosting Platform: Heroku
Experiment Repository: fredcallaway/heroku-experiment
Problem Description
The experiment runs perfectly fine, and participants can complete and submit the experiment. However, the data is not being saved in the local participant.db file. Consequently, when attempting to approve workers, I receive the following error:
Response(Operation: approve_assignment_by_assignment_id | Status: error | Exception: AssignmentIdNotFoundInLocalDBError: )
Steps to Reproduce
Observed Behavior
Expected Behavior
Any help or suggestions on resolving this issue would be greatly appreciated. Thank you!
Our configuration currently has threads=1
. Given my experiences running the server on Heroku I think we should probably set this to auto
. Below is a plot of Dyno Load (see definitions for metrics in plot here. load is defined as "The load value indicates a runnable task (a process or thread) that is either currently running on a CPU or is waiting for a CPU to run on, but otherwise has all the resources it needs to run. The load value does not include tasks that are waiting on IO.")
On the left, you can see traffic as a result of a small pilot (4 participants) on a Hobby core. On the right, you can see traffic as a result of a larger pilot (160 participants) on 5:Standard-2x, and later 9:Standard-1x cores. Since the 1M load max never exceeds 50% (and in many cases doesn't exceed 33%), I think it's worth increasing the number of threads somewhat substantially to make better use of compute resources. Since threads=auto
sets workers to 2 * # CPUS + 1
(code here), this makes it a natural choice for the single and dual core case (which would result in 3 and 5 threads respectively).
Essential feature request: Emulate TurkPrime's (now "Cloud Research") HyperBatch feature to avoid accruing an extra 20% MTurk fee for having more than 9 subjects / HIT. I've used TurkPrime quite a bit. The feature is tried-and-true, but there's a fee for it (smaller than the 20% amazon fee but still worth avoiding).
See:
https://gist.github.com/deargle/f454a156d3a72adf62869e2ef09101d8
https://github.com/ddbourgin/mturk_utils
Psiturk docs state that the psiturk.js static file is actually generated, not read from the filesystem:
Q: Where is the /static/js/psiturk.js file? It doesn't appear in any of the experiments I have downloaded!
A: psiturk.js doesn’t actually “exists” as a file in the static folder of any project. Instead, the psiturk server/command line tool automatically generates this file. The best way to view it is by “view source” in your browser while debugging your experiment. While somewhat unintuitive, this ensures that changes to psiturk.js are linked to new versions of the overall psiturk command line tool (since they are tightly interdependent).
May be worth considering how to write to endhit
and status
from Prolific, since those variables are part of the logic for counterbalancing. Code here.
This would address a common pain point where people don't see the data when they just visit /exp
(From Jonathan)
I’m getting a bizarre error when I go to fetch the data from my experiment (running bin/fetch_data.py version; this has been working completely fine until now).
psycopg2.OperationalError: connection to server at "ec2-44-215-1-253.compute-1.amazonaws.com" (44.215.1.253), port 5432 failed: FATAL: password authentication failed for user "pecjzmgvmcffme"
connection to server at "ec2-44-215-1-253.compute-1.amazonaws.com" (44.215.1.253), port 5432 failed: FATAL: no pg_hba.conf entry for host "84.33.153.8", user "pecjzmgvmcffme", database "d1gh6l0jffv33e", no encryption
The complicated startup solution that I wrote last year should actually be superseded by psiTurk's builtin support for Heroku. I think the only change we'd need to add to the README is heroku config:set ON_CLOUD=1
(though b/c we use an older psiTurk version, it may require ON_HEROKU
), though I'd want to read the docs and read the script more closely to ensure that's the case. We wouldn't want to directly run those things since they create new files (like Procfile and requirements).
should update!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.