Forum Replies Created
-
AuthorPosts
-
Jeremy
KeymasterHi Nasim,
When you use
and
on atest
command, itssuccess
andfailure
will be executed in response to the conjunction, not to the main test aloneOne workaround is to embed each test inside a higher-up conjunction, eg:
.wait( newFunction( ()=>true ).test.is(true) .and( getScale("scale1").test.selected().failure( newText("required1").css({position:"relative",bottom:"270px"}).bold().color("red").print() ) ) .and( getScale("scale2").test.selected().failure( newText("required2").css({position:"relative",bottom:"270px"}).bold().color("red").print() ) ) )
Jeremy
November 11, 2022 at 2:14 pm in reply to: Randomizing trials, with 1/5 of trials followed by a comprehension question #9708Jeremy
KeymasterHi,
1+3) You’ll need to split
row.context
at each<br>
so you get a list of each line separately, so you can print one line on the page then use a Key element to wait for a keypress, then print the next line, wait for a keypress again, etc. If you want an alignment like you describe, you’ll need to use atable
HTML element, which is not directly implemented as a PennController element, so you’ll need to use javascript to inject it in the page:newKey("next", " ") , newText("context", "
").print() , ...row.context.split("
").map( line => [ newFunction(()=>{ const tableRow = document.createElement("tr"); const speaker = document.createElement("td"); const speech = document.createElement("td"); speaker.innerText = line.replace(/^([^:]+:).+$/,"$1").replace(/\n/gi,''); speech.innerText = line.replace(/^[^:]+:/,"").replace(/\n/gi,''); tableRow.append(speaker); tableRow.append(speech); document.querySelector("#context").append(tableRow); }).call() , getKey("next").wait() ] ).flat()2) You can add custom CSS to control visual rendering. In the case of the piece of code above, I’d suggest you target the table with something like this in global_z.css:
table#context tr { padding-bottom: 0.5em; } table#context tr td { padding-right: 0.5em; }
Jeremy
November 10, 2022 at 12:07 pm in reply to: getting variable from csv, based on a text in a column #9705Jeremy
KeymasterHi Anna,
I know we’ve already addressed these points by email, but I’ll post answers here too in case someone finds this post and wants answers
1. It’s actually better to reserve Var elements for values that will only get set upon runtime. Column values are all preset (since they come directly from a pre-existing table) so using the javascript ternary conditional operator is to be preferred:
newText("top", row.TOP).color(row.Coloring_code=="TOO" ? "blue" : "black"), newText("left", row.LEFT).color(row.Coloring_code=="OLO" ? "blue" : "black"), newText("right", row.RIGHT).color(row.Coloring_code=="OOR" ? "blue" : "black"),
2. Including
SetCounter("counter", "inc", 1);
in your experiment will increase the counter earlier than by default, but the new value concerns the next participant: the current run will keep the same counter value that was assigned when the page was open. However, nothing guarantees that the next participant will indeed complete the experiment, and so you still risk ending up with unbalanced group assignments in your results. At the end of the day, there’s no way to *automatically* ensure you’ll have a balanced distribution, which is why the recommended method is to recruit participants using the server.py?withsquare=N method described int the tutorial, so you can easily manually control group assignmentJeremy
Jeremy
KeymasterAll you need is to make sure you have the exact same possible values across the two tables. If you replace all the 1-digit group values from both tables with numbers starting with
5
then you could achieve that, as long as you don’t introduce another space character in front of5
in one of the two tablesThe other solution would be to open the study table in a text editor (for example, the editor on the farm) and delete the space character in front of all the 1-digit group values
Jeremy
Jeremy
KeymasterHi Mandy,
Apparently the way I wrote the
success
andfailure
commands, they don’t accept arrays of commands; instead, they require a comma-separated list of commands. Just add...
before( row.QuestYN =="Y" ? [
to tell the script to coerce the arrays into a comma-separated list, like this:...( row.QuestYN =="Y" ? [
Jeremy
Jeremy
KeymasterHi Yev,
Your two tables to have 16 groups each, but only 7 groups are shared by the two tables (
10
,11
,12
,13
,14
,15
,16
). The other 9 groups are different:1
(study) vs1
(test),2
(study) vs2
(test), etc.Because
group
for example in the study table is2
, but10
in the test table (because1
comes before2
and0
comes before1
). So any participant running with a counter value of 2 (or modulo 2) will be assigned group2
from the study table, and group10
from the test tableJeremy
Jeremy
KeymasterHi Casey,
There shouldn’t be any need to pause data collection: as I said, incoming results are stored in memory until the operation completes. And as a matter of fact, that operation has just completed as I started typing this message anyway. That being said, I see a few results-saving tasks in the “retry set” of the database, so let me know if there are submissions you were expecting today that you don’t see appear in the next couple hours
Other than that, you should now be able to access your results normally (I, for one, was just able to download a results file of 9k+ lines within a few seconds). Let me know if the issue persists or reoccurs
Thank you,
JeremyJeremy
KeymasterHi everyone,
Thank you for letting me know about this, and sorry for the inconvenience. Despite yesterday’s maintenance operation, the issue with accessing the results file persists because of the very important number of rows stored in the database. The fact that many people tried to access their results file in parallel after today’s announcement only made matters worse, unfortunately
I am working on it, but be aware that will not be able to get the number of submissions (or the rows themselves) for some time, since I started an operation that blocks access to the rows of the database. For the same reason, incoming results will not immediately be added to the database, but they will be kept in memory to be added once the operation completes
Thank you for your understanding,
JeremyJeremy
KeymasterThe mailing list consists of all the (non-manually unsubscribed) email addresses associated with an account on the farm. Double-check your email address in your profile under “Request change of email address” > “New email address”; if it’s incorrect, enter your current password in “Confirm your password” and your new email address in the appropriate field, and click “Send request” under that field
Jeremy
Jeremy
KeymasterHi,
Amazon offers an “AWS Free Tier” plan which gives you free access to S3 and Lambda for 12 months. The PCIbex documentation has a page that describes how to send recordings to S3
However, as you’ve probably noticed, the farm is suffering serious problems these days, so it’s unfortunately not the best time to set up a project on it
Jeremy
Jeremy
KeymasterHello,
The farm has been undergoing severe slowdowns for the past few days that cause many requests to fail. In case you haven’t received the general announcement that was sent to the mailing list, I am copying it below
Apologies for the inconvenience,
JeremyDear PCIbex Farm Users,
As many of you will already have noticed, the farm is unfortunately continuing to experience massive slow-downs or be inaccessible. We are still investigating the cause of this, and hope to have an update soon. For the moment, we recommend pausing data collection and results retrieval. Rest assured that there is no reason to worry about projects or data you have on there, the current issues are just a matter of access, so there’s no risk of data loss.
While we will try to get things back up and running ASAP, this may take a few days. We appreciate your patience and understanding!
Best,
Florian & JeremyJeremy
KeymasterHello,
The problem comes from empty file greetings.csv, which causes the experiment’s loading step to crash. Fill the file and the experiment works again
Jeremy
Jeremy
KeymasterHi,
I have just restarted the servers, so the situation should be better for now. You can try to download your results again, and if it keeps hanging for more than 3 minutes, you should just refresh the page and try again. Unfortunately I haven’t identified or addressed the core of the problem yet, so the problem will likely surface again soon, in which case downloading the results will stall at times when the farm is overloaded with requests
Apologies for the inconvenience,
JeremyNovember 2, 2022 at 12:10 pm in reply to: code doesn't get updated despite the 'saved' message #9670Jeremy
KeymasterHi Yev,
I just restarted the servers, so the situation should be better now. I am still working on identifying and addressing the core problem though, so expect instability in the next few days
Apologies for the inconvenience,
JeremyJeremy
KeymasterHi Nianpo,
So, your
Sequence
line isSequence( randomize(startsWith("Long") , randomize(startsWith("Short") )))
, which corresponds to what I originally included in my post; what you included in your post,Sequence( rshuffle(startsWith("Short") , rshuffle(startsWith("Long") )))
does include “Short” trialsThere is a typo in the former, which I since corrected by editing my post, where the closing parenthesis of the first
randomize
only comes after the secondrandomize
, effectively ignoring that one and thus just including the randomized “Long” trials. The line you want to use isSequence( randomize(startsWith("Long")) , randomize(startsWith("Short")) )
Jeremy
-
AuthorPosts