Changes for page Widget PSE
Last modified by teodoramisan on 2023/07/21 14:55
From 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"
To version 24.1
edited by teodoramisan
on 2023/07/21 14:55
on 2023/07/21 14:55
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -57,8 +57,10 @@ 57 57 from tvb.simulator.lab import * 58 58 ))) 59 59 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: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). 61 61 62 + 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: 63 + 62 62 (% class="box" %) 63 63 ((( 64 64 os.environ['CLB_AUTH'] = 'PUT YOUR EBRAINS TOKEN HERE IF YOU WANT HPC RUNS' ... ... @@ -99,10 +99,10 @@ 99 99 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. 100 100 101 101 102 -The progress of the launch can be monitored by a progress bar ,as shown below:104 +The progress of the launch can be monitored by a progress bar (as shown below) and the data used for the HPC launch will be stored in a .toml file available besides the notebook. 103 103 104 104 (% style="text-align:center" %) 105 -[[image:image-20230721150 554-1.png]]107 +[[image:image-20230721151330-2.png||alt="progress-bar.png"]] 106 106 107 107 A file with the name you specified will be generated in both approaches, HPC or local launch. 108 108 ... ... @@ -110,7 +110,14 @@ 110 110 111 111 (% class="box" %) 112 112 ((( 113 -pse = PSEWidget("test.h5") 115 +import os.path 116 + 117 +file_name = "test.h5" 118 + 119 +if os.path.exists(file_name): 120 + pse = PSEWidget(file_name) 121 +else: 122 + print(f"File {file_name} needs to exist!") 114 114 ))) 115 115 116 116 The outcome will be something like in the image bellow.