Changes for page Widget PSE
Last modified by teodoramisan on 2023/07/21 14:55
From version 6.1
edited by teodoramisan
on 2023/03/24 16:05
on 2023/03/24 16:05
Change comment:
There is no comment for this version
To version 19.1
edited by teodoramisan
on 2023/07/21 12:17
on 2023/07/21 12:17
Change comment:
Deleted image "image-20230721150554-1.png"
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 1 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,22 +1,21 @@ 1 -== Widget PSE == 2 - 3 - 1 +(% class="wikigeneratedid" id="HWidgetPSE" %) 4 4 Source code: [[https:~~/~~/github.com/the-virtual-brain/tvb-widgets>>https://github.com/the-virtual-brain/tvb-widgets]] 5 5 6 6 == **Purpose** == 7 7 8 8 9 -It is composed of two separate Jupyter Widgets(PSE Launcher and PSE Visualizer) intended for the visualization of launching custom simulations. The launcher works locally fornow,but inthe future aHPClaunch will be available.7 +It is composed of two separate Jupyter Widgets(PSE Launcher and PSE Visualizer) intended for the visualization of launching custom simulations. The launcher works locally and on HPC. 10 10 11 11 The simulation can be customized by: 12 12 13 -* Getting a list of connectivities given as API 11 +* Getting a list of connectivities and an HPC configuration given as APIs 14 14 * Setting up parameters and ranges 15 15 * Selecting multiple metrics 14 +* Observing the progress of the launch by a monitor progress bar 16 16 17 17 == **Inputs** == 18 18 19 -* PSELauncher(Simulator, List _of_Connectivities)18 +* PSELauncher(Simulator, List of Connectivities, HPC Configuration) 20 20 * PSEVisualizer(Filename), the file will contain all the customized parameters from the launcher 21 21 22 22 == **Requirements and installation** == ... ... @@ -58,28 +58,55 @@ 58 58 from tvb.simulator.lab import * 59 59 ))) 60 60 61 - The launcher widget can be initialized with therequiredparameters(simulator and the list ofconnectivities)asitshowsbelow:60 + The launcher widget can be initialized with more parameters: a simulator, a list of connectivities and an HPC configuration (only the simulator being a required argument). For HPC launch, besides the configuration part, an EBrains token needs to be stored. A custom initialization, which includes the HPC launch, is shown below: 62 62 63 63 (% class="box" %) 64 64 ((( 64 +os.environ['CLB_AUTH'] = 'PUT YOUR EBRAINS TOKEN HERE IF YOU WANT HPC RUNS' 65 + 66 +from pyunicore.helpers.jobs import Resources 67 +res = Resources(cpus_per_node=4) 68 + 69 + # !! Pay attention to env name and dir you might need to change if in conflict on the SAME project with another colleague of yours!! 70 + 71 +hpc_config = HPCConfig(site="JUSUF", project="icei-hbp-2021-0007", 72 + env_dir="tvb_widget", env_name="venv_tvb", n_threads=None, resources=res) 73 +))) 74 + 75 +(% class="box" %) 76 +((( 65 65 sim = simulator.Simulator(connectivity = connectivity.Connectivity.from_file()) 66 66 conn_66 = connectivity.Connectivity.from_file("connectivity_66.zip") 67 67 conn_68 = connectivity.Connectivity.from_file("connectivity_68.zip") 68 68 conn_76 = connectivity.Connectivity.from_file() 69 -launch = PSELauncher(sim, [conn_66, conn_68, conn_76]) 81 +launch = PSELauncher(sim, [conn_66, conn_68, conn_76], hpc_config) 70 70 ))) 71 71 72 72 The outcome will be something like in the image bellow. 73 73 You can create a customized simulation by choosing different values for parameters, by setting ranges for them and by selecting the metrics for the simulation. 74 74 75 -[[image:setup_parameters.png||alt="setup_parameters"]] 87 +[[image:setup_parameters.png||alt="setup_parameters" style="float:left"]] 76 76 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 77 77 Then, a file name has to be inserted in the indicated box(for storing the data) and as a last set-up, a launch type has to be chosen. 78 78 79 -[[image:launch.png||alt="launch"]] 80 80 81 - Afilewiththe nameyou specifiedwillbegenerated.102 +The progress of the launch can be monitored by a progress bar, as shown below: 82 82 104 +(% style="text-align:center" %) 105 +[[image:image-20230721150554-1.png]] 106 + 107 +A file with the name you specified will be generated in both approaches, HPC or local launch. 108 + 83 83 Then, the PSEVisualizer can be called with the required parameter(file_name) as it shows below: 84 84 85 85 (% class="box" %) ... ... @@ -91,4 +91,4 @@ 91 91 92 92 There will be a representation for every metric that was chosen before, in the launcher. The widget has some features for the type of visualization, the change of color and the option for choosing between metrics. 93 93 94 -[[image:result.png||alt="result"]] 120 +[[image:result.png||alt="result" style="float:left"]]
- launch.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.teodoramisan - Size
-
... ... @@ -1,1 +1,0 @@ 1 -236.9 KB - Content
- image-20230721151330-2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.teodoramisan - Size
-
... ... @@ -1,0 +1,1 @@ 1 +21.4 KB - Content