Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ jobs:
CIBW_ARCHS_WINDOWS: auto64
CIBW_BUILD_FRONTEND: build

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
Expand All @@ -44,7 +45,7 @@ jobs:
- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz

Expand All @@ -55,7 +56,7 @@ jobs:
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
Expand All @@ -78,7 +79,7 @@ jobs:
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
Expand Down
4 changes: 3 additions & 1 deletion docs/basic_tutorial/basic_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@
"from ssms.basic_simulators.simulator import simulator\n",
"\n",
"sim_out = simulator(\n",
" model=\"ddm\", theta={\"v\": 0, \"a\": 1, \"z\": 0.5, \"t\": 0.5}, n_samples=1000,\n",
" model=\"ddm\",\n",
" theta={\"v\": 0, \"a\": 1, \"z\": 0.5, \"t\": 0.5},\n",
" n_samples=1000,\n",
")"
]
},
Expand Down
468 changes: 466 additions & 2 deletions notebooks/basic_tutorial copy.ipynb

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions notebooks/basic_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@
}
],
"source": [
"type(model_config['param_bounds'])"
"type(model_config[\"param_bounds\"])"
]
},
{
Expand Down Expand Up @@ -1427,7 +1427,9 @@
}
],
"source": [
"training_data['thetas'][:, model_config[\"params\"].index(\"st\")] < training_data['thetas'][:, model_config[\"params\"].index(\"t\")]"
"training_data[\"thetas\"][:, model_config[\"params\"].index(\"st\")] < training_data[\n",
" \"thetas\"\n",
"][:, model_config[\"params\"].index(\"t\")]"
]
},
{
Expand Down Expand Up @@ -1464,11 +1466,13 @@
"metadata": {},
"outputs": [],
"source": [
"my_dict = {'v': np.array([-1.022687], dtype=np.float32), \n",
"\t\t 't': np.array([1.2465975], dtype=np.float32), \n",
"\t\t 'a': np.array([1.472519], dtype=np.float32), \n",
"\t\t 'z': np.array([0.2667516], dtype=np.float32),\n",
"\t\t'deadline': np.array([2.0713003], dtype=np.float32)}"
"my_dict = {\n",
" \"v\": np.array([-1.022687], dtype=np.float32),\n",
" \"t\": np.array([1.2465975], dtype=np.float32),\n",
" \"a\": np.array([1.472519], dtype=np.float32),\n",
" \"z\": np.array([0.2667516], dtype=np.float32),\n",
" \"deadline\": np.array([2.0713003], dtype=np.float32),\n",
"}"
]
},
{
Expand All @@ -1489,7 +1493,7 @@
],
"source": [
"names = [key_ for key_ in my_dict.keys()]\n",
"np.tile(np.stack([my_dict[key_] for key_ in names], axis = 1), (200, 1)).shape"
"np.tile(np.stack([my_dict[key_] for key_ in names], axis=1), (200, 1)).shape"
]
},
{
Expand Down
7 changes: 5 additions & 2 deletions notebooks/basic_tutorial_12122024.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@
],
"source": [
"from matplotlib import pyplot as plt\n",
"plt.hist(sim_out[\"rts\"] * sim_out['choices'], histtype = 'step', bins = 40, label='sim_out')\n",
"plt.hist(sim_out2[\"rts\"] * sim_out2['choices'], histtype = 'step', bins = 40, label='sim_out2')\n",
"\n",
"plt.hist(sim_out[\"rts\"] * sim_out[\"choices\"], histtype=\"step\", bins=40, label=\"sim_out\")\n",
"plt.hist(\n",
" sim_out2[\"rts\"] * sim_out2[\"choices\"], histtype=\"step\", bins=40, label=\"sim_out2\"\n",
")\n",
"plt.legend()"
]
},
Expand Down
8 changes: 4 additions & 4 deletions notebooks/basic_tutorial_old.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@
],
"source": [
"def myfun(a, b, c):\n",
"\tprint(a, b, c)\n",
" print(a, b, c)\n",
"\n",
"myfun(**{'c': 1, 'b': 2, 'a': 3})"
"\n",
"myfun(**{\"c\": 1, \"b\": 2, \"a\": 3})"
]
},
{
Expand Down Expand Up @@ -270,8 +271,7 @@
"from ssms.basic_simulators.simulator import simulator\n",
"\n",
"sim_out = simulator(\n",
"\tmodel=\"lba2\", theta={'A': 0.3, 'b': 0.5, 'v0': 0.5, 'v1': 0.5},\n",
"\t\t\t\t\t\t n_samples=10\n",
" model=\"lba2\", theta={\"A\": 0.3, \"b\": 0.5, \"v0\": 0.5, \"v1\": 0.5}, n_samples=10\n",
")"
]
},
Expand Down
Loading