@@ -17,14 +17,16 @@ analyses via [Docker](https://www.docker.com/).
1717
1818## Table of Contents
1919
20- - [ Repo Organization] ( #repo-organization )
21- - [ Installing Docker] ( #installing-docker )
22- - [ Running the Analyses] ( #running-the-analyses )
23- - [ Option 1: ` launch_notebooks.sh ` ] ( #option-1-launch_notebookssh )
24- - [ Option 2: Manual setup] ( #option-2-manual-setup )
25- - [ Additional info] ( #additional-info )
26- - [ Running the Experiment] ( #running-the-experiment )
27- - [ Useful docs] ( #useful-docs )
20+ - [ Text embedding models yield high-resolution insights into conceptual knowledge from short multiple-choice quizzes] ( #text-embedding-models-yield-high-resolution-insights-into-conceptual-knowledge-from-short-multiple-choice-quizzes )
21+ - [ Table of Contents] ( #table-of-contents )
22+ - [ Repo Organization] ( #repo-organization )
23+ - [ Installing Docker] ( #installing-docker )
24+ - [ Running the Analyses] ( #running-the-analyses )
25+ - [ Option 1: ` launch_notebooks.sh ` ] ( #option-1-launch_notebookssh )
26+ - [ Option 2: Manual setup] ( #option-2-manual-setup )
27+ - [ Additional information] ( #additional-information )
28+ - [ Running the Experiment] ( #running-the-experiment )
29+ - [ Useful additional documentation] ( #useful-additional-documentation )
2830
2931
3032## Repo Organization
@@ -35,7 +37,7 @@ The repository is organized as follows:
3537.
3638├── code : all analysis code used in the paper
3739│ ├─ notebooks : Jupyter notebooks for running analyses
38- │ └─── khan_helpers : Python package with helper code for analyses
40+ │ └─ khan_helpers : Python package with helper code for analyses
3941├── data : all data analyzed in the paper
4042│ ├── embeddings : 2D UMAP embeddings for knowledge maps
4143│ ├── models : trained models
@@ -91,7 +93,7 @@ The script will:
91932. Build the image from [`Dockerfile-analyses`](docker/Dockerfile-analyses), if
9294 it doesn't already exist
93953. Create and run a container from the image, if one doesn't already exist
94- 4. Launch a [Jupyter notebook](https://jupyter.org/) server inside the
96+ 4. Launch a [Jupyter notebook](https://jupyter.org/) server inside the
9597 container, if one isn't already running
96985. Open the notebook app in your default browser
97996. Attach stdout to the notebook server logs in the container
@@ -129,10 +131,10 @@ analysis environment following the steps below
129131
130132# ## Option 2: Manual setup
131133
132- 1. After [installing Docker](#installing-docker), launch the desktop app or
134+ 1. After [installing Docker](#installing-docker), launch the desktop app or
133135 start the daemon from the command line.
134- 2. _From the repository's root directory_, build the "`khan`" image from the
135- [Dockerfile-analyses](docker/Dockerfile-analyses) file in the
136+ 2. _From the repository's root directory_, build the "`khan`" image from the
137+ [Dockerfile-analyses](docker/Dockerfile-analyses) file in the
136138 [docker](docker) directory :
137139
138140 ` ` ` sh
@@ -145,17 +147,17 @@ analysis environment following the steps below
145147 docker run -it -p 8888:8888 --name Khan -v $PWD:/mnt khan
146148 ` ` `
147149
148- The command above binds port 8888 in the continer to port 8888 on the host so
149- we can access the Jupyter notebook server from a web browser, and bind-mounts
150- the repository to the container's `/mnt` directory so we can read and write
150+ The command above binds port 8888 in the continer to port 8888 on the host so
151+ we can access the Jupyter notebook server from a web browser, and bind-mounts
152+ the repository to the container's `/mnt` directory so we can read and write
151153 files from inside it.
152154
153- 4. The notebook server will launch automatically when the container is run. Copy
154- and paste the 3rd link that appears (the one starting with
155+ 4. The notebook server will launch automatically when the container is run. Copy
156+ and paste the 3rd link that appears (the one starting with
155157 ` http://127.0.0.1:8888` ) into a web browser to access the notebook app.
156158
157- 5. You can then open any notebook in [`code/notebooks/`](code/notebooks) and
158- run the code inside it. When finished, return to the terminal and press
159+ 5. You can then open any notebook in [`code/notebooks/`](code/notebooks) and
160+ run the code inside it. When finished, return to the terminal and press
159161 **Control+c** to stop the notebook server and exit the container.
160162
1611636. To launch the container and notebooks any time after this initial setup, run :
@@ -167,38 +169,38 @@ analysis environment following the steps below
167169
168170# ## Additional information
169171
170- - You can launch an interactive `bash` shell inside the container to explore or
171- modify its contents with `docker exec -it Khan bash`. To exit the container,
172+ - You can launch an interactive `bash` shell inside the container to explore or
173+ modify its contents with `docker exec -it Khan bash`. To exit the container,
172174 either press **Control+d** or type `exit`. **Note** that :
173- - if the container isn't already running, you must start it first with
175+ - if the container isn't already running, you must start it first with
174176 ` docker start Khan`
175- - When you enter the container this way (rather than with `docker attach` or
176- the [`launch_notebooks.sh`](launch_notebooks.sh) script), the container
177- isn't automatically stopped when you exit it. To stop the container after
177+ - When you enter the container this way (rather than with `docker attach` or
178+ the [`launch_notebooks.sh`](launch_notebooks.sh) script), the container
179+ isn't automatically stopped when you exit it. To stop the container after
178180 exiting, use `docker stop Khan`
179- - You can get the URL of the running notebook server from inside the container
181+ - You can get the URL of the running notebook server from inside the container
180182 with `jupyter notebook list`
181- - The container pre-installs some nifty
182- [extensions](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/index.html)
183- for customizing the Jupyter Notebook interface. If you want to enable any of
183+ - The container pre-installs some nifty
184+ [extensions](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/index.html)
185+ for customizing the Jupyter Notebook interface. If you want to enable any of
184186 them :
185187 - Open the notebook application in a browser and click on the "**Nbextensions**" tab. (To
186188 launch the notebook application, start the notebook server as described above and visit
187189 the server's address in your web browser.)
188- - Uncheck the "_disable configuration for nbextensions without explicit
189- compatibility ..._" box (nearly all of them _are_ compatible, we're just
190+ - Uncheck the "_disable configuration for nbextensions without explicit
191+ compatibility ..._" box (nearly all of them _are_ compatible, we're just
190192 using a newer version of Jupyter notebooks).
191- - Click on any of the listed extensions to see a description and further
193+ - Click on any of the listed extensions to see a description and further
192194 options, and check the box next to its name to enable it.
193195 - Refresh any running notebooks for changes to take effect.
194196
195197
196198# # Running the Experiment
197199
198- 1. After [installing Docker](#installing-docker), launch the desktop app or
200+ 1. After [installing Docker](#installing-docker), launch the desktop app or
199201 start the daemon from the command line.
200- 2. _From the repository's root directory_, build the "`khan-exp`" image from the
201- [Dockerfile-experiment](docker/Dockerfile-experiment) file in the
202+ 2. _From the repository's root directory_, build the "`khan-exp`" image from the
203+ [Dockerfile-experiment](docker/Dockerfile-experiment) file in the
202204 [docker](docker) directory :
203205
204206 ` ` ` sh
@@ -211,26 +213,26 @@ analysis environment following the steps below
211213 docker run -it -p 22363:22363 -v "$PWD/exp:/exp" --name Khan-exp khan-exp
212214 ` ` `
213215
214- The command above bind-mounts the container to the repository's [`exp/`](exp)
215- directory so the psiTurk server can read and run the experiment code, and
216- binds port 22363 between the container and host so the server can be accessed
216+ The command above bind-mounts the container to the repository's [`exp/`](exp)
217+ directory so the psiTurk server can read and run the experiment code, and
218+ binds port 22363 between the container and host so the server can be accessed
217219 from a web browser.
218220
219- **Note**: the port published by the container must match the port listed in
221+ **Note**: the port published by the container must match the port listed in
220222 [`exp/config.txt`](exp/config.txt).
221223
222- 4. Your shell prompt (`$PS1`) should now start with `root@`, indicating that
223- you're now running a `bash` shell from _inside_ the container. To start the
224+ 4. Your shell prompt (`$PS1`) should now start with `root@`, indicating that
225+ you're now running a `bash` shell from _inside_ the container. To start the
224226 psiTurk experiment server, run :
225227
226228 ` ` ` sh
227229 psiturk server on
228230 ` ` `
229231
230- When you see "_`Now serving on http://0.0.0.0:22363`_," the experiment server
231- is ready. Starting the server for the first time will also create
232- ` exp/server.log` , a logfile for the experiment server, and
233- ` exp/efficient-learning-khan.db` , a SQLite database to hold raw experiment
232+ When you see "_`Now serving on http://0.0.0.0:22363`_," the experiment server
233+ is ready. Starting the server for the first time will also create
234+ ` exp/server.log` , a logfile for the experiment server, and
235+ ` exp/efficient-learning-khan.db` , a SQLite database to hold raw experiment
234236 data.
235237
2362385. Generate a link to the experiment in "debug mode" :
@@ -239,18 +241,18 @@ analysis environment following the steps below
239241 psiturk debug -p
240242 ` ` `
241243
242- This will output a URL in the format
243- ` http://0.0.0.0:22363/ad?assignmentId=debug<XXXXXX>&hitId=debug<YYYYYY>&workerId=debug<ZZZZZZ>&mode=debug` ,
244- where `<XXXXXX>` and `<ZZZZZZ>` will form a unique identifier for the run
245- (i.e., a participant's unique ID). In debug mode, the experiment will behave
246- normally and data will still be saved properly, but psiTurk will not try to
247- connect to [Amazon Mechanical Turk](https://www.mturk.com/)'s servers. This
248- is useful because it enables the experiment to be run locally without the
244+ This will output a URL in the format
245+ ` http://0.0.0.0:22363/ad?assignmentId=debug<XXXXXX>&hitId=debug<YYYYYY>&workerId=debug<ZZZZZZ>&mode=debug` ,
246+ where `<XXXXXX>` and `<ZZZZZZ>` will form a unique identifier for the run
247+ (i.e., a participant's unique ID). In debug mode, the experiment will behave
248+ normally and data will still be saved properly, but psiTurk will not try to
249+ connect to [Amazon Mechanical Turk](https://www.mturk.com/)'s servers. This
250+ is useful because it enables the experiment to be run locally without the
249251 user having to create AWS & MTurk accounts, supply access keys, etc.
250252
251- 6. Copy and paste the URL into a web browser, and follow the on-screen
252- instructions to progress through the experiment. **Note** : the experiment
253- will not work in Google Chrome. Recommended browsers include Safari and
253+ 6. Copy and paste the URL into a web browser, and follow the on-screen
254+ instructions to progress through the experiment. **Note** : the experiment
255+ will not work in Google Chrome. Recommended browsers include Safari and
254256 Firefox.
255257
2562587. When finished, return to the terminal and shut down the experiment server :
0 commit comments