Skip to content

Commit

Permalink
fix link to run the notebook on EBRAINS, small updates to the notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
shimoura committed Nov 21, 2024
1 parent 62811bd commit 2ca1777
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This code implements the multi-scale spiking network model known as the Human Mu

Do you want to start using or simply run the model? Click the button below.

<a href="https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FINM-6%2Fhuman-multi-area-model.git&urlpath=lab%2Ftree%2Fhuman-multi-area-model.git%2Fhumam_tutorial.ipynb&branch=master"> <img src="https://nest-simulator.org/TryItOnEBRAINS.png" alt="Try it on EBRAINS" width="260"/></a>
<a href="https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FINM-6%2Fhuman-multi-area-model.git&urlpath=lab%2Ftree%2Fhuman-multi-area-model.git%2Fhumam_tutorial.ipynb&branch=main"> <img src="https://nest-simulator.org/TryItOnEBRAINS.png" alt="Try it on EBRAINS" width="260"/></a>

**Please note**: make sure you check and follow our User instructions, especially if you plan to make and save the changes, or if you need step-by-step instructions.

Expand All @@ -51,11 +51,11 @@ The Jupyter Notebook `humam_tutorial.ipynb` illustrates the simulation workflow
* If you plan to only run the model, instead of making and saving changes you made, go to [Try it on EBRAINS](#try-it-on-ebrains-1); Should you want to adjust the parameters, save the changes you made, go to [Fork the repository and save your changes](#fork-the-repository-and-save-your-changes).

#### Try it on EBRAINS
1. Click [Try it on EBRAINS](https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FINM-6%2Fhuman-multi-area-model.git&urlpath=lab%2Ftree%2Fhuman-multi-area-model.git%2Fhumam_tutorial.ipynb&branch=master). If any error or unexpected happens during the following process, please close the browser tab and restart the [User instruction](https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fshimoura%2Fhuman-multi-area-model.git&urlpath=lab%2Ftree%2Fhuman-multi-area-model.git%2Fhumam_tutorial.ipynb&branch=add-downscaling-factor) process again.
1. Click [Try it on EBRAINS](https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FINM-6%2Fhuman-multi-area-model.git&urlpath=lab%2Ftree%2Fhuman-multi-area-model.git%2Fhumam_tutorial.ipynb&branch=main). If any error or unexpected happens during the following process, please close the browser tab and restart the [User instruction](https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fshimoura%2Fhuman-multi-area-model.git&urlpath=lab%2Ftree%2Fhuman-multi-area-model.git%2Fhumam_tutorial.ipynb&branch=add-downscaling-factor) process again.
2. On the `Lab Execution Site` page, select a computing center from the given list.
3. If you’re using EBRAINS for the first time, click `Sign in with GenericOAuth2` to sign in on EBRAINS. To do this, you need an EBRAINS account.
4. Once signed in, on the `Server Options` page, choose `Official EBRAINS Docker image 23.06 for Collaboratory.Lab (recommended)`, and click `start`.
5. Once succeeded, you’re now at a Jupyter Notebook named `humam_tutorial.ipynb`. Click the field that displays `Python 3 (ipykernel)` in the upper right corner and switch the `kernel` to `EBRAINS-23.09` (!TO BE updated!).
5. Once succeeded, you’re now at a Jupyter Notebook named `humam_tutorial.ipynb`. Click the field that displays `Python 3 (ipykernel)` in the upper right corner and switch the `kernel` to `EBRAINS-24.04`.
6. Congratulations! Now you can run the model. Enjoy!<br> To run the model, click the `Run` on the title bar and choose `Run All Cells`. It takes several minutes until you get all results.<br>
**Please note**: every time you click the `Try it on EBRAINS` button, the repository is loaded into your home directory on EBRAINS Lab and it overrides your old repository with the same name. Therefore, make sure you follow the [Fork the repository and save your changes](#fork-the-repository-and-save-your-changes) if you make changes and want to save them.

Expand All @@ -65,7 +65,7 @@ With limited resources, EBRAINS Lab regularly deletes and cleans data loaded on
2. Go to [EBRAINS Lab](https://lab.de.ebrains.eu), log in, and select a computing center from the given list.
3. In the Jupyter Lab, click on the `Git` icon on the left toolbar, click `Clone a Repository` and paste the address of your fork.
4. Now your forked repository of human multi-area model is loaded on the server. Enter the folder `human-multi-area-model` and open the notebook `humam_tutorial.ipynb.ipynb`.
5. Click the field that displays `Python 3 (ipykernel)` in the upper right corner and switch the `kernel` to `EBRAINS-23.09` (!TO BE updated!).
5. Click the field that displays `Python 3 (ipykernel)` in the upper right corner and switch the `kernel` to `EBRAINS-24.04`.
6. Run the notebook! To run the model, click the `Run` on the title bar and choose `Run All Cells`. It takes several minutes until you get all results.
7. You can modify the exposed parameters before running the model. If you want to save the changes you made, press `Control+S` on the keyboard, click the `Git` icon on the most left toolbar, do git commits and push.<br>
To commit, on `Changed` bar, click the `+` icon, fill in a comment in the `Summary (Control+Enter to commit)` at lower left corner and click `COMMIT`.<br>
Expand Down
14 changes: 11 additions & 3 deletions humam_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"id": "c59710b5",
"metadata": {},
"source": [
"**Note**: if needed, additional python packages can be installed via `!pip install <package_name>` and then imported in this section."
]
},
{
"cell_type": "markdown",
"id": "27160ba8",
Expand Down Expand Up @@ -141,7 +149,7 @@
"id": "9daf88e5-0d45-4529-a228-70c33900b05e",
"metadata": {},
"source": [
"The values assigned for the following parameters are kept the same as in the paper except for the `scaling_factor` which is set as 0.005 enabling to simulate a down-scaled multi-area model with 2GB RAM. By default, it is set to 1.0 for simulating the full-scale model."
"The values assigned for the following parameters are kept the same as in the paper except for the `scaling_factor` which is set as 0.004 enabling to simulate a down-scaled multi-area model with 2GB RAM. By default, it is set to 1.0 for simulating the full-scale model."
]
},
{
Expand Down Expand Up @@ -218,7 +226,7 @@
"outputs": [],
"source": [
"# Get path to the output directory\n",
"net_params['outpath'] = os.path.join(os.getcwd(), 'out', 'downscaled')\n",
"net_params['outpath'] = os.path.join(os.getcwd(), 'out', 'downscaled'+str(scaling_factor))\n",
"outpath = net_params['outpath']\n",
"\n",
"# Get base path\n",
Expand Down Expand Up @@ -651,7 +659,7 @@
"id": "013adaf8-af8b-470e-94f0-b69121d1ca2c",
"metadata": {},
"source": [
"Comparison of area-level functional connectivity (FC) between the down-scaled HuMAM and human experimental data. (Left) FC of human resting-state fMRI (see Materials and methods in [\\[1\\]](#mainRef)). (Right) Simulated FC measured by the zero-time-lag correlation coefficient of synaptic input currents"
"Comparison of area-level functional connectivity (FC) between the down-scaled HuMAM and human experimental data. (Left) FC of human resting-state fMRI (see Materials and methods in [\\[1\\]](https://doi.org/10.1093/cercor/bhae409)). (Right) Simulated FC measured by the zero-time-lag correlation coefficient of synaptic input currents"
]
},
{
Expand Down

0 comments on commit 2ca1777

Please sign in to comment.