This repository contains a modified version of the code used to produce the results of the paper "Differentiable user models". The original version is located here. In this version (which was not used in the original paper), the synthetic user data is generated and saved to an hdf5 file, but the data are not used to train a model. The main advantage of this repo is that a CUDA-enabled GPU is not required to generate the data.
Users are expected to have some basic Julia knowledge. This environment has been built on Mac Silicon using Julia 1.6.7 but has also been run on the University of Manchester CSF HPC system on Julia 1.9.1 (see below) This is a general workflow for getting the environment set up:
- Navigate to directory.
- (Optional) If you are not using Julia 1.6.x on a Mac, remove the Manifest.toml file.
- Open the Julia REPL.
- Open Julia and open the package manager using
]. - Activate the current directory using
activate .(note that you need the dot). This tells Julia to use the environment in the current directory. - Instantiate the environment using
instantiate. - Build the environment using
build. - Precompile the environment using
precompile.
Instructions for running on University of Manchester CSF HPC system:
- Navigate to the
csf/folder. - Copy jobscripts and .toml files using
cp * .. - Navigate back to main folder with
cd ..and run job scripts.
It is likely that somewhere in the steps above, there will be errors with one or more packages, as some packages need different versions on different systems. Most issues can be solved with the following steps:
- Look at the log files and identify the problem packages.
- In the Julia REPL package manager, remove problem package using
rm [packagename]. - Re-add the problem package using
add [packagename. - Try build and precompile steps above
- If you have any more errors, you could try remove the
Manifest.tomlfile and start again. - You could try remove the package and see if it runs without it
- Make sure
Distributionsis v0.24.18 as it seems to want to update itself to the latest version (which doesn't work)
Once the Julia environment has been set up, the scripts can be run for example using
julia experiment2_datagen.jl
The environment will be loaded within the file.
Data will then be saved in the /data/ folder for the relevant experiment.
filename.hdf
├── metadata
│ ├── gen_type = SearchEnvSampler / menu_search
│ ├── n_users = 19200
│ ├── eval = false
│ ├── n_traj = random(1-8)
│ ├── noise_variance => 1e-8,
│ ├── p_bias = 0.0
└── data
├── user_1
│ ├── xc = d[1]
│ ├── yc = d[1]
│ ├── xt = d[1]
│ ├── yt = d[1]
├── user_2
│ ├── xc = d[1]
│ ├── yc = d[1]
│ ├── xt = d[1]
│ ├── yt = d[1]
└── ...
By default, the data are pre-batched into batches of 4 users, with 1-8 trajectories randomly generated on a per-batch basis, for all users within a batch.